|
| 1 | +Input:: |
| 2 | +//// [/a/lib/lib.d.ts] |
| 3 | +/// <reference no-default-lib="true"/> |
| 4 | +interface Boolean {} |
| 5 | +interface Function {} |
| 6 | +interface CallableFunction {} |
| 7 | +interface NewableFunction {} |
| 8 | +interface IArguments {} |
| 9 | +interface Number { toExponential: any; } |
| 10 | +interface Object {} |
| 11 | +interface RegExp {} |
| 12 | +interface String { charAt: any; } |
| 13 | +interface Array<T> { length: number; [n: number]: T; } |
| 14 | +interface ReadonlyArray<T> {} |
| 15 | +declare const console: { log(msg: any): void; }; |
| 16 | + |
| 17 | +//// [/users/username/projects/project/node_modules/tslib/index.d.ts] |
| 18 | +export function __assign(...args: any[]): any; |
| 19 | + |
| 20 | +//// [/users/username/projects/project/node_modules/tslib/package.json] |
| 21 | +{"name":"tslib","version":"0.0.1"} |
| 22 | + |
| 23 | +//// [/users/username/projects/project/index.tsx] |
| 24 | +export const x = {...{}}; |
| 25 | + |
| 26 | +//// [/users/username/projects/project/tsconfig.json] |
| 27 | +{"compilerOptions":{"importHelpers":true}} |
| 28 | + |
| 29 | + |
| 30 | +/a/lib/tsc.js -i |
| 31 | +Output:: |
| 32 | + |
| 33 | + |
| 34 | +Program root files: ["/users/username/projects/project/index.tsx"] |
| 35 | +Program options: {"importHelpers":true,"incremental":true,"configFilePath":"/users/username/projects/project/tsconfig.json"} |
| 36 | +Program structureReused: Not |
| 37 | +Program files:: |
| 38 | +/a/lib/lib.d.ts |
| 39 | +/users/username/projects/project/node_modules/tslib/index.d.ts |
| 40 | +/users/username/projects/project/index.tsx |
| 41 | + |
| 42 | +Semantic diagnostics in builder refreshed for:: |
| 43 | +/a/lib/lib.d.ts |
| 44 | +/users/username/projects/project/node_modules/tslib/index.d.ts |
| 45 | +/users/username/projects/project/index.tsx |
| 46 | + |
| 47 | +WatchedFiles:: |
| 48 | + |
| 49 | +FsWatches:: |
| 50 | + |
| 51 | +FsWatchesRecursive:: |
| 52 | + |
| 53 | +exitCode:: ExitStatus.Success |
| 54 | + |
| 55 | +//// [/users/username/projects/project/index.js] |
| 56 | +"use strict"; |
| 57 | +exports.__esModule = true; |
| 58 | +exports.x = void 0; |
| 59 | +var tslib_1 = require("tslib"); |
| 60 | +exports.x = tslib_1.__assign({}); |
| 61 | + |
| 62 | + |
| 63 | +//// [/users/username/projects/project/tsconfig.tsbuildinfo] |
| 64 | +{ |
| 65 | + "program": { |
| 66 | + "fileInfos": { |
| 67 | + "../../../../a/lib/lib.d.ts": { |
| 68 | + "version": "3858781397-/// <reference no-default-lib=\"true\"/>\ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array<T> { length: number; [n: number]: T; }\ninterface ReadonlyArray<T> {}\ndeclare const console: { log(msg: any): void; };", |
| 69 | + "signature": "3858781397-/// <reference no-default-lib=\"true\"/>\ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array<T> { length: number; [n: number]: T; }\ninterface ReadonlyArray<T> {}\ndeclare const console: { log(msg: any): void; };", |
| 70 | + "affectsGlobalScope": true |
| 71 | + }, |
| 72 | + "./node_modules/tslib/index.d.ts": { |
| 73 | + "version": "1620578607-export function __assign(...args: any[]): any;", |
| 74 | + "signature": "1620578607-export function __assign(...args: any[]): any;", |
| 75 | + "affectsGlobalScope": false |
| 76 | + }, |
| 77 | + "./index.tsx": { |
| 78 | + "version": "-14168389096-export const x = {...{}};", |
| 79 | + "signature": "-6508651827-export declare const x: {};\n", |
| 80 | + "affectsGlobalScope": false |
| 81 | + } |
| 82 | + }, |
| 83 | + "options": { |
| 84 | + "importHelpers": true, |
| 85 | + "incremental": true, |
| 86 | + "configFilePath": "./tsconfig.json" |
| 87 | + }, |
| 88 | + "referencedMap": { |
| 89 | + "./index.tsx": [ |
| 90 | + "./node_modules/tslib/index.d.ts" |
| 91 | + ] |
| 92 | + }, |
| 93 | + "exportedModulesMap": {}, |
| 94 | + "semanticDiagnosticsPerFile": [ |
| 95 | + "../../../../a/lib/lib.d.ts", |
| 96 | + "./index.tsx", |
| 97 | + "./node_modules/tslib/index.d.ts" |
| 98 | + ] |
| 99 | + }, |
| 100 | + "version": "FakeTSVersion" |
| 101 | +} |
| 102 | + |
| 103 | + |
| 104 | +Change:: |
| 105 | + |
| 106 | +Input:: |
| 107 | +//// [/users/username/projects/project/node_modules/tslib/index.d.ts] deleted |
| 108 | +//// [/users/username/projects/project/node_modules/tslib/package.json] deleted |
| 109 | + |
| 110 | +Output:: |
| 111 | +[96mindex.tsx[0m:[93m1[0m:[93m19[0m - [91merror[0m[90m TS2354: [0mThis syntax requires an imported helper but module 'tslib' cannot be found. |
| 112 | + |
| 113 | +[7m1[0m export const x = {...{}}; |
| 114 | +[7m [0m [91m ~~~~~[0m |
| 115 | + |
| 116 | + |
| 117 | +Found 1 error. |
| 118 | + |
| 119 | + |
| 120 | + |
| 121 | +Program root files: ["/users/username/projects/project/index.tsx"] |
| 122 | +Program options: {"importHelpers":true,"incremental":true,"configFilePath":"/users/username/projects/project/tsconfig.json"} |
| 123 | +Program structureReused: Not |
| 124 | +Program files:: |
| 125 | +/a/lib/lib.d.ts |
| 126 | +/users/username/projects/project/index.tsx |
| 127 | + |
| 128 | +Semantic diagnostics in builder refreshed for:: |
| 129 | +/users/username/projects/project/index.tsx |
| 130 | + |
| 131 | +WatchedFiles:: |
| 132 | + |
| 133 | +FsWatches:: |
| 134 | + |
| 135 | +FsWatchesRecursive:: |
| 136 | + |
| 137 | +exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated |
| 138 | + |
| 139 | +//// [/users/username/projects/project/index.js] file written with same contents |
| 140 | +//// [/users/username/projects/project/tsconfig.tsbuildinfo] |
| 141 | +{ |
| 142 | + "program": { |
| 143 | + "fileInfos": { |
| 144 | + "../../../../a/lib/lib.d.ts": { |
| 145 | + "version": "3858781397-/// <reference no-default-lib=\"true\"/>\ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array<T> { length: number; [n: number]: T; }\ninterface ReadonlyArray<T> {}\ndeclare const console: { log(msg: any): void; };", |
| 146 | + "signature": "3858781397-/// <reference no-default-lib=\"true\"/>\ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array<T> { length: number; [n: number]: T; }\ninterface ReadonlyArray<T> {}\ndeclare const console: { log(msg: any): void; };", |
| 147 | + "affectsGlobalScope": true |
| 148 | + }, |
| 149 | + "./index.tsx": { |
| 150 | + "version": "-14168389096-export const x = {...{}};", |
| 151 | + "signature": "-6508651827-export declare const x: {};\n", |
| 152 | + "affectsGlobalScope": false |
| 153 | + } |
| 154 | + }, |
| 155 | + "options": { |
| 156 | + "importHelpers": true, |
| 157 | + "incremental": true, |
| 158 | + "configFilePath": "./tsconfig.json" |
| 159 | + }, |
| 160 | + "referencedMap": {}, |
| 161 | + "exportedModulesMap": {}, |
| 162 | + "semanticDiagnosticsPerFile": [ |
| 163 | + "../../../../a/lib/lib.d.ts", |
| 164 | + [ |
| 165 | + "./index.tsx", |
| 166 | + [ |
| 167 | + { |
| 168 | + "file": "./index.tsx", |
| 169 | + "start": 18, |
| 170 | + "length": 5, |
| 171 | + "messageText": "This syntax requires an imported helper but module 'tslib' cannot be found.", |
| 172 | + "category": 1, |
| 173 | + "code": 2354 |
| 174 | + } |
| 175 | + ] |
| 176 | + ] |
| 177 | + ] |
| 178 | + }, |
| 179 | + "version": "FakeTSVersion" |
| 180 | +} |
| 181 | + |
0 commit comments