Closed MasatoDev closed 1 month ago
Currently only BindingPatternKind::BindingIdentifier is supported for handling class arguments.
BindingPatternKind::BindingIdentifier
pub enum BindingPatternKind<'a> { /// `const a = 1` BindingIdentifier(Box<'a, BindingIdentifier<'a>>), /// `const {a} = 1` ObjectPattern(Box<'a, ObjectPattern<'a>>), /// `const [a] = 1` ArrayPattern(Box<'a, ArrayPattern<'a>>), /// A defaulted binding pattern, i.e.: /// `const {a = 1} = 1` /// the assignment pattern is `a = 1` /// it has an inner left that has a BindingIdentifier AssignmentPattern(Box<'a, AssignmentPattern<'a>>), }
However, in order to support the following notations, ObjectPattern and others must also be supported.
ObjectPattern
class ClassObj { name: string; chips: ComplexInterfaceChips; constructor( { name, chips }: { name: string; chips: ComplexInterfaceChips }, ) { this.name = name; this.chips = chips; } } export default ClassObj;
Currently only
BindingPatternKind::BindingIdentifier
is supported for handling class arguments.However, in order to support the following notations,
ObjectPattern
and others must also be supported.