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