Skip to content
hazzard993 edited this page May 9, 2019 · 4 revisions

This file is used to let TypeScript know what you're doing and get TypeScriptToLua to do what you want

{
    "compilerOptions": {
        "lib": ["es2017"],
        "strict": true,
        "outDir": "game",
        "rootDir": "src",
        "types": [
            "love-typescript-definitions",
            "lua-types/jit"
        ]
    },
    "tstl": {
        "luaTarget": "JIT"
    }
}
Option Effects Description
rootDir File System The directory where your TypeScript files are
outDir File System The directory where Lua files will go (same structure as rootDir)
luaTarget Output Lua Can be jit, 5.3, 5.2 or 5.1
lib Typings Describes, to TypeScript, what environmental definitions exist
types Typings A list of paths to the declarations you wish to use
strict Typings Enables a collection of strict rules

Other more confusing options

Option Effects Description
baseUrl Typings + Output Lua The directory where non-relative module paths resolve

Relevant Links

Clone this wiki locally