#[repr(C)]pub struct TSTypeAssertion<'gc> {
pub metadata: NodeMetadata<'gc>,
pub type_annotation: &'gc Node<'gc>,
pub expression: &'gc Node<'gc>,
}Expand description
The TSTypeAssertion AST node.
Fields§
§metadata: NodeMetadata<'gc>Source range, debug location, paren count, and node id.
type_annotation: &'gc Node<'gc>ESTree typeAnnotation property.
expression: &'gc Node<'gc>ESTree expression property.
Implementations§
Source§impl<'gc> TSTypeAssertion<'gc>
impl<'gc> TSTypeAssertion<'gc>
Sourcepub fn new(
metadata: NodeMetadata<'gc>,
type_annotation: &'gc Node<'gc>,
expression: &'gc Node<'gc>,
) -> Self
pub fn new( metadata: NodeMetadata<'gc>, type_annotation: &'gc Node<'gc>, expression: &'gc Node<'gc>, ) -> Self
Build TSTypeAssertion from its metadata and ESTree.def fields.
Trait Implementations§
Auto Trait Implementations§
impl<'gc> !Freeze for TSTypeAssertion<'gc>
impl<'gc> !RefUnwindSafe for TSTypeAssertion<'gc>
impl<'gc> !Send for TSTypeAssertion<'gc>
impl<'gc> !Sync for TSTypeAssertion<'gc>
impl<'gc> !UnwindSafe for TSTypeAssertion<'gc>
impl<'gc> Unpin for TSTypeAssertion<'gc>
impl<'gc> UnsafeUnpin for TSTypeAssertion<'gc>
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