pub enum FullIterableTypeKind {
Array(TypeId),
Tuple(Vec<TupleElement>),
StringLiteral(Atom),
Union(Vec<TypeId>),
Intersection(Vec<TypeId>),
Object(ObjectShapeId),
Application {
base: TypeId,
},
TypeParameter {
constraint: Option<TypeId>,
},
Readonly(TypeId),
FunctionOrCallable,
ComplexType,
NotIterable,
}Expand description
Comprehensive classification for iterable type checking.
This enum is used by is_iterable_type and related functions to determine
if a type is iterable (has Symbol.iterator protocol) without directly
matching on TypeData in the checker layer.
Variants§
Array(TypeId)
Array type - always iterable
Tuple(Vec<TupleElement>)
Tuple type - always iterable
StringLiteral(Atom)
String literal - always iterable
Union(Vec<TypeId>)
Union type - all members must be iterable
Intersection(Vec<TypeId>)
Intersection type - at least one member must be iterable
Object(ObjectShapeId)
Object type - check for [Symbol.iterator] method
Application
Application type (Set
TypeParameter
Type parameter - check constraint if present
Readonly(TypeId)
Readonly wrapper - check inner type
FunctionOrCallable
Function or Callable - not iterable
ComplexType
Index access, Conditional, Mapped - not directly iterable
NotIterable
Unknown type - not iterable (or needs special handling)
Trait Implementations§
Source§impl Clone for FullIterableTypeKind
impl Clone for FullIterableTypeKind
Source§fn clone(&self) -> FullIterableTypeKind
fn clone(&self) -> FullIterableTypeKind
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more