[−][src]Enum swc_ecma_ast::TsType
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]
Self: Debug,
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]
Self: Debug,
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]
Self: Debug,
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]
Self: Debug,
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]
Self: Debug,
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]
Self: Debug,
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]
Self: Debug,
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]
Self: Debug,
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]
Self: Debug,
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]
Self: Debug,
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]
Self: Debug,
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]
Self: Debug,
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]
Self: Debug,
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]
Self: Debug,
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]
Self: Debug,
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]
Self: Debug,
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]
Self: Debug,
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]
Self: Debug,
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]
Self: Debug,
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]
Self: Debug,
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]
fn deserialize<D>(Deserializer: D) -> Result<Self, D::Error> where
D: Deserializer<'de>,
[src]
D: Deserializer<'de>,
impl Eq for TsType
[src]
impl From<TsArrayType> for TsType
[src]
fn from(v: TsArrayType) -> Self
[src]
impl From<TsConditionalType> for TsType
[src]
fn from(v: TsConditionalType) -> Self
[src]
impl From<TsConstructorType> for TsType
[src]
fn from(t: TsConstructorType) -> Self
[src]
impl From<TsFnOrConstructorType> for TsType
[src]
fn from(v: TsFnOrConstructorType) -> Self
[src]
impl From<TsFnType> for TsType
[src]
impl From<TsImportType> for TsType
[src]
fn from(v: TsImportType) -> Self
[src]
impl From<TsIndexedAccessType> for TsType
[src]
fn from(v: TsIndexedAccessType) -> Self
[src]
impl From<TsInferType> for TsType
[src]
fn from(v: TsInferType) -> Self
[src]
impl From<TsIntersectionType> for TsType
[src]
fn from(t: TsIntersectionType) -> Self
[src]
impl From<TsKeywordType> for TsType
[src]
fn from(v: TsKeywordType) -> Self
[src]
impl From<TsLitType> for TsType
[src]
impl From<TsMappedType> for TsType
[src]
fn from(v: TsMappedType) -> Self
[src]
impl From<TsOptionalType> for TsType
[src]
fn from(v: TsOptionalType) -> Self
[src]
impl From<TsParenthesizedType> for TsType
[src]
fn from(v: TsParenthesizedType) -> Self
[src]
impl From<TsRestType> for TsType
[src]
fn from(v: TsRestType) -> Self
[src]
impl From<TsThisType> for TsType
[src]
fn from(v: TsThisType) -> Self
[src]
impl From<TsTupleType> for TsType
[src]
fn from(v: TsTupleType) -> Self
[src]
impl From<TsTypeLit> for TsType
[src]
impl From<TsTypeOperator> for TsType
[src]
fn from(v: TsTypeOperator) -> Self
[src]
impl From<TsTypePredicate> for TsType
[src]
fn from(v: TsTypePredicate) -> Self
[src]
impl From<TsTypeQuery> for TsType
[src]
fn from(v: TsTypeQuery) -> Self
[src]
impl From<TsTypeRef> for TsType
[src]
impl From<TsUnionOrIntersectionType> for TsType
[src]
fn from(v: TsUnionOrIntersectionType) -> Self
[src]
impl From<TsUnionType> for TsType
[src]
fn from(t: TsUnionType) -> Self
[src]
impl Hash for TsType
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl PartialEq<TsType> for TsType
[src]
impl Serialize for TsType
[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl Spanned for TsType
[src]
impl StructuralEq for TsType
[src]
impl StructuralPartialEq for TsType
[src]
Auto Trait Implementations
impl RefUnwindSafe for TsType
impl Send for TsType
impl Sync for TsType
impl Unpin for TsType
impl UnwindSafe for TsType
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Send for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Sync for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,