pub enum ConstructableTypeKind {
CallableWithConstruct,
CallableMaybePrototype,
Function,
SymbolRef(SymbolRef),
TypeQueryRef(SymbolRef),
TypeParameterWithConstraint(TypeId),
TypeParameterNoConstraint,
Intersection(Vec<TypeId>),
Application,
Object,
NotConstructable,
}Expand description
Kind of constructable type for get_construct_type_from_type.
This enum represents the different ways a type can be constructable,
allowing the caller to handle each case appropriately without matching
directly on TypeData.
Variants§
CallableWithConstruct
Callable type with construct signatures - return transformed callable
CallableMaybePrototype
Callable type without construct signatures - check for prototype property
Function
Function type - always constructable
SymbolRef(SymbolRef)
Reference to a symbol - need to check symbol flags
TypeQueryRef(SymbolRef)
TypeQuery (typeof expr) - need to check symbol flags
TypeParameterWithConstraint(TypeId)
Type parameter with a constraint to check recursively
TypeParameterNoConstraint
Type parameter without constraint - not constructable
Intersection(Vec<TypeId>)
Intersection type - all members must be constructable
Application
Application (generic instantiation) - return as-is
Object
Object type - return as-is (may have construct signatures)
NotConstructable
Not constructable
Trait Implementations§
Source§impl Clone for ConstructableTypeKind
impl Clone for ConstructableTypeKind
Source§fn clone(&self) -> ConstructableTypeKind
fn clone(&self) -> ConstructableTypeKind
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more