Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@typed-tabletop-simulator/declaration

Sebaestschjin107CC0-1.02.2.1TypeScript support: included

Declaration files for the Tabletop Simulator API.

typescript, lua, tabletopsimulator, tabletop-simulator

readme

Tabletop Simulator Types

TypeScript definitions for the Tabletop Simulator API that can be used to transpile Typescript file to Lua with the Typescript to Lua transpiler.

Usage

Install the package

npm install --save-dev @typed-tabletop-simulator/declaration

Be sure to also install TSTL.

Configure your tsconfig.json to include those settings:

{
  "compilerOptions": {
    // required, because by default TS also includes esdom which already defines self
    // self is used in TTS to reference the object
    "lib": ["esnext"],
    // Include the types from this package as well as the Lua language extension from TSTL
    "types": ["@typed-tabletop-simulator/declaration", "@typescript-to-lua/language-extensions"]
  }
}