-
Notifications
You must be signed in to change notification settings - Fork 13.2k
Closed
Labels
DocsThe issue relates to how you learn TypeScriptThe issue relates to how you learn TypeScript
Milestone
Description
π Search Terms
TS2823 import attributes node16 module
π Version & Regression Information
- This is the behavior in every version I tried, and I reviewed the FAQ for entries about 5.6.3 and dev
β― Playground Link
π» Code
import packageJson from './package.json' with { type: 'json' }π Actual behavior
We get the following error:
TS2823: Import attributes are only supported when the --module option is set to esnext, nodenext, or preserve
π Expected behavior
The docs state the following:
nodenext: Currently identical to node16, but will be a moving target reflecting the latest Node.js versions as Node.jsβs module system evolves.
Either the syntax should be supported on node16 or the documentation needs to be updated.
Additional information about the issue
No response
kirkwaiblinger, acidoxee, silverwind and unional
Metadata
Metadata
Assignees
Labels
DocsThe issue relates to how you learn TypeScriptThe issue relates to how you learn TypeScript