mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
28 lines
2.2 KiB
Diff
28 lines
2.2 KiB
Diff
--- old.nodeModulesJson(module=node16).errors.txt
|
|
+++ new.nodeModulesJson(module=node16).errors.txt
|
|
@@= skipped -1, +1 lines =@@
|
|
/loosey.cts(6,9): error TS2339: Property 'default' does not exist on type '{ version: number; }'.
|
|
/main.mts(5,36): error TS2823: Import attributes are only supported when the '--module' option is set to 'esnext', 'node18', 'node20', 'nodenext', or 'preserve'.
|
|
/main.mts(6,52): error TS2823: Import attributes are only supported when the '--module' option is set to 'esnext', 'node18', 'node20', 'nodenext', or 'preserve'.
|
|
-/main.mts(9,47): error TS2823: Import attributes are only supported when the '--module' option is set to 'esnext', 'node18', 'node20', 'nodenext', or 'preserve'.
|
|
/main.mts(10,10): error TS1544: Named imports from a JSON file into an ECMAScript module are not allowed when 'module' is set to 'Node16'.
|
|
/main.mts(10,41): error TS2823: Import attributes are only supported when the '--module' option is set to 'esnext', 'node18', 'node20', 'nodenext', or 'preserve'.
|
|
/main.mts(11,42): error TS2823: Import attributes are only supported when the '--module' option is set to 'esnext', 'node18', 'node20', 'nodenext', or 'preserve'.
|
|
@@= skipped -41, +40 lines =@@
|
|
"version": 1
|
|
}
|
|
|
|
-==== /main.mts (7 errors) ====
|
|
+==== /main.mts (6 errors) ====
|
|
import { oops } from "not.json"; // Ok
|
|
import moreOops from "actually-json"; // Error in nodenext
|
|
import typed from "actually-json/typed"; // Error in nodenext
|
|
@@= skipped -14, +14 lines =@@
|
|
import config2 from "./config.json"; // Error in nodenext, no attribute
|
|
import type config2Type from "./config.json"; // Ok, type-only
|
|
import type config2Type2 from "./config.json" with { type: "json" }; // Error, import attributes not allowed on type-only imports
|
|
- ~~~~~~~~~~~~~~~~~~~~~
|
|
-!!! error TS2823: Import attributes are only supported when the '--module' option is set to 'esnext', 'node18', 'node20', 'nodenext', or 'preserve'.
|
|
import { version } from "./config.json" with { type: "json" }; // Error, named import
|
|
~~~~~~~
|
|
!!! error TS1544: Named imports from a JSON file into an ECMAScript module are not allowed when 'module' is set to 'Node16'.
|