Type Overview
ALLOW_MISSING_EVENTS
Whether to throw type errors when trying to register an event handler with an event that's not documented in TypeScript.
ALLOW_MISSING_PANELS
Whether to throw type errors when trying to use $.CreatePanel or other API methods taking a panel name, when that panel name is not documented in TypeScript.
Brand
Make a type incompatible with types that'd otherwise be compatible.
color
rgba, hex etc. color string
double
No description provided.
duration
A duration in seconds.
float
No description provided.
Func
No description provided.
int16
No description provided.
int32
No description provided.
int64_num
No description provided.
int64_str
A STRING representing an int64.
JavaScript number
s are IEEE floats and lose precision when used for values greater than 2^53. Most of Panorama was
implemented before native JS BigInts were a thing, and not worth the refactoring work to use them.
In C++, when a C++ method/events exposed to JS have a int64/uint64 param, either a number or string can be passed from JS, and both will be converted to the corresponding 64-bit integer. If precision is a concern (e.g. SteamIDs), use a string.
For methods/events that return a int64/uint64, Panorama will return a JS string!
To be super explicit this, we have separate type aliases for both numbers and strings. When typing C++ methods,
those taking int64 params in C++ should have TS params with type int64_str | int64_num
, whilst methods returning
int64
s from C++ should return only int64_str
in TS.
int8
No description provided.
JsonArray
No description provided.
See also: JsonValue
JsonObject
No description provided.
See also: JsonValue
JsonPrimitive
No description provided.
JsonValue
No description provided.
See also: JsonPrimitive - JsonObject - JsonArray
Keyframes
Represents a keyframes animation return.
Primitive
No description provided.
rgbaColor
rgba color string
Simplify
Encourages IDEs to flatten types when displaying.
steamID
String of a SteamID64. Might look like a uint64 in C++ but it's always a string in JS!
uint16
No description provided.
uint32
No description provided.
uint64_num
No description provided.
uint64_str
No description provided.
uint8
No description provided.
uuid
Represents a unique id return.
See also: int32
ValueOf
No description provided.
vec2
No description provided.
vec3
No description provided.
QueryOutput
No description provided.
ClockType
No description provided.
See also: ValueOf - ClockTypeEnum
GenericPanel
Some kind of panel, containing at minimum the properties of Panel. Use paneltype === 'panel name' to narrow!
See also: PanelTagNameMap
SettingsPanel
No description provided.
See also: SettingsSlider - SettingsKeyBinder - SettingsToggle - SettingsEnum - SettingsEnumDropDown - ConVarColorDisplay