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
1 change: 1 addition & 0 deletions crates/oxc_ast/src/ast/js.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1547,6 +1547,7 @@ pub enum BindingPatternKind<'a> {
#[ast(visit)]
#[derive(Debug)]
#[generate_derive(CloneIn, GetSpan, GetSpanMut, ContentEq, ESTree)]
#[estree(add_fields(decorators = TsEmptyArray))]
pub struct AssignmentPattern<'a> {
pub span: Span,
pub left: BindingPattern<'a>,
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 @@ -1279,6 +1279,7 @@ impl ESTree for AssignmentPattern<'_> {
state.serialize_field("end", &self.span.end);
state.serialize_field("left", &self.left);
state.serialize_field("right", &self.right);
state.serialize_ts_field("decorators", &crate::serialize::TsEmptyArray(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 @@ -720,6 +720,7 @@ function deserializeAssignmentPattern(pos) {
end: deserializeU32(pos + 4),
left: deserializeBindingPattern(pos + 8),
right: deserializeExpression(pos + 40),
decorators: [],
};
}

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 @@ -516,6 +516,7 @@ export interface AssignmentPattern extends Span {
type: 'AssignmentPattern';
left: BindingPattern;
right: Expression;
decorators?: [];
}

export interface ObjectPattern extends Span {
Expand Down
6 changes: 1 addition & 5 deletions tasks/coverage/snapshots/estree_typescript.snap
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ commit: 15392346

estree_typescript Summary:
AST Parsed : 10623/10725 (99.05%)
Positive Passed: 1979/10725 (18.45%)
Positive Passed: 1983/10725 (18.49%)
Mismatch: tasks/coverage/typescript/tests/cases/compiler/APILibCheck.ts
Mismatch: tasks/coverage/typescript/tests/cases/compiler/APISample_Watch.ts
Mismatch: tasks/coverage/typescript/tests/cases/compiler/APISample_WatchWithDefaults.ts
Expand Down Expand Up @@ -2738,7 +2738,6 @@ Mismatch: tasks/coverage/typescript/tests/cases/compiler/inheritedOverloadedSpec
Mismatch: tasks/coverage/typescript/tests/cases/compiler/inheritedStringIndexersFromDifferentBaseTypes.ts
Mismatch: tasks/coverage/typescript/tests/cases/compiler/inheritedStringIndexersFromDifferentBaseTypes2.ts
Mismatch: tasks/coverage/typescript/tests/cases/compiler/initializePropertiesWithRenamedLet.ts
Mismatch: tasks/coverage/typescript/tests/cases/compiler/initializedDestructuringAssignmentTypes.ts
Mismatch: tasks/coverage/typescript/tests/cases/compiler/initializedParameterBeforeNonoptionalNotOptional.ts
Mismatch: tasks/coverage/typescript/tests/cases/compiler/initializerWithThisPropertyAccess.ts
Mismatch: tasks/coverage/typescript/tests/cases/compiler/initializersInAmbientEnums.ts
Expand Down Expand Up @@ -8767,15 +8766,12 @@ Mismatch: tasks/coverage/typescript/tests/cases/conformance/statements/for-ofSta
Mismatch: tasks/coverage/typescript/tests/cases/conformance/statements/for-ofStatements/ES5For-of19.ts
Expect to Parse: tasks/coverage/typescript/tests/cases/conformance/statements/for-ofStatements/ES5For-of20.ts
Missing initializer in const declaration
Mismatch: tasks/coverage/typescript/tests/cases/conformance/statements/for-ofStatements/ES5For-of26.ts
Mismatch: tasks/coverage/typescript/tests/cases/conformance/statements/for-ofStatements/ES5For-of27.ts
Mismatch: tasks/coverage/typescript/tests/cases/conformance/statements/for-ofStatements/ES5For-of28.ts
Mismatch: tasks/coverage/typescript/tests/cases/conformance/statements/for-ofStatements/ES5For-of29.ts
Mismatch: tasks/coverage/typescript/tests/cases/conformance/statements/for-ofStatements/ES5For-of30.ts
Mismatch: tasks/coverage/typescript/tests/cases/conformance/statements/for-ofStatements/ES5For-of31.ts
Mismatch: tasks/coverage/typescript/tests/cases/conformance/statements/for-ofStatements/ES5For-of34.ts
Mismatch: tasks/coverage/typescript/tests/cases/conformance/statements/for-ofStatements/ES5For-of35.ts
Mismatch: tasks/coverage/typescript/tests/cases/conformance/statements/for-ofStatements/ES5For-of36.ts
Mismatch: tasks/coverage/typescript/tests/cases/conformance/statements/for-ofStatements/ES5For-of37.ts
Mismatch: tasks/coverage/typescript/tests/cases/conformance/statements/for-ofStatements/ES5For-of8.ts
Mismatch: tasks/coverage/typescript/tests/cases/conformance/statements/for-ofStatements/ES5For-of9.ts
Expand Down