TypeScript definitions for Civilization VI using TypeScriptToLua
- Get this package from npm
yarn add civvi-types --dev
# or
npm install civvi-types --save-dev
- Modify your tsconfig.json
Highly recommended template you can use:
{
"$schema": "https://raw.githubusercontent.com/TypeScriptToLua/TypeScriptToLua/master/tsconfig-schema.json",
"compilerOptions": {
"target": "esnext",
"lib": [
"ES2022.Array",
"ES2022.Error",
"ES2022.Object",
"ES2022.String",
"ES2015.Promise",
"ES5",
"ES2015.Iterable"
],
"moduleResolution": "node",
"types": [
"lua-types/core/coroutine",
"lua-types/core/global",
"lua-types/core/math",
"lua-types/core/metatable",
"lua-types/core/string",
"lua-types/core/table",
"@typescript-to-lua/language-extensions",
"civvi-types"
],
"strict": true
},
"tstl": {
"luaTarget": "5.1",
"luaLibImport": "inline",
"noImplicitGlobalVariables": true,
"noImplicitSelf": true
}
}