Skip to content
This repository has been archived by the owner on Sep 10, 2022. It is now read-only.

NanosWorldTS/nanos-typescript-declarations

Repository files navigation

TypeScript Declarations for nanos world npm

The declarations are deprecated. Use the nanosts CLI instead!

TypeScript Declarations for the nanos world API which can be used with TypeScriptToLua.

Installation

Either by clicking the npm badge above

or

run the following command

npm i -D nanos-world-types

Usage / How to use

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:

Option 1:

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" />

Option 2:

Reference the declaration in your tsconfig.json. Just add the following snippet to the compilerOptions object of your tsconfig.json:

"types": [
    "nanos-world-types"
]

Option 3: (recommended)

Use my nanos world TypeScript template: here

Versioning

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

About

TypeScript Declarations for the nanos world API which can be used with TypeScriptToLua.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published