mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-04-21 16:01:40 -05:00
Allow dynamic import attributes in --module preserve (#59005)
This commit is contained in:
12
tests/cases/compiler/modulePreserve5.ts
Normal file
12
tests/cases/compiler/modulePreserve5.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
// @module: preserve
|
||||
// @target: esnext
|
||||
// @resolveJsonModule: true
|
||||
// @noEmit: true
|
||||
// @noTypesAndSymbols: true
|
||||
|
||||
// @Filename: data.json
|
||||
{}
|
||||
|
||||
// @Filename: main.ts
|
||||
import data1 from "./data.json" with { type: "json" };
|
||||
const data2 = await import("./data.json", { with: { type: "json" } });
|
||||
Reference in New Issue
Block a user