Checked Import Attributes and Assertions
TL;DR
import X from Y with { type: Z }
のタイプがチェックされるようになった。
import * as ns from "foo" with { type: "not-json" }; // ERROR
type
の文字列は ImportAttributes
で宣言される。
interface ImportAttributes {
type "json";
}
PreviousSupport for require() calls in --moduleResolution bundler and --module preserveNextQuick Fix for Adding Missing Parameters
Last updated