Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some typing issues #122

Open
maelp opened this issue Dec 18, 2023 · 3 comments
Open

Some typing issues #122

maelp opened this issue Dec 18, 2023 · 3 comments

Comments

@maelp
Copy link

maelp commented Dec 18, 2023

When trying to compile the equivalent of cad.js in typescript I get this error:

error TS2339: Property 'shell' does not exist on type 'Shell | Solid | CompSolid | Compound | Vertex | Edge | Wire | Face'.
  Property 'shell' does not exist on type 'Vertex'.
@maelp
Copy link
Author

maelp commented Dec 18, 2023

Similarly, when trying to compile

  const OC = await opencascade({
    locateFile: () => opencascadeWasm,
  });

there's an error

error TS2554: Expected 0 arguments, but got 1.

(and indeed the .d.ts shows declare function init(): Promise<OpenCascadeInstance>;)

@sgenoud
Copy link
Owner

sgenoud commented Dec 18, 2023

What is the context of the first one?

For the second one I looked into it at some point - if I remember well, it comes from the upstream project

@maelp
Copy link
Author

maelp commented Dec 18, 2023

I just tried to compile this in Typescript:

https://github.com/sgenoud/replicad/blob/main/packages/replicad-app-example/src/cad.js#L4

and that was the error shown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants