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