|
| 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/main.ts] |
| 18 | +const x = 10; |
| 19 | + |
| 20 | +//// [/src/project/tsconfig.json] |
| 21 | +{"compilerOptions":{"module":"none","composite":true}} |
| 22 | + |
| 23 | + |
| 24 | + |
| 25 | +Output:: |
| 26 | +/lib/tsc -p /src/project |
| 27 | +exitCode:: ExitStatus.Success |
| 28 | + |
| 29 | + |
| 30 | +//// [/src/project/src/main.d.ts] |
| 31 | +declare const x = 10; |
| 32 | + |
| 33 | + |
| 34 | +//// [/src/project/src/main.js] |
| 35 | +var x = 10; |
| 36 | + |
| 37 | + |
| 38 | +//// [/src/project/tsconfig.tsbuildinfo] |
| 39 | +{"program":{"fileNames":["../../lib/lib.d.ts","./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},{"version":"5029505981-const x = 10;","signature":"-3198459068-declare const x = 10;\r\n","affectsGlobalScope":true}],"options":{"composite":true,"module":0},"semanticDiagnosticsPerFile":[1,2],"latestChangedDtsFile":"./src/main.d.ts"},"version":"FakeTSVersion"} |
| 40 | + |
| 41 | +//// [/src/project/tsconfig.tsbuildinfo.readable.baseline.txt] |
| 42 | +{ |
| 43 | + "program": { |
| 44 | + "fileNames": [ |
| 45 | + "../../lib/lib.d.ts", |
| 46 | + "./src/main.ts" |
| 47 | + ], |
| 48 | + "fileInfos": { |
| 49 | + "../../lib/lib.d.ts": { |
| 50 | + "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; };", |
| 51 | + "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; };", |
| 52 | + "affectsGlobalScope": true |
| 53 | + }, |
| 54 | + "./src/main.ts": { |
| 55 | + "version": "5029505981-const x = 10;", |
| 56 | + "signature": "-3198459068-declare const x = 10;\r\n", |
| 57 | + "affectsGlobalScope": true |
| 58 | + } |
| 59 | + }, |
| 60 | + "options": { |
| 61 | + "composite": true, |
| 62 | + "module": 0 |
| 63 | + }, |
| 64 | + "semanticDiagnosticsPerFile": [ |
| 65 | + "../../lib/lib.d.ts", |
| 66 | + "./src/main.ts" |
| 67 | + ], |
| 68 | + "latestChangedDtsFile": "./src/main.d.ts" |
| 69 | + }, |
| 70 | + "version": "FakeTSVersion", |
| 71 | + "size": 816 |
| 72 | +} |
| 73 | + |
| 74 | + |
| 75 | + |
| 76 | +Change:: convert to modules |
| 77 | +Input:: |
| 78 | +//// [/src/project/tsconfig.json] |
| 79 | +{"compilerOptions":{"module":"es2015","composite":true}} |
| 80 | + |
| 81 | + |
| 82 | + |
| 83 | +Output:: |
| 84 | +/lib/tsc -p /src/project |
| 85 | +exitCode:: ExitStatus.Success |
| 86 | + |
| 87 | + |
| 88 | +//// [/src/project/src/main.js] file written with same contents |
| 89 | +//// [/src/project/tsconfig.tsbuildinfo] |
| 90 | +{"program":{"fileNames":["../../lib/lib.d.ts","./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},{"version":"5029505981-const x = 10;","signature":"-3198459068-declare const x = 10;\r\n","affectsGlobalScope":true}],"options":{"composite":true,"module":5},"referencedMap":[],"exportedModulesMap":[],"semanticDiagnosticsPerFile":[1,2],"latestChangedDtsFile":"./src/main.d.ts"},"version":"FakeTSVersion"} |
| 91 | + |
| 92 | +//// [/src/project/tsconfig.tsbuildinfo.readable.baseline.txt] |
| 93 | +{ |
| 94 | + "program": { |
| 95 | + "fileNames": [ |
| 96 | + "../../lib/lib.d.ts", |
| 97 | + "./src/main.ts" |
| 98 | + ], |
| 99 | + "fileInfos": { |
| 100 | + "../../lib/lib.d.ts": { |
| 101 | + "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; };", |
| 102 | + "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; };", |
| 103 | + "affectsGlobalScope": true |
| 104 | + }, |
| 105 | + "./src/main.ts": { |
| 106 | + "version": "5029505981-const x = 10;", |
| 107 | + "signature": "-3198459068-declare const x = 10;\r\n", |
| 108 | + "affectsGlobalScope": true |
| 109 | + } |
| 110 | + }, |
| 111 | + "options": { |
| 112 | + "composite": true, |
| 113 | + "module": 5 |
| 114 | + }, |
| 115 | + "referencedMap": {}, |
| 116 | + "exportedModulesMap": {}, |
| 117 | + "semanticDiagnosticsPerFile": [ |
| 118 | + "../../lib/lib.d.ts", |
| 119 | + "./src/main.ts" |
| 120 | + ], |
| 121 | + "latestChangedDtsFile": "./src/main.d.ts" |
| 122 | + }, |
| 123 | + "version": "FakeTSVersion", |
| 124 | + "size": 859 |
| 125 | +} |
| 126 | + |
0 commit comments