-
Notifications
You must be signed in to change notification settings - Fork 13k
Open
Labels
Breaking ChangeWould introduce errors in existing codeWould introduce errors in existing codeCommittedThe team has roadmapped this issueThe team has roadmapped this issueSuggestionAn idea for TypeScriptAn idea for TypeScript
Milestone
Description
Import assertions
import * as blah from "./blahb.json" asserts { type: "json" }
are non-standard! They were on the standards track, but were replaced with the more capable import attributes
import * as blah from "./blahb.json" with { type: "json" }
It's subtle, but the difference is the keyword asserts
versus with
.
TypeScript 7.0 will only support import attributes, not import assertions. TypeScript 6.0 will deprecate usage of import assertions, meaning an error will be issued on them in the absence of ignoreDeprecations
. The workaround is easy: switch to import attributes.
Metadata
Metadata
Assignees
Labels
Breaking ChangeWould introduce errors in existing codeWould introduce errors in existing codeCommittedThe team has roadmapped this issueThe team has roadmapped this issueSuggestionAn idea for TypeScriptAn idea for TypeScript