[][src]Enum swc_ecma_ast::TsType

pub enum TsType {
    TsKeywordType(TsKeywordType),
    TsThisType(TsThisType),
    TsFnOrConstructorType(TsFnOrConstructorType),
    TsTypeRef(TsTypeRef),
    TsTypeQuery(TsTypeQuery),
    TsTypeLit(TsTypeLit),
    TsArrayType(TsArrayType),
    TsTupleType(TsTupleType),
    TsOptionalType(TsOptionalType),
    TsRestType(TsRestType),
    TsUnionOrIntersectionType(TsUnionOrIntersectionType),
    TsConditionalType(TsConditionalType),
    TsInferType(TsInferType),
    TsParenthesizedType(TsParenthesizedType),
    TsTypeOperator(TsTypeOperator),
    TsIndexedAccessType(TsIndexedAccessType),
    TsMappedType(TsMappedType),
    TsLitType(TsLitType),
    TsTypePredicate(TsTypePredicate),
    TsImportType(TsImportType),
}

Variants

TsKeywordType(TsKeywordType)
TsThisType(TsThisType)
TsFnOrConstructorType(TsFnOrConstructorType)
TsTypeRef(TsTypeRef)
TsTypeQuery(TsTypeQuery)
TsTypeLit(TsTypeLit)
TsArrayType(TsArrayType)
TsTupleType(TsTupleType)
TsOptionalType(TsOptionalType)
TsRestType(TsRestType)
TsUnionOrIntersectionType(TsUnionOrIntersectionType)
TsConditionalType(TsConditionalType)
TsInferType(TsInferType)
TsParenthesizedType(TsParenthesizedType)
TsTypeOperator(TsTypeOperator)
TsIndexedAccessType(TsIndexedAccessType)
TsMappedType(TsMappedType)
TsLitType(TsLitType)
TsTypePredicate(TsTypePredicate)
TsImportType(TsImportType)

Implementations

impl TsType[src]

pub fn is_ts_keyword_type(&self) -> bool[src]

Returns true if self is of variant TsKeywordType.

pub fn expect_ts_keyword_type(self) -> TsKeywordType where
    Self: Debug
[src]

Unwraps the value, yielding the content of TsKeywordType.

Panics

Panics if the value is not TsKeywordType, with a panic message including the content of self.

pub fn ts_keyword_type(self) -> Option<TsKeywordType>[src]

Returns Some if self is of variant TsKeywordType, and None otherwise.

pub fn is_ts_this_type(&self) -> bool[src]

Returns true if self is of variant TsThisType.

pub fn expect_ts_this_type(self) -> TsThisType where
    Self: Debug
[src]

Unwraps the value, yielding the content of TsThisType.

Panics

Panics if the value is not TsThisType, with a panic message including the content of self.

pub fn ts_this_type(self) -> Option<TsThisType>[src]

Returns Some if self is of variant TsThisType, and None otherwise.

pub fn is_ts_fn_or_constructor_type(&self) -> bool[src]

Returns true if self is of variant TsFnOrConstructorType.

pub fn expect_ts_fn_or_constructor_type(self) -> TsFnOrConstructorType where
    Self: Debug
[src]

Unwraps the value, yielding the content of TsFnOrConstructorType.

Panics

Panics if the value is not TsFnOrConstructorType, with a panic message including the content of self.

pub fn ts_fn_or_constructor_type(self) -> Option<TsFnOrConstructorType>[src]

Returns Some if self is of variant TsFnOrConstructorType, and None otherwise.

pub fn is_ts_type_ref(&self) -> bool[src]

Returns true if self is of variant TsTypeRef.

pub fn expect_ts_type_ref(self) -> TsTypeRef where
    Self: Debug
[src]

Unwraps the value, yielding the content of TsTypeRef.

Panics

Panics if the value is not TsTypeRef, with a panic message including the content of self.

pub fn ts_type_ref(self) -> Option<TsTypeRef>[src]

Returns Some if self is of variant TsTypeRef, and None otherwise.

pub fn is_ts_type_query(&self) -> bool[src]

Returns true if self is of variant TsTypeQuery.

pub fn expect_ts_type_query(self) -> TsTypeQuery where
    Self: Debug
[src]

Unwraps the value, yielding the content of TsTypeQuery.

Panics

Panics if the value is not TsTypeQuery, with a panic message including the content of self.

pub fn ts_type_query(self) -> Option<TsTypeQuery>[src]

Returns Some if self is of variant TsTypeQuery, and None otherwise.

pub fn is_ts_type_lit(&self) -> bool[src]

Returns true if self is of variant TsTypeLit.

