Skip to content

Commit f5877ab

Browse files
xtuclittledan
authored andcommitted
add export from example
1 parent e547311 commit f5877ab

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,14 @@ import json from "./foo.json" assert { type: "json" } with { transformA: "value"
6969

7070
The `assert` keyword is designed to match the check-only semantics. As shown by the example above, one could imagine a new follow-up proposal that uses `with` for transformations.
7171

72+
### re-export statements
73+
74+
Similar to import statements, the ExportDeclaration, when re-exporting from another module, would allow any arbitrary assertions after the `assert` keyword.
75+
76+
```mjs
77+
export { val } from './foo.js' assert { type: "javascript" };
78+
```
79+
7280
### dynamic import()
7381

7482
The `import()` pseudo-function would allow import assertions to be indicated in an options bag in the second argument.

0 commit comments

Comments
 (0)