std::types
Types Module
Core runtime type identifiers.
Contents
Type::TypeId provides compile-time constants that mirror the runtime’s
internal type tags. These are useful for diagnostics, FFI integrations,
and low-level tooling that needs stable numeric identifiers for primitive
types.
| Constant | Ignis Type |
|---|---|
I8 |
i8 |
I16 |
i16 |
I32 |
i32 |
I64 |
i64 |
U8 |
u8 |
U16 |
u16 |
U32 |
u32 |
U64 |
u64 |
F32 |
f32 |
F64 |
f64 |
BOOL |
boolean |
CHAR |
char |
STRING |
str |
POINTER |
*T |
For sum types, use dedicated modules:
std::optionforOption<S>std::resultforResult<T, E>
Example
import Type from "std::types";
function main(): i32 {
let id: u32 = Type::TypeId::I32;
return id as i32;
}
namespace __typesConstants
const TYPE_BOOL_ID: u32const TYPE_CHAR_ID: u32const TYPE_F32_ID: u32const TYPE_F64_ID: u32const TYPE_I16_ID: u32const TYPE_I32_ID: u32const TYPE_I64_ID: u32const TYPE_I8_ID: u32const TYPE_POINTER_ID: u32const TYPE_STRING_ID: u32const TYPE_U16_ID: u32const TYPE_U32_ID: u32const TYPE_U64_ID: u32const TYPE_U8_ID: u32namespace TypeRuntime type metadata exposed to Ignis code.
These constants mirror runtime/compiler type tags and are intended for low level diagnostics and interop rather than ordinary application branching.
namespace TypeIdRuntime type identifiers mirrored from the Ignis runtime.
These constants are useful for diagnostics, low-level tooling and FFI integrations that need stable runtime tags.
Example
import Type from "std::types";
function main(): i32 {
let id: u32 = Type::TypeId::I32;
return id as i32;
}
Constants
const BOOL: u32const CHAR: u32const F32: u32const F64: u32const I16: u32const I32: u32const I64: u32const I8: u32const POINTER: u32const STRING: u32const U16: u32const U32: u32const U64: u32const U8: u32