-
Notifications
You must be signed in to change notification settings - Fork 2k
Expand file tree
/
Copy pathimport-attributes.ts
More file actions
24 lines (18 loc) · 917 Bytes
/
import-attributes.ts
File metadata and controls
24 lines (18 loc) · 917 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import "module" with { type: "json" };
import * as v1 from "module" with { type: "json" };
import { v2 } from "module" with { type: "json" };
import v3 from "module" with { type: "json" };
export { v4 } from "module" with { type: "json" };
export * from "module" with { type: "json" };
export * as v5 from "module" with { type: "json" };
const v6 = import("module", { "with": { type: "json" } });
import "module"; // missing semicolon
assert({ type: "json" }); // function call, not import assertion
import "module" assert { type: "json" };
import * as v1 from "module" assert { type: "json" };
import { v2 } from "module" assert { type: "json" };
import v3 from "module" assert { type: "json" };
export { v4 } from "module" assert { type: "json" };
export * from "module" assert { type: "json" };
export * as v5 from "module" assert { type: "json" };
const v6 = import("module", { assert: { type: "json" } });