Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions crates/oxc_ast/src/ast/js.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1583,8 +1583,8 @@ pub struct ObjectPattern<'a> {
#[generate_derive(CloneIn, Dummy, TakeIn, GetSpan, GetSpanMut, ContentEq, ESTree)]
#[estree(
rename = "Property",
add_fields(method = False, kind = Init),
field_order(span, method, shorthand, computed, key, value, kind),
add_fields(method = False, kind = Init, optional = TsFalse),
field_order(span, method, shorthand, computed, key, value, kind, optional),
)]
pub struct BindingProperty<'a> {
pub span: Span,
Expand Down
1 change: 1 addition & 0 deletions crates/oxc_ast/src/generated/derive_estree.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1302,6 +1302,7 @@ impl ESTree for BindingProperty<'_> {
state.serialize_field("key", &self.key);
state.serialize_field("value", &self.value);
state.serialize_field("kind", &crate::serialize::Init(self));
state.serialize_ts_field("optional", &crate::serialize::TsFalse(self));
state.end();
}
}
Expand Down
1 change: 1 addition & 0 deletions napi/parser/deserialize-ts.js
Original file line number Diff line number Diff line change
Expand Up @@ -757,6 +757,7 @@ function deserializeBindingProperty(pos) {
key: deserializePropertyKey(pos + 8),
value: deserializeBindingPattern(pos + 24),
kind: 'init',
optional: false,
};
}

Expand Down
1 change: 1 addition & 0 deletions npm/oxc-types/types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -534,6 +534,7 @@ export interface BindingProperty extends Span {
key: PropertyKey;
value: BindingPattern;
kind: 'init';
optional?: false;
}

export interface ArrayPattern extends Span {
Expand Down
Loading
Loading