File tree Expand file tree Collapse file tree 3 files changed +221
-219
lines changed
Expand file tree Collapse file tree 3 files changed +221
-219
lines changed Original file line number Diff line number Diff line change @@ -3563,7 +3563,9 @@ protected Statement parseImport(Position startLoc) {
35633563 protected Expression parseImportOrExportAssertionAndSemicolon () {
35643564 Expression result = null ;
35653565 if (!this .eagerlyTrySemicolon ()) {
3566- this .expectContextual ("assert" );
3566+ if (!this .eatContextual ("assert" )) {
3567+ this .expect (TokenType ._with );
3568+ }
35673569 result = this .parseObj (false , null );
35683570 this .semicolon ();
35693571 }
Original file line number Diff line number Diff line change 1- import "module" assert { type : "json" } ;
2- import * as v1 from "module" assert { type : "json " } ;
3- import { v2 } from "module" assert { type : "json " } ;
4- import v3 from "module" assert { type : "json " } ;
1+ import "module" with { type : "json" } ;
2+ import * as v1 from "module" with { type : "json" } ;
3+ import { v2 } from "module" with { type : "json" } ;
4+ import v3 from "module" with { type : "json" } ;
55
6- export { v4 } from "module" assert { type: "json" } ;
7- export * from "module" assert { type: "json" } ;
8- export * as v5 from "module" assert { type: "json" } ;
6+ export { v4 } from "module" with { type: "json" } ;
7+ export * from "module" with { type: "json" } ;
8+ export * as v5 from "module" with { type: "json" } ;
99
10- const v6 = import ( "module" , { assert : { type : "json" } } ) ;
10+ const v6 = import ( "module" , { with : { type : "json" } } ) ;
1111
1212import "module" // missing semicolon
1313assert ( { type : "json" } ) ; // function call, not import assertion
You can’t perform that action at this time.
0 commit comments