|
| 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/extraFile.ts] |
| 18 | +export const extra = 10; |
| 19 | + |
| 20 | +//// [/src/project/main.ts] |
| 21 | +import { foo } from "./module";foo(); |
| 22 | + |
| 23 | +//// [/src/project/module.ts] |
| 24 | +export function foo(): string { return "hello"; } |
| 25 | + |
| 26 | +//// [/src/project/tsconfig.json] |
| 27 | +{"compilerOptions":{"assumeChangesAffectShape":true}} |
| 28 | + |
| 29 | + |
| 30 | + |
| 31 | +Output:: |
| 32 | +/lib/tsc --incremental --p src/project |
| 33 | +exitCode:: ExitStatus.Success |
| 34 | + |
| 35 | + |
| 36 | +//// [/src/project/extraFile.js] |
| 37 | +"use strict"; |
| 38 | +exports.__esModule = true; |
| 39 | +exports.extra = void 0; |
| 40 | +exports.extra = 10; |
| 41 | + |
| 42 | + |
| 43 | +//// [/src/project/main.js] |
| 44 | +"use strict"; |
| 45 | +exports.__esModule = true; |
| 46 | +var module_1 = require("./module"); |
| 47 | +module_1.foo(); |
| 48 | + |
| 49 | + |
| 50 | +//// [/src/project/module.js] |
| 51 | +"use strict"; |
| 52 | +exports.__esModule = true; |
| 53 | +exports.foo = void 0; |
| 54 | +function foo() { return "hello"; } |
| 55 | +exports.foo = foo; |
| 56 | + |
| 57 | + |
| 58 | +//// [/src/project/tsconfig.tsbuildinfo] |
| 59 | +{ |
| 60 | + "program": { |
| 61 | + "fileInfos": { |
| 62 | + "../../lib/lib.d.ts": { |
| 63 | + "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; };", |
| 64 | + "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; };", |
| 65 | + "affectsGlobalScope": true |
| 66 | + }, |
| 67 | + "./extrafile.ts": { |
| 68 | + "version": "-13403012629-export const extra = 10;", |
| 69 | + "signature": "-4859189518-export declare const extra = 10;\r\n", |
| 70 | + "affectsGlobalScope": false |
| 71 | + }, |
| 72 | + "./module.ts": { |
| 73 | + "version": "-8446458946-export function foo(): string { return \"hello\"; }", |
| 74 | + "signature": "-8035635627-export declare function foo(): string;\r\n", |
| 75 | + "affectsGlobalScope": false |
| 76 | + }, |
| 77 | + "./main.ts": { |
| 78 | + "version": "-7083766686-import { foo } from \"./module\";foo();", |
| 79 | + "signature": "-4882119183-export {};\r\n", |
| 80 | + "affectsGlobalScope": false |
| 81 | + } |
| 82 | + }, |
| 83 | + "options": { |
| 84 | + "assumeChangesAffectShape": true, |
| 85 | + "incremental": true, |
| 86 | + "project": "./", |
| 87 | + "configFilePath": "./tsconfig.json" |
| 88 | + }, |
| 89 | + "referencedMap": { |
| 90 | + "./main.ts": [ |
| 91 | + "./module.ts" |
| 92 | + ] |
| 93 | + }, |
| 94 | + "exportedModulesMap": {}, |
| 95 | + "semanticDiagnosticsPerFile": [ |
| 96 | + "../../lib/lib.d.ts", |
| 97 | + "./extrafile.ts", |
| 98 | + "./main.ts", |
| 99 | + "./module.ts" |
| 100 | + ] |
| 101 | + }, |
| 102 | + "version": "FakeTSVersion" |
| 103 | +} |
| 104 | + |
| 105 | + |
| 106 | + |
| 107 | +Change:: Local edit to module |
| 108 | +Input:: |
| 109 | +//// [/src/project/module.ts] |
| 110 | +export function foo(): string { return "hello world"; } |
| 111 | + |
| 112 | + |
| 113 | + |
| 114 | +Output:: |
| 115 | +/lib/tsc --incremental --p src/project |
| 116 | +exitCode:: ExitStatus.Success |
| 117 | + |
| 118 | + |
| 119 | +//// [/src/project/module.js] |
| 120 | +"use strict"; |
| 121 | +exports.__esModule = true; |
| 122 | +exports.foo = void 0; |
| 123 | +function foo() { return "hello world"; } |
| 124 | +exports.foo = foo; |
| 125 | + |
| 126 | + |
| 127 | +//// [/src/project/tsconfig.tsbuildinfo] |
| 128 | +{ |
| 129 | + "program": { |
| 130 | + "fileInfos": { |
| 131 | + "../../lib/lib.d.ts": { |
| 132 | + "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; };", |
| 133 | + "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; };", |
| 134 | + "affectsGlobalScope": true |
| 135 | + }, |
| 136 | + "./extrafile.ts": { |
| 137 | + "version": "-13403012629-export const extra = 10;", |
| 138 | + "signature": "-4859189518-export declare const extra = 10;\r\n", |
| 139 | + "affectsGlobalScope": false |
| 140 | + }, |
| 141 | + "./module.ts": { |
| 142 | + "version": "-4300970970-export function foo(): string { return \"hello world\"; }", |
| 143 | + "signature": "-8035635627-export declare function foo(): string;\r\n", |
| 144 | + "affectsGlobalScope": false |
| 145 | + }, |
| 146 | + "./main.ts": { |
| 147 | + "version": "-7083766686-import { foo } from \"./module\";foo();", |
| 148 | + "signature": "-4882119183-export {};\r\n", |
| 149 | + "affectsGlobalScope": false |
| 150 | + } |
| 151 | + }, |
| 152 | + "options": { |
| 153 | + "assumeChangesAffectShape": true, |
| 154 | + "incremental": true, |
| 155 | + "project": "./", |
| 156 | + "configFilePath": "./tsconfig.json" |
| 157 | + }, |
| 158 | + "referencedMap": { |
| 159 | + "./main.ts": [ |
| 160 | + "./module.ts" |
| 161 | + ] |
| 162 | + }, |
| 163 | + "exportedModulesMap": {}, |
| 164 | + "semanticDiagnosticsPerFile": [ |
| 165 | + "../../lib/lib.d.ts", |
| 166 | + "./extrafile.ts", |
| 167 | + "./main.ts", |
| 168 | + "./module.ts" |
| 169 | + ] |
| 170 | + }, |
| 171 | + "version": "FakeTSVersion" |
| 172 | +} |
| 173 | + |
| 174 | + |
| 175 | + |
| 176 | +Change:: Api change edit to module |
| 177 | +Input:: |
| 178 | +//// [/src/project/module.ts] |
| 179 | +export const x = 10;export function foo(): string { return "hello world"; } |
| 180 | + |
| 181 | + |
| 182 | + |
| 183 | +Output:: |
| 184 | +/lib/tsc --incremental --p src/project |
| 185 | +exitCode:: ExitStatus.Success |
| 186 | + |
| 187 | + |
| 188 | +//// [/src/project/main.js] file written with same contents |
| 189 | +//// [/src/project/module.js] |
| 190 | +"use strict"; |
| 191 | +exports.__esModule = true; |
| 192 | +exports.foo = exports.x = void 0; |
| 193 | +exports.x = 10; |
| 194 | +function foo() { return "hello world"; } |
| 195 | +exports.foo = foo; |
| 196 | + |
| 197 | + |
| 198 | +//// [/src/project/tsconfig.tsbuildinfo] |
| 199 | +{ |
| 200 | + "program": { |
| 201 | + "fileInfos": { |
| 202 | + "../../lib/lib.d.ts": { |
| 203 | + "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; };", |
| 204 | + "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; };", |
| 205 | + "affectsGlobalScope": true |
| 206 | + }, |
| 207 | + "./extrafile.ts": { |
| 208 | + "version": "-13403012629-export const extra = 10;", |
| 209 | + "signature": "-4859189518-export declare const extra = 10;\r\n", |
| 210 | + "affectsGlobalScope": false |
| 211 | + }, |
| 212 | + "./module.ts": { |
| 213 | + "version": "-1237933216-export const x = 10;export function foo(): string { return \"hello world\"; }", |
| 214 | + "signature": "1387636182-export declare const x = 10;\r\nexport declare function foo(): string;\r\n", |
| 215 | + "affectsGlobalScope": false |
| 216 | + }, |
| 217 | + "./main.ts": { |
| 218 | + "version": "-7083766686-import { foo } from \"./module\";foo();", |
| 219 | + "signature": "-4882119183-export {};\r\n", |
| 220 | + "affectsGlobalScope": false |
| 221 | + } |
| 222 | + }, |
| 223 | + "options": { |
| 224 | + "assumeChangesAffectShape": true, |
| 225 | + "incremental": true, |
| 226 | + "project": "./", |
| 227 | + "configFilePath": "./tsconfig.json" |
| 228 | + }, |
| 229 | + "referencedMap": { |
| 230 | + "./main.ts": [ |
| 231 | + "./module.ts" |
| 232 | + ] |
| 233 | + }, |
| 234 | + "exportedModulesMap": {}, |
| 235 | + "semanticDiagnosticsPerFile": [ |
| 236 | + "../../lib/lib.d.ts", |
| 237 | + "./extrafile.ts", |
| 238 | + "./main.ts", |
| 239 | + "./module.ts" |
| 240 | + ] |
| 241 | + }, |
| 242 | + "version": "FakeTSVersion" |
| 243 | +} |
| 244 | + |
0 commit comments