pub enum TypeKind {
Show 19 variants
Primitive,
Literal,
Object,
Array,
Tuple,
Union,
Intersection,
Function,
Generic,
TypeParameter,
Conditional,
Mapped,
IndexAccess,
TemplateLiteral,
TypeQuery,
KeyOf,
Reference,
Error,
Other,
}Expand description
Classification of types into broad categories.
Variants§
Primitive
Primitive types (string, number, boolean, etc.)
Literal
Literal types (“hello”, 42, true)
Object
Object types
Array
Array types
Tuple
Tuple types
Union
Union types
Intersection
Intersection types
Function
Function/callable types
Generic
Generic types (type applications)
TypeParameter
Type parameters (T, K, etc.)
Conditional
Conditional types (T extends U ? X : Y)
Mapped
Mapped types ({ [K in Keys]: V })
IndexAccess
Index access types (T[K])
TemplateLiteral
Template literal types (hello${T})
TypeQuery
Type query (typeof expr)
KeyOf
KeyOf types (keyof T)
Reference
Named type references (interfaces, type aliases)
Error
Error types
Other
Other/unknown
Trait Implementations§
impl Copy for TypeKind
impl Eq for TypeKind
impl StructuralPartialEq for TypeKind
Auto Trait Implementations§
impl Freeze for TypeKind
impl RefUnwindSafe for TypeKind
impl Send for TypeKind
impl Sync for TypeKind
impl Unpin for TypeKind
impl UnsafeUnpin for TypeKind
impl UnwindSafe for TypeKind
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.