mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
48 lines
1.1 KiB
Diff
48 lines
1.1 KiB
Diff
--- old.jsDeclarationsJson(target=es2015).js
|
|
+++ new.jsDeclarationsJson(target=es2015).js
|
|
@@= skipped -27, +27 lines =@@
|
|
|
|
//// [index.d.ts]
|
|
export = j;
|
|
-declare const j: {
|
|
- x: number;
|
|
- y: number;
|
|
- obj: {
|
|
- items: ({
|
|
- x: number;
|
|
- y?: undefined;
|
|
- err?: undefined;
|
|
- } | {
|
|
- x: number;
|
|
- y: number;
|
|
- err?: undefined;
|
|
- } | {
|
|
- y?: undefined;
|
|
- x: number;
|
|
- err: boolean;
|
|
- })[];
|
|
- };
|
|
-};
|
|
+import j = require("./obj.json");
|
|
+
|
|
+
|
|
+//// [DtsFileErrors]
|
|
+
|
|
+
|
|
+out/index.d.ts(2,20): error TS2307: Cannot find module './obj.json' or its corresponding type declarations.
|
|
+
|
|
+
|
|
+==== out/index.d.ts (1 errors) ====
|
|
+ export = j;
|
|
+ import j = require("./obj.json");
|
|
+ ~~~~~~~~~~~~
|
|
+!!! error TS2307: Cannot find module './obj.json' or its corresponding type declarations.
|
|
+
|
|
+==== obj.json (0 errors) ====
|
|
+ {
|
|
+ "x": 12,
|
|
+ "y": 12,
|
|
+ "obj": {
|
|
+ "items": [{"x": 12}, {"x": 12, "y": 12}, {"x": 0}, {"x": -1, "err": true}]
|
|
+ }
|
|
+ }
|