Posted By

Bryan Huang
Bryan Huang is a Developer Advocate with Autodesk Developer Network and is a certified AWS/Azure Solutions Architect/Developer and VMware Practitioner
4 Aug 2019
Today marks the GA release of the much anticipated Typescript definitions for Forge Viewer v7.0! As always we will continue our endeavors to keep abreast with the latest updates (v7.1 and up) and see the Feedback section below if you'd like to contribute to definitions - we can really use your greatly appreciated input!
To use these definitions in your TypeScript project, install and import them separately as stand-alone dependencies as appropriate to your requirements.
Install @type/forge-viewer
npm install --save-dev @types/three @types/forge-viewer #three.js types are required
Reference the definitions in your TypeScript configurations:
// tsconfig.json or your framework-specific config file such as tsconfig.app.json
{
"types": ["forge-viewer"]
}
We've updated our Viewer TypeScript sample to adopt these definitions. This should be a great start for anyone looking to dive into TypeScript with Forge Viewer as well.
Feel free to chip in with suggestions, bug reports and feature requests by creating an issue or pull request to the following repositories:
- https://github.com/dukedhx/DefinitelyTyped/ (source files can be found here (Forge Viewer) and here (Forge API Node.js Client SDK)
- https://github.com/Autodesk-Forge/viewer-nodejs-typeview.sample
Alternatively you can follow the official guide here to report an issue - be sure to tag me (Bryan Huang) in your request so we can be notified and attend to it.
Hats off to Jan Liska (@liskaj71) and Kean Walmsley (@keanw) for contributing to the definitions. Thanks gents!