0

I'm using typescript definitions for Forge in link below: https://forge.autodesk.com/blog/typescript-definitions-forge-viewer-and-nodejs-client-sdk-now-available

When I try to transform the model following this article: https://forge.autodesk.com/blog/know-how-complex-component-transformations-viewer-part-1-basics, I realize viewerimpl is missing method getFragmentProxy.

How can I fix this?

1 Answer 1

1

Thank you for letting us know. This issue is caused by the missing type definition for the Viewer3DImpl#getFragmentProxy in the community contributed TypeScript definition file for the Forge Viewer (i.e. @types/forge-viewer) under DefinitelyTyped repository, so the TypeScript type checker/complier cannot find the type definition. The method is still there in the Forge Viewer JavaScript libs. To fix it, here are some suggestions for you:

  • Create an PR for adding the missing type definition of the Viewer3DImpl#getFragmentProxy on DefinitelyTyped repository yourself
  • Create a dummy .d.ts file to add the missing type definition somewhere in your code project. Please refer here for How-To (Link1 & Link2)
  • Wait for updates on @types/forge-viewer from us (Not recommended, it might take some time for one line code update)
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.