pub enum Type {
Show 29 variants
String,
Number,
Boolean,
Any,
Void,
Never,
Unknown,
Null,
Undefined,
Object,
Symbol,
BigInt,
Named(String),
Qualified(QualifiedTypeName),
Generic(GenericType),
GenericNamed {
name: String,
type_parameters: Vec<TypeParameter>,
},
Union {
left: Box<Type>,
right: Box<Type>,
},
Intersection {
left: Box<Type>,
right: Box<Type>,
},
Array(Box<Type>),
Tuple(Vec<Type>),
Function(Box<FunctionType>),
ObjectType(ObjectType),
IndexSignature(Box<IndexSignature>),
Mapped(Box<MappedType>),
Conditional(ConditionalType),
TemplateLiteral(TemplateLiteralType),
Parenthesized(Box<Type>),
TypeQuery(Box<TypeQuery>),
Import(Box<ImportType>),
}
Expand description
Type definitions
Variants§
String
Number
Boolean
Any
Void
Never
Unknown
Null
Undefined
Object
Symbol
BigInt
Named(String)
Qualified(QualifiedTypeName)
Generic(GenericType)
GenericNamed
Union
Intersection
Array(Box<Type>)
Tuple(Vec<Type>)
Function(Box<FunctionType>)
ObjectType(ObjectType)
IndexSignature(Box<IndexSignature>)
Mapped(Box<MappedType>)
Conditional(ConditionalType)
TemplateLiteral(TemplateLiteralType)
Parenthesized(Box<Type>)
TypeQuery(Box<TypeQuery>)
Import(Box<ImportType>)
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Type
impl<'de> Deserialize<'de> for Type
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Type
impl RefUnwindSafe for Type
impl Send for Type
impl Sync for Type
impl Unpin 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