|
| 1 | +Input:: |
| 2 | +//// [/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 | +//// [/src/project/src/file.ts] |
| 18 | +export const y: string = undefined; |
| 19 | + |
| 20 | +//// [/src/project/src/main.ts] |
| 21 | +export const x = 10; |
| 22 | + |
| 23 | + |
| 24 | + |
| 25 | +Output:: |
| 26 | +/lib/tsc --incremental --tsBuildInfoFile .tsbuildinfo --strict src/project/src/main.ts |
| 27 | +exitCode:: ExitStatus.Success |
| 28 | + |
| 29 | + |
| 30 | +//// [/.tsbuildinfo] |
| 31 | +{"program":{"fileNames":["./lib/lib.d.ts","./src/project/src/main.ts"],"fileInfos":[{"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; };","affectsGlobalScope":true},"-10726455937-export const x = 10;"],"options":{"strict":true,"tsBuildInfoFile":"./.tsbuildinfo"},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2]},"version":"FakeTSVersion"} |
| 32 | + |
| 33 | +//// [/.tsbuildinfo.readable.baseline.txt] |
| 34 | +{ |
| 35 | + "program": { |
| 36 | + "fileNames": [ |
| 37 | + "./lib/lib.d.ts", |
| 38 | + "./src/project/src/main.ts" |
| 39 | + ], |
| 40 | + "fileInfos": { |
| 41 | + "./lib/lib.d.ts": { |
| 42 | + "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; };", |
| 43 | + "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; };", |
| 44 | + "affectsGlobalScope": true |
| 45 | + }, |
| 46 | + "./src/project/src/main.ts": { |
| 47 | + "version": "-10726455937-export const x = 10;", |
| 48 | + "signature": "-10726455937-export const x = 10;" |
| 49 | + } |
| 50 | + }, |
| 51 | + "options": { |
| 52 | + "strict": true, |
| 53 | + "tsBuildInfoFile": "./.tsbuildinfo" |
| 54 | + }, |
| 55 | + "referencedMap": {}, |
| 56 | + "exportedModulesMap": {}, |
| 57 | + "semanticDiagnosticsPerFile": [ |
| 58 | + "./lib/lib.d.ts", |
| 59 | + "./src/project/src/main.ts" |
| 60 | + ] |
| 61 | + }, |
| 62 | + "version": "FakeTSVersion", |
| 63 | + "size": 766 |
| 64 | +} |
| 65 | + |
| 66 | +//// [/src/project/src/main.js] |
| 67 | +"use strict"; |
| 68 | +exports.__esModule = true; |
| 69 | +exports.x = void 0; |
| 70 | +exports.x = 10; |
| 71 | + |
| 72 | + |
| 73 | + |
| 74 | + |
| 75 | +next: |
| 76 | + |
| 77 | +Input:: |
| 78 | +//// [/.tsbuildinfo] |
| 79 | +{"program":{"fileNames":["./lib/lib.d.ts","./src/project/src/main.ts"],"fileInfos":[{"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; };","affectsGlobalScope":true},"-10726455937-export const x = 10;"],"options":{"strict":true,"tsBuildInfoFile":"./.tsbuildinfo"},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2]},"version":"FakeTSVersion"} |
| 80 | + |
| 81 | +//// [/.tsbuildinfo.readable.baseline.txt] |
| 82 | +{ |
| 83 | + "program": { |
| 84 | + "fileNames": [ |
| 85 | + "./lib/lib.d.ts", |
| 86 | + "./src/project/src/main.ts" |
| 87 | + ], |
| 88 | + "fileInfos": { |
| 89 | + "./lib/lib.d.ts": { |
| 90 | + "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; };", |
| 91 | + "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; };", |
| 92 | + "affectsGlobalScope": true |
| 93 | + }, |
| 94 | + "./src/project/src/main.ts": { |
| 95 | + "version": "-10726455937-export const x = 10;", |
| 96 | + "signature": "-10726455937-export const x = 10;" |
| 97 | + } |
| 98 | + }, |
| 99 | + "options": { |
| 100 | + "strict": true, |
| 101 | + "tsBuildInfoFile": "./.tsbuildinfo" |
| 102 | + }, |
| 103 | + "referencedMap": {}, |
| 104 | + "exportedModulesMap": {}, |
| 105 | + "semanticDiagnosticsPerFile": [ |
| 106 | + "./lib/lib.d.ts", |
| 107 | + "./src/project/src/main.ts" |
| 108 | + ] |
| 109 | + }, |
| 110 | + "version": "FakeTSVersion", |
| 111 | + "size": 766 |
| 112 | +} |
| 113 | + |
| 114 | +//// [/lib/lib.d.ts] |
| 115 | +/// <reference no-default-lib="true"/> |
| 116 | +interface Boolean {} |
| 117 | +interface Function {} |
| 118 | +interface CallableFunction {} |
| 119 | +interface NewableFunction {} |
| 120 | +interface IArguments {} |
| 121 | +interface Number { toExponential: any; } |
| 122 | +interface Object {} |
| 123 | +interface RegExp {} |
| 124 | +interface String { charAt: any; } |
| 125 | +interface Array<T> { length: number; [n: number]: T; } |
| 126 | +interface ReadonlyArray<T> {} |
| 127 | +declare const console: { log(msg: any): void; }; |
| 128 | + |
| 129 | +//// [/src/project/src/file.ts] |
| 130 | +export const y: string = undefined; |
| 131 | + |
| 132 | +//// [/src/project/src/main.js] |
| 133 | +"use strict"; |
| 134 | +exports.__esModule = true; |
| 135 | +exports.x = void 0; |
| 136 | +exports.x = 10; |
| 137 | + |
| 138 | + |
| 139 | +//// [/src/project/src/main.ts] |
| 140 | +export const x = 10; |
| 141 | + |
| 142 | + |
| 143 | + |
| 144 | +Output:: |
| 145 | +/lib/tsc --incremental --tsBuildInfoFile .tsbuildinfo --strict src/project/src/file.ts |
| 146 | +[96msrc/project/src/file.ts[0m:[93m1[0m:[93m14[0m - [91merror[0m[90m TS2322: [0mType 'undefined' is not assignable to type 'string'. |
| 147 | + |
| 148 | +[7m1[0m export const y: string = undefined; |
| 149 | +[7m [0m [91m ~[0m |
| 150 | + |
| 151 | + |
| 152 | +Found 1 error in src/project/src/file.ts[90m:1[0m |
| 153 | + |
| 154 | +exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated |
| 155 | + |
| 156 | + |
| 157 | +//// [/.tsbuildinfo] |
| 158 | +{"program":{"fileNames":["./lib/lib.d.ts","./src/project/src/file.ts"],"fileInfos":[{"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; };","affectsGlobalScope":true},{"version":"-14519709726-export const y: string = undefined;","signature":"-8102077254-export declare const y: string;\r\n"}],"options":{"strict":true,"tsBuildInfoFile":"./.tsbuildinfo"},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,[2,[{"file":"./src/project/src/file.ts","start":13,"length":1,"code":2322,"category":1,"messageText":"Type 'undefined' is not assignable to type 'string'."}]]]},"version":"FakeTSVersion"} |
| 159 | + |
| 160 | +//// [/.tsbuildinfo.readable.baseline.txt] |
| 161 | +{ |
| 162 | + "program": { |
| 163 | + "fileNames": [ |
| 164 | + "./lib/lib.d.ts", |
| 165 | + "./src/project/src/file.ts" |
| 166 | + ], |
| 167 | + "fileInfos": { |
| 168 | + "./lib/lib.d.ts": { |
| 169 | + "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; };", |
| 170 | + "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; };", |
| 171 | + "affectsGlobalScope": true |
| 172 | + }, |
| 173 | + "./src/project/src/file.ts": { |
| 174 | + "version": "-14519709726-export const y: string = undefined;", |
| 175 | + "signature": "-8102077254-export declare const y: string;\r\n" |
| 176 | + } |
| 177 | + }, |
| 178 | + "options": { |
| 179 | + "strict": true, |
| 180 | + "tsBuildInfoFile": "./.tsbuildinfo" |
| 181 | + }, |
| 182 | + "referencedMap": {}, |
| 183 | + "exportedModulesMap": {}, |
| 184 | + "semanticDiagnosticsPerFile": [ |
| 185 | + "./lib/lib.d.ts", |
| 186 | + [ |
| 187 | + "./src/project/src/file.ts", |
| 188 | + [ |
| 189 | + { |
| 190 | + "file": "./src/project/src/file.ts", |
| 191 | + "start": 13, |
| 192 | + "length": 1, |
| 193 | + "code": 2322, |
| 194 | + "category": 1, |
| 195 | + "messageText": "Type 'undefined' is not assignable to type 'string'." |
| 196 | + } |
| 197 | + ] |
| 198 | + ] |
| 199 | + ] |
| 200 | + }, |
| 201 | + "version": "FakeTSVersion", |
| 202 | + "size": 1012 |
| 203 | +} |
| 204 | + |
| 205 | +//// [/src/project/src/file.js] |
| 206 | +"use strict"; |
| 207 | +exports.__esModule = true; |
| 208 | +exports.y = void 0; |
| 209 | +exports.y = undefined; |
| 210 | + |
| 211 | + |
0 commit comments