typed-factorio
Version:
Featureful typescript definitions for the Factorio modding api.
58 lines (55 loc) • 1.44 kB
TypeScript
// This is an auto-generated file. Do not edit directly!
/** @noSelfInFile */
/**
* @noResolution
*/
declare module "factorio:runtime" {
/**
* See {@link LuaPlayer#index LuaPlayer.index}.
*
* You can cast a raw number to this type, e.g. `1 as PlayerIndex`.
*/
type PlayerIndex = uint & {
_playerIndexBrand: void
}
/**
* See {@link LuaSurface#index LuaSurface.index}.
*
* You can cast a raw number to this type, e.g. `1 as SurfaceIndex`.
*/
type SurfaceIndex = uint & {
_surfaceIndexBrand: void
}
/**
* See {@link LuaForce#index LuaForce.index}.
*
* You can cast a raw number to this type, e.g. `1 as ForceIndex`.
*/
type ForceIndex = uint & {
_forceIndexBrand: void
}
/**
* See {@link LuaEntity#unit_number LuaEntity.unit_number}.
*
* You can cast a raw number to this type, e.g. `1 as UnitNumber`.
*/
type UnitNumber = uint & {
_unitNumberBrand: void
}
/**
* See {@link LuaGuiElement#index LuaGuiElement.index}.
*
* You can cast a raw number to this type, e.g. `1 as GuiElementIndex`.
*/
type GuiElementIndex = uint & {
_guiElementIndexBrand: void
}
/**
* See {@link LuaBootstrap#register_on_entity_destroyed LuaBootstrap.register_on_entity_destroyed}.
*
* You can cast a raw number to this type, e.g. `1 as RegistrationNumber`.
*/
type RegistrationNumber = uint64 & {
_registrationNumberBrand: void
}
}