@shazbot14/warhammer3-types
v0.1.5
Published
TypeScript declarations for the Total War: WARHAMMER III scripting API.
Readme
@shazbot14/warhammer3-types
TypeScript declarations for the Total War: WARHAMMER III scripting API when writing TypeScript that is transpiled to Lua with TypeScriptToLua.
Installation
Install the declarations as a development dependency:
npm install --save-dev @shazbot14/warhammer3-typesThe package provides ambient global declarations, so you do not import it from
your TypeScript source files. If your tsconfig.json specifies
compilerOptions.types, include the package by its full name:
{
"compilerOptions": {
"types": [
"lua-types/5.1",
"@typescript-to-lua/language-extensions",
"@shazbot14/warhammer3-types"
]
}
}@typescript-to-lua/language-extensions is optional and is only needed when
using TypeScriptToLua-specific types such as LuaMultiReturn.
If you do not want to add the game package to compilerOptions.types, include
it from a declaration file instead:
/// <reference types="@shazbot14/warhammer3-types" />Use one of these approaches; you do not need both.
What this package contains
This package contains compile-time declaration files for the game API. It does not contain generated Lua, game files, or runtime implementations for game functions.
The game must provide the functions and objects declared by this package at runtime. Any project-specific Lua compatibility helpers or libraries must be installed and copied separately by the mod project.
