Commit 724f89e
committed
Use
From the TypeScript 5.9 release candidate blog post[1]:
> TypeScript provides several `node*` options for the `--module` and
> `--moduleResolution` settings. Most recently, `--module nodenext` has
> supported the ability to `require()` ECMAScript modules from CommonJS
> modules, and correctly rejects import assertions (in favor of the
> standards-bound import attributes[2]).
> TypeScript 5.9 brings a stable option for these settings called
> `node20`, intended to model the behavior of Node.js v20. This option
> is unlikely to have new behaviors in the future, unlike
> `--module nodenext` or `--moduleResolution nodenext`. Also unlike
> `nodenext`, specifying `--module node20` will imply `--target es2023`
> unless otherwise configured. `--module nodenext`, on the other hand,
> implies the floating `--target esnext`.
> For more information, take a look at the implementation here[3].
[1]: https://devblogs.microsoft.com/typescript/announcing-typescript-5-9-rc/#support-for---module-node20
[2]: https://github.com/tc39/proposal-import-attributes
[3]: microsoft/TypeScript#61805module: node20 TypeScript compiler option1 parent 518148e commit 724f89e
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
0 commit comments