TypeScript definitions for PlayCanvas

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:

  1. git clone https://github.com/playcanvas/engine.git
  2. cd engine
  3. npm install
  4. npm run build
  5. 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:



I lowkey have no idea what that is but ok

so cool!
I have started to use it, although the documentation is relatively small, some APIs are not particularly perfect, thank you!

This is great! Thank you, team :slight_smile:
Would be great if you could add these instructions to the readme of the repository.

1 Like