@falloutmp/types
v0.2.5
Published
TypeScript declarations for the Fallout Multiplayer scripting API: @falloutmp/types/server and @falloutmp/types/client
Maintainers
Readme
@falloutmp/types
TypeScript declarations for the Fallout Multiplayer scripting API, generated from the runtime's own bindings and published with every release. The package version is the release version.
npm add -D @falloutmp/typesA resource runs in the server's Node.js isolate or in a client's sandboxed V8 one, and the two
declare different globals, so they are two TypeScript programs, each naming its side in types:
// tsconfig.json (server half)
{
"compilerOptions": {
"lib": ["ES2022"],
"types": ["@falloutmp/types/server"]
}
}// src/client/tsconfig.json (client half)
{
"compilerOptions": {
"lib": ["ES2022"],
"types": ["@falloutmp/types/client"]
}
}The declarations are globals, not modules: there is nothing to import, and a resource that does
import ... from "@falloutmp/types" will not compile. Naming the side in types is the whole
installation.
The package carries declarations only -- no runtime, no JavaScript -- so it belongs in
devDependencies.
Versioning
The version is the release it came from, and a release's server only promises the API its own
declarations describe. Pin the version your server runs; a prerelease is published under the next
dist-tag.
