Skip to main content

Module types

Module types 

Source

Structs§

EnumMember
One member of an enum, as the member literal type E.A names it.
IndexSignature
Values available under arbitrary string property names.
LiteralF64
f64 wrapper for total ordering and bit-pattern equality — bare f64 lacks Eq/Ord, which would break the derived impls on Type. Construction must canonicalize -0.0 → 0.0; NaN can’t appear from source literals so bit-pattern equality is safe.
ObjectField
optional: true means reads widen to ty | undefined and construction may omit the field. Distinct from a value-nullable field (ty: T | null, optional: false): must be present but can be null.
Package
Owning package of a by-name Type reference (InterfaceRef, AliasRef, Alias, NumberEnum, StringEnum). Carried so structural resolution of an already-typed value can find the symbol by FQN in a global registry, independent of what the current module imported.
TupleType
Tuple positions and the number of trailing positions that may be omitted. Optional positions include Undefined in their element type.
TypePredicate

Enums§

EnumValue
The value an enum member holds.
Type

Functions§

bigint_literal_type
The Type::BigIntLiteral of a bigint literal’s decimal digits, as the lexer writes them.
negate_bigint_digits
digits negated, in Type::BigIntLiteral’s spelling: -0n is 0n.
union_display_order
A union’s members in the order they are printed. Members are stored in canonical order, which puts null and undefined first; they print last, as TypeScript prints them: string | null | undefined.