pub fn expect_ts_type_lit(self) -> TsTypeLit where
    Self: Debug
[src]

Unwraps the value, yielding the content of TsTypeLit.

Panics

Panics if the value is not TsTypeLit, with a panic message including the content of self.

pub fn ts_type_lit(self) -> Option<TsTypeLit>[src]

Returns Some if self is of variant TsTypeLit, and None otherwise.

pub fn is_ts_array_type(&self) -> bool[src]

Returns true if self is of variant TsArrayType.

pub fn expect_ts_array_type(self) -> TsArrayType where
    Self: Debug
[src]

Unwraps the value, yielding the content of TsArrayType.

Panics

Panics if the value is not TsArrayType, with a panic message including the content of self.

pub fn ts_array_type(self) -> Option<TsArrayType>[src]

Returns Some if self is of variant TsArrayType, and None otherwise.

pub fn is_ts_tuple_type(&self) -> bool[src]

Returns true if self is of variant TsTupleType.

pub fn expect_ts_tuple_type(self) -> TsTupleType where
    Self: Debug
[src]

Unwraps the value, yielding the content of TsTupleType.

Panics

Panics if the value is not TsTupleType, with a panic message including the content of self.

pub fn ts_tuple_type(self) -> Option<TsTupleType>[src]

Returns Some if self is of variant TsTupleType, and None otherwise.

pub fn is_ts_optional_type(&self) -> bool[src]

Returns true if self is of variant TsOptionalType.

pub fn expect_ts_optional_type(self) -> TsOptionalType where
    Self: Debug
[src]

Unwraps the value, yielding the content of TsOptionalType.

Panics

Panics if the value is not TsOptionalType, with a panic message including the content of self.

pub fn ts_optional_type(self) -> Option<TsOptionalType>[src]

Returns Some if self is of variant TsOptionalType, and None otherwise.

pub fn is_ts_rest_type(&self) -> bool[src]

Returns true if self is of variant TsRestType.

pub fn expect_ts_rest_type(self) -> TsRestType where
    Self: Debug
[src]

Unwraps the value, yielding the content of TsRestType.

Panics

Panics if the value is not TsRestType, with a panic message including the content of self.

pub fn ts_rest_type(self) -> Option<TsRestType>[src]

Returns Some if self is of variant TsRestType, and None otherwise.

pub fn is_ts_union_or_intersection_type(&self) -> bool[src]

Returns true if self is of variant TsUnionOrIntersectionType.

pub fn expect_ts_union_or_intersection_type(self) -> TsUnionOrIntersectionType where
    Self: Debug
[src]

Unwraps the value, yielding the content of TsUnionOrIntersectionType.

Panics

Panics if the value is not TsUnionOrIntersectionType, with a panic message including the content of self.

pub fn ts_union_or_intersection_type(self) -> Option<TsUnionOrIntersectionType>[src]

Returns Some if self is of variant TsUnionOrIntersectionType, and None otherwise.

pub fn is_ts_conditional_type(&self) -> bool[src]

Returns true if self is of variant TsConditionalType.

pub fn expect_ts_conditional_type(self) -> TsConditionalType where
    Self: Debug
[src]

Unwraps the value, yielding the content of TsConditionalType.

Panics

Panics if the value is not TsConditionalType, with a panic message including the content of self.

pub fn ts_conditional_type(self) -> Option<TsConditionalType>[src]

Returns Some if self is of variant TsConditionalType, and None otherwise.

pub fn is_ts_infer_type(&self) -> bool[src]

Returns true if self is of variant TsInferType.

pub fn expect_ts_infer_type(self) -> TsInferType where
    Self: Debug
[src]

Unwraps the value, yielding the content of TsInferType.

Panics

Panics if the value is not TsInferType, with a panic message including the content of self.

pub fn ts_infer_type(self) -> Option<TsInferType>[src]

Returns Some if self is of variant TsInferType, and None otherwise.

pub fn is_ts_parenthesized_type(&self) -> bool[src]

Returns true if self is of variant TsParenthesizedType.

pub fn expect_ts_parenthesized_type(self) -> TsParenthesizedType where
    Self: Debug
[src]

Unwraps the value, yielding the content of TsParenthesizedType.

Panics

Panics if the value is not TsParenthesizedType, with a panic message including the content of self.

pub fn ts_parenthesized_type(self) -> Option<TsParenthesizedType>[src]

Returns Some if self is of variant TsParenthesizedType, and None otherwise.

pub fn is_ts_type_operator(&self) -> bool[src]

Returns true if self is of variant TsTypeOperator.

pub fn expect_ts_type_operator(self) -> TsTypeOperator where
    Self: Debug
[src]

Unwraps the value, yielding the content of TsTypeOperator.

Panics

Panics if the value is not TsTypeOperator, with a panic message including the content of self.

pub fn ts_type_operator(self) -> Option<TsTypeOperator>[src]

Returns Some if self is of variant TsTypeOperator, and None otherwise.

pub fn is_ts_indexed_access_type(&self) -> bool[src]

Returns true if self is of variant TsIndexedAccessType.

pub fn expect_ts_indexed_access_type(self) -> TsIndexedAccessType where
    Self: Debug
[src]

Unwraps the value, yielding the content of TsIndexedAccessType.

Panics

Panics if the value is not TsIndexedAccessType, with a panic message including the content of self.

pub fn ts_indexed_access_type(self) -> Option<TsIndexedAccessType>[src]

Returns Some if self is of variant TsIndexedAccessType, and None otherwise.

pub fn is_ts_mapped_type(&self) -> bool[src]

Returns true if self is of variant TsMappedType.

pub fn expect_ts_mapped_type(self) -> TsMappedType where
    Self: Debug
[src]

Unwraps the value, yielding the content of TsMappedType.

Panics

Panics if the value is not TsMappedType, with a panic message including the content of self.

pub fn ts_mapped_type(self) -> Option<TsMappedType>[src]

Returns Some if self is of variant TsMappedType, and None otherwise.

pub fn is_ts_lit_type(&self) -> bool[src]

Returns true if self is of variant TsLitType.

pub fn expect_ts_lit_type(self) -> TsLitType where
    Self: Debug
[src]

Unwraps the value, yielding the content of TsLitType.

Panics

Panics if the value is not TsLitType, with a panic message including the content of self.

pub fn ts_lit_type(self) -> Option<TsLitType>[src]

Returns Some if self is of variant TsLitType, and None otherwise.

pub fn is_ts_type_predicate(&self) -> bool[src]

Returns true if self is of variant TsTypePredicate.

pub fn expect_ts_type_predicate(self) -> TsTypePredicate where
    Self: Debug
[src]

Unwraps the value, yielding the content of TsTypePredicate.

Panics

Panics if the value is not TsTypePredicate, with a panic message including the content of self.

pub fn ts_type_predicate(self) -> Option<TsTypePredicate>[src]

Returns Some if self is of variant TsTypePredicate, and None otherwise.

pub fn is_ts_import_type(&self) -> bool[src]

Returns true if self is of variant TsImportType.

pub fn expect_ts_import_type(self) -> TsImportType where
    Self: Debug
[src]

Unwraps the value, yielding the content of TsImportType.

Panics

Panics if the value is not TsImportType, with a panic message including the content of self.

pub fn ts_import_type(self) -> Option<TsImportType>[src]

Returns Some if self is of variant TsImportType, and None otherwise.

Trait Implementations

impl Clone for TsType[src]

impl Debug for TsType[src]

impl<'de> Deserialize<'de> for TsType[src]

impl Eq for TsType[src]

impl EqIgnoreSpan for TsType[src]

impl From<TsArrayType> for TsType[src]

impl From<TsConditionalType> for TsType[src]

impl From<TsConstructorType> for TsType[src]

impl From<TsFnOrConstructorType> for TsType[src]

impl From<TsFnType> for TsType[src]

impl From<TsImportType> for TsType[src]

impl From<TsIndexedAccessType> for TsType[src]

impl From<TsInferType> for TsType[src]

impl From<TsIntersectionType> for TsType[src]

impl From<TsKeywordType> for TsType[src]

impl From<TsLitType> for TsType[src]

impl From<TsMappedType> for TsType[src]

impl From<TsOptionalType> for TsType[src]

impl From<TsParenthesizedType> for TsType[src]

impl From<TsRestType> for TsType[src]

impl From<TsThisType> for TsType[src]

impl From<TsTupleType> for TsType[src]

impl From<TsTypeLit> for TsType[src]

impl From<TsTypeOperator> for TsType[src]

impl From<TsTypePredicate> for TsType[src]

impl From<TsTypeQuery> for TsType[src]

impl From<TsTypeRef> for TsType[src]

impl From<TsUnionOrIntersectionType> for TsType[src]

impl From<TsUnionType> for TsType[src]

impl Hash for TsType[src]

impl PartialEq<TsType> for TsType[src]

impl Serialize for TsType[src]

impl Spanned for TsType[src]

impl StructuralEq for TsType[src]

impl StructuralPartialEq for TsType[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Send for T where
    T: ?Sized
[src]

impl<T> Sync for T where
    T: ?Sized
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.