pub struct ParamDecl {
pub name: Ident,
pub ty: Option<TypeAnnotation>,
pub default: Option<ExprId>,
pub optional: bool,
pub pattern: Option<Binding>,
pub rest: bool,
pub modifiers: Option<ClassModifiers>,
}Expand description
Source-syntax parameter. Fully-resolved form is crate::Param.
Fields§
§name: Ident§ty: Option<TypeAnnotation>§default: Option<ExprId>§optional: boolDeclared with ?. A parameter with a default may be omitted too;
ParamDecl::is_omittable asks that.
pattern: Option<Binding>Cleared by lower_patterns; always None post-lowering.
rest: bool§modifiers: Option<ClassModifiers>Some for a constructor parameter property (constructor(public x: T)):
declares and auto-assigns a field. None for an ordinary parameter.
Implementations§
Trait Implementations§
impl StructuralPartialEq for ParamDecl
Auto Trait Implementations§
impl Freeze for ParamDecl
impl RefUnwindSafe for ParamDecl
impl Send for ParamDecl
impl Sync for ParamDecl
impl Unpin for ParamDecl
impl UnsafeUnpin for ParamDecl
impl UnwindSafe for ParamDecl
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