pub enum TypeAnnotation {
Show 22 variants
StringTypeAnnotation,
NumberTypeAnnotation,
BooleanTypeAnnotation,
VoidTypeAnnotation,
MixedTypeAnnotation,
AnyTypeAnnotation,
EmptyTypeAnnotation,
NullLiteralTypeAnnotation,
BigIntTypeAnnotation,
SymbolTypeAnnotation,
StringLiteralTypeAnnotation {
value: String,
},
NumberLiteralTypeAnnotation {
value: f64,
},
BooleanLiteralTypeAnnotation {
value: bool,
},
NullableTypeAnnotation {
type_annotation: Box<TypeAnnotation>,
},
ObjectTypeAnnotation {
properties: Vec<ObjectMember>,
indexers: Vec<ObjectTypeIndexer>,
exact: bool,
},
UnionTypeAnnotation {
types: Vec<TypeAnnotation>,
},
IntersectionTypeAnnotation {
types: Vec<TypeAnnotation>,
},
GenericTypeAnnotation {
id: Identifier,
type_parameters: Option<TypeParameterInstantiation>,
},
TupleTypeAnnotation {
element_types: Vec<TypeAnnotation>,
},
ArrayTypeAnnotation {
element_type: Box<TypeAnnotation>,
},
TypeofTypeAnnotation {
argument: Box<TypeAnnotation>,
},
Other,
}Expand description
A Flow type annotation node.
Variants§
StringTypeAnnotation
NumberTypeAnnotation
BooleanTypeAnnotation
VoidTypeAnnotation
MixedTypeAnnotation
AnyTypeAnnotation
EmptyTypeAnnotation
NullLiteralTypeAnnotation
BigIntTypeAnnotation
SymbolTypeAnnotation
StringLiteralTypeAnnotation
NumberLiteralTypeAnnotation
BooleanLiteralTypeAnnotation
NullableTypeAnnotation
Fields
§
type_annotation: Box<TypeAnnotation>ObjectTypeAnnotation
UnionTypeAnnotation
Fields
§
types: Vec<TypeAnnotation>IntersectionTypeAnnotation
Fields
§
types: Vec<TypeAnnotation>GenericTypeAnnotation
TupleTypeAnnotation
Fields
§
element_types: Vec<TypeAnnotation>ArrayTypeAnnotation
Fields
§
element_type: Box<TypeAnnotation>TypeofTypeAnnotation
Fields
§
argument: Box<TypeAnnotation>Other
Implementations§
Trait Implementations§
Source§impl Clone for TypeAnnotation
impl Clone for TypeAnnotation
Source§fn clone(&self) -> TypeAnnotation
fn clone(&self) -> TypeAnnotation
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TypeAnnotation
impl Debug for TypeAnnotation
Source§impl<'de> Deserialize<'de> for TypeAnnotation
impl<'de> Deserialize<'de> for TypeAnnotation
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 TypeAnnotation
impl RefUnwindSafe for TypeAnnotation
impl Send for TypeAnnotation
impl Sync for TypeAnnotation
impl Unpin for TypeAnnotation
impl UnsafeUnpin for TypeAnnotation
impl UnwindSafe for TypeAnnotation
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