Skip to content

thinknathan/ts-defold-types

 
 

Repository files navigation

Defold Types

Defold Types

CI GitHub License Chat with us!

TypeScript definitions for Defold, a high-performance cross-platform game engine.

This Fork

This fork has more detailed types than the origin repo. My hand-written patch replaces many of the any keywords with specific types, sets constant values to use const, etc. See the changelog for details.

Can be used as a drop-in replacement of the original.

Installation

  1. Get this package from Github
yarn add git+https://[email protected]/thinknathan/ts-defold-types.git#^1.3.0 -D
# or
npm install git+https://[email protected]/thinknathan/ts-defold-types.git#^1.3.0 --save-dev
  1. Modify your tsconfig.json
{
  "compilerOptions": {
+    "typeRoots": ["./node_modules/@ts-defold"],
+    "types": ["types"]
  }
}

Shoutouts 📢

@dasannikov and DefoldTypescript for a starting point and inspiration TypeScriptToLua for the awesome community and tools @hazzard993, @ark120202, @Perryvw and all the fine folks over on the tstl discord server.

TypeScript ❤️ Defold