TypeScript Declarations for the nanos world API which can be used with TypeScriptToLua.
Either by clicking the npm badge above
or
run the following command
npm i -D nanos-world-types
In order to use the declarations you need to tell TypeScript that you want to use them. In order to that you have two options:
Reference the declaration in your TypeScript files. Therefore you just need to paste the following line in every TypeScript file where you need the declarations:
/// <reference types="nanos-world-types" />
Reference the declaration in your tsconfig.json. Just add the following snippet to the compilerOptions object of your tsconfig.json
:
"types": [
"nanos-world-types"
]
Use my nanos world TypeScript template: here
The version number for the declarations are built by the following schema:
- The first number is the documentations number of nanos world but without the dots
- The second number is the alpha/beta/etc. declaration. The numerical position in the alphabet of the first letter of the phase is taken
- The last number is the version number of the declaration. If a change is made to the declaration, but not the documentation, this number gets incremented