Close
Close full mode
logots-defold

Defold Extensions

githubEdit on Github
Last update: a minute ago by Justin WalshReading time: 2 min

Defold is a modular engine, with a ton of functionality available through Lua libraries or native extensions.

Since every extension has its own unique API, they're tricky to use with a strictly typed language like TypeScript. Here's how we handle it:

Library

The @ts-defold/library contains user-submitted types for popular Defold extensions. The library is included in all ts-defold templates. Install your preferred extensions in Defold, then type npm run resolve to fetch the matching types from the library.

Ext-Type-Gen

The ext-type-gen tool can parse Defold native extensions that contain a script_api, and generate types automagically.

Write Your Own

If all else fails, you can read the documentation and write your own types. Your preferred AI tool (like Chat-GPT) may also be able to help get you most of the way there.

🔧 Configuration — Previous
Plugins
Next