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) {
3563
3563
protected Expression parseImportOrExportAssertionAndSemicolon () {
3564
3564
Expression result = null ;
3565
3565
if (!this .eagerlyTrySemicolon ()) {
3566
- this .expectContextual ("assert" );
3566
+ if (!this .eatContextual ("assert" )) {
3567
+ this .expect (TokenType ._with );
3568
+ }
3567
3569
result = this .parseObj (false , null );
3568
3570
this .semicolon ();
3569
3571
}
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" } ;
5
5
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" } ;
9
9
10
- const v6 = import ( "module" , { assert : { type : "json" } } ) ;
10
+ const v6 = import ( "module" , { with : { type : "json" } } ) ;
11
11
12
12
import "module" // missing semicolon
13
13
assert ( { type : "json" } ) ; // function call, not import assertion
You can’t perform that action at this time.
0 commit comments