pub enum Type {
Show 23 variants
Error,
Any,
Unknown,
Never,
Void,
Null,
Undefined,
Boolean,
Number,
BigInt,
String,
Symbol,
Object,
BooleanLiteral(bool),
NumberLiteral(Box<str>),
StringLiteral(Box<str>),
BigIntLiteral(Box<str>),
Array(TypeId),
Union(Vec<TypeId>),
ObjectType(Vec<PropertyType>),
Function(FunctionSignature),
Named(SymbolId),
NumericEnum(SymbolId),
}Expand description
The closed space of structural types the first checker slice models.
Error is a recovery type produced for unresolved or unsupported syntax; it
behaves like Any in assignability so one upstream mistake never cascades.
Variants§
Error
Any
Unknown
Never
Void
Null
Undefined
Boolean
Number
BigInt
String
Symbol
Object
BooleanLiteral(bool)
NumberLiteral(Box<str>)
StringLiteral(Box<str>)
BigIntLiteral(Box<str>)
Array(TypeId)
Union(Vec<TypeId>)
ObjectType(Vec<PropertyType>)
Function(FunctionSignature)
Named(SymbolId)
A nominal named type (type parameter, class, or enum) compared by identity.
NumericEnum(SymbolId)
A numeric enum value, distinct from both its runtime enum object and number.
Trait Implementations§
impl Eq for Type
impl StructuralPartialEq for Type
Auto Trait Implementations§
impl Freeze for Type
impl RefUnwindSafe for Type
impl Send for Type
impl Sync for Type
impl Unpin for Type
impl UnsafeUnpin for Type
impl UnwindSafe for Type
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more