If you are developing with the PlayCanvas Engine (without the Editor), it’s now possible to get full type-checking support when using TypeScript.
To generate the PlayCanvas JS engine playcanvas.js
and a matching TypeScript definitions file playcanvas.d.ts
, open a command prompt and do:
- git clone https://github.com/playcanvas/engine.git
- cd engine
- npm install
- npm run build
- npm run tsd
Et voilà!
Note that both files are output to the build
folder.
The Pull Request that added support for this can be found here: