From ffb958592b8f791a85101ea78fec651a50eea6b7 Mon Sep 17 00:00:00 2001 From: Ryan Cavanaugh Date: Fri, 2 Aug 2024 10:38:36 -0700 Subject: [PATCH 01/50] Allow `this` when it appears in `this is T` positions (#59310) --- src/compiler/checker.ts | 5 +- ...declarationEmitThisPredicates02.errors.txt | 18 --- .../declarationEmitThisPredicates02.types | 1 - ...ThisPredicatesWithPrivateName02.errors.txt | 18 --- ...nEmitThisPredicatesWithPrivateName02.types | 1 - ...edTypeWithAsClauseAndLateBoundProperty2.js | 110 ------------------ .../thisPredicateInObjectLiteral.errors.txt | 20 ++++ .../reference/thisPredicateInObjectLiteral.js | 32 +++++ .../thisPredicateInObjectLiteral.symbols | 28 +++++ .../thisPredicateInObjectLiteral.types | 43 +++++++ ...peGuardFunctionOfFormThisErrors.errors.txt | 5 +- .../compiler/thisPredicateInObjectLiteral.ts | 15 +++ 12 files changed, 140 insertions(+), 156 deletions(-) delete mode 100644 tests/baselines/reference/declarationEmitThisPredicates02.errors.txt delete mode 100644 tests/baselines/reference/declarationEmitThisPredicatesWithPrivateName02.errors.txt create mode 100644 tests/baselines/reference/thisPredicateInObjectLiteral.errors.txt create mode 100644 tests/baselines/reference/thisPredicateInObjectLiteral.js create mode 100644 tests/baselines/reference/thisPredicateInObjectLiteral.symbols create mode 100644 tests/baselines/reference/thisPredicateInObjectLiteral.types create mode 100644 tests/cases/compiler/thisPredicateInObjectLiteral.ts diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index e32aa3130e8d1..c095639094515 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -40980,10 +40980,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { checkSourceElement(node.type); const { parameterName } = node; - if (typePredicate.kind === TypePredicateKind.This || typePredicate.kind === TypePredicateKind.AssertsThis) { - getTypeFromThisTypeNode(parameterName as ThisTypeNode); - } - else { + if (typePredicate.kind !== TypePredicateKind.This && typePredicate.kind !== TypePredicateKind.AssertsThis) { if (typePredicate.parameterIndex >= 0) { if (signatureHasRestParameter(signature) && typePredicate.parameterIndex === signature.parameters.length - 1) { error(parameterName, Diagnostics.A_type_predicate_cannot_reference_a_rest_parameter); diff --git a/tests/baselines/reference/declarationEmitThisPredicates02.errors.txt b/tests/baselines/reference/declarationEmitThisPredicates02.errors.txt deleted file mode 100644 index 396e12c0b6ffe..0000000000000 --- a/tests/baselines/reference/declarationEmitThisPredicates02.errors.txt +++ /dev/null @@ -1,18 +0,0 @@ -declarationEmitThisPredicates02.ts(8,10): error TS2526: A 'this' type is available only in a non-static member of a class or interface. - - -==== declarationEmitThisPredicates02.ts (1 errors) ==== - export interface Foo { - a: string; - b: number; - c: boolean; - } - - export const obj = { - m(): this is Foo { - ~~~~ -!!! error TS2526: A 'this' type is available only in a non-static member of a class or interface. - let dis = this as {} as Foo; - return dis.a != null && dis.b != null && dis.c != null; - } - } \ No newline at end of file diff --git a/tests/baselines/reference/declarationEmitThisPredicates02.types b/tests/baselines/reference/declarationEmitThisPredicates02.types index 790e599a60486..4baa55abd85f4 100644 --- a/tests/baselines/reference/declarationEmitThisPredicates02.types +++ b/tests/baselines/reference/declarationEmitThisPredicates02.types @@ -33,7 +33,6 @@ export const obj = { >this as {} : {} > : ^^ >this : any -> : ^^^ return dis.a != null && dis.b != null && dis.c != null; >dis.a != null && dis.b != null && dis.c != null : boolean diff --git a/tests/baselines/reference/declarationEmitThisPredicatesWithPrivateName02.errors.txt b/tests/baselines/reference/declarationEmitThisPredicatesWithPrivateName02.errors.txt deleted file mode 100644 index b720ce2d66824..0000000000000 --- a/tests/baselines/reference/declarationEmitThisPredicatesWithPrivateName02.errors.txt +++ /dev/null @@ -1,18 +0,0 @@ -declarationEmitThisPredicatesWithPrivateName02.ts(8,10): error TS2526: A 'this' type is available only in a non-static member of a class or interface. - - -==== declarationEmitThisPredicatesWithPrivateName02.ts (1 errors) ==== - interface Foo { - a: string; - b: number; - c: boolean; - } - - export const obj = { - m(): this is Foo { - ~~~~ -!!! error TS2526: A 'this' type is available only in a non-static member of a class or interface. - let dis = this as {} as Foo; - return dis.a != null && dis.b != null && dis.c != null; - } - } \ No newline at end of file diff --git a/tests/baselines/reference/declarationEmitThisPredicatesWithPrivateName02.types b/tests/baselines/reference/declarationEmitThisPredicatesWithPrivateName02.types index 6927ce897786a..906206df1141c 100644 --- a/tests/baselines/reference/declarationEmitThisPredicatesWithPrivateName02.types +++ b/tests/baselines/reference/declarationEmitThisPredicatesWithPrivateName02.types @@ -33,7 +33,6 @@ export const obj = { >this as {} : {} > : ^^ >this : any -> : ^^^ return dis.a != null && dis.b != null && dis.c != null; >dis.a != null && dis.b != null && dis.c != null : boolean diff --git a/tests/baselines/reference/mappedTypeWithAsClauseAndLateBoundProperty2.js b/tests/baselines/reference/mappedTypeWithAsClauseAndLateBoundProperty2.js index 7d5de17211a1a..4aa389086c111 100644 --- a/tests/baselines/reference/mappedTypeWithAsClauseAndLateBoundProperty2.js +++ b/tests/baselines/reference/mappedTypeWithAsClauseAndLateBoundProperty2.js @@ -107,113 +107,3 @@ export declare const thing: { readonly [Symbol.unscopables]?: boolean; }; }; - - -//// [DtsFileErrors] - - -mappedTypeWithAsClauseAndLateBoundProperty2.d.ts(27,118): error TS2526: A 'this' type is available only in a non-static member of a class or interface. - - -==== mappedTypeWithAsClauseAndLateBoundProperty2.d.ts (1 errors) ==== - export declare const thing: { - [x: number]: number; - toString: () => string; - toLocaleString: { - (): string; - (locales: string | string[], options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions): string; - }; - pop: () => number; - push: (...items: number[]) => number; - concat: { - (...items: ConcatArray[]): number[]; - (...items: (number | ConcatArray)[]): number[]; - }; - join: (separator?: string) => string; - reverse: () => number[]; - shift: () => number; - slice: (start?: number, end?: number) => number[]; - sort: (compareFn?: (a: number, b: number) => number) => number[]; - splice: { - (start: number, deleteCount?: number): number[]; - (start: number, deleteCount: number, ...items: number[]): number[]; - }; - unshift: (...items: number[]) => number; - indexOf: (searchElement: number, fromIndex?: number) => number; - lastIndexOf: (searchElement: number, fromIndex?: number) => number; - every: { - (predicate: (value: number, index: number, array: number[]) => value is S, thisArg?: any): this is S[]; - ~~~~ -!!! error TS2526: A 'this' type is available only in a non-static member of a class or interface. - (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any): boolean; - }; - some: (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any) => boolean; - forEach: (callbackfn: (value: number, index: number, array: number[]) => void, thisArg?: any) => void; - map: (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[]; - filter: { - (predicate: (value: number, index: number, array: number[]) => value is S, thisArg?: any): S[]; - (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any): number[]; - }; - reduce: { - (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number): number; - (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue: number): number; - (callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; - }; - reduceRight: { - (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number): number; - (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue: number): number; - (callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; - }; - find: { - (predicate: (value: number, index: number, obj: number[]) => value is S, thisArg?: any): S; - (predicate: (value: number, index: number, obj: number[]) => unknown, thisArg?: any): number; - }; - findIndex: (predicate: (value: number, index: number, obj: number[]) => unknown, thisArg?: any) => number; - fill: (value: number, start?: number, end?: number) => number[]; - copyWithin: (target: number, start: number, end?: number) => number[]; - entries: () => BuiltinIterator<[number, number], any, any>; - keys: () => BuiltinIterator; - values: () => BuiltinIterator; - includes: (searchElement: number, fromIndex?: number) => boolean; - flatMap: (callback: (this: This, value: number, index: number, array: number[]) => U | readonly U[], thisArg?: This) => U[]; - flat: (this: A, depth?: D) => FlatArray[]; - [Symbol.iterator]: () => BuiltinIterator; - readonly [Symbol.unscopables]: { - [x: number]: boolean; - length?: boolean; - toString?: boolean; - toLocaleString?: boolean; - pop?: boolean; - push?: boolean; - concat?: boolean; - join?: boolean; - reverse?: boolean; - shift?: boolean; - slice?: boolean; - sort?: boolean; - splice?: boolean; - unshift?: boolean; - indexOf?: boolean; - lastIndexOf?: boolean; - every?: boolean; - some?: boolean; - forEach?: boolean; - map?: boolean; - filter?: boolean; - reduce?: boolean; - reduceRight?: boolean; - find?: boolean; - findIndex?: boolean; - fill?: boolean; - copyWithin?: boolean; - entries?: boolean; - keys?: boolean; - values?: boolean; - includes?: boolean; - flatMap?: boolean; - flat?: boolean; - [Symbol.iterator]?: boolean; - readonly [Symbol.unscopables]?: boolean; - }; - }; - \ No newline at end of file diff --git a/tests/baselines/reference/thisPredicateInObjectLiteral.errors.txt b/tests/baselines/reference/thisPredicateInObjectLiteral.errors.txt new file mode 100644 index 0000000000000..117a47720d602 --- /dev/null +++ b/tests/baselines/reference/thisPredicateInObjectLiteral.errors.txt @@ -0,0 +1,20 @@ +thisPredicateInObjectLiteral.ts(10,28): error TS2526: A 'this' type is available only in a non-static member of a class or interface. + + +==== thisPredicateInObjectLiteral.ts (1 errors) ==== + // Should be OK + const foo2 = { + isNumber(): this is { b: string } { + return true; + }, + }; + + // Still an error + const foo3 = { + isNumber(x: any): x is this { + ~~~~ +!!! error TS2526: A 'this' type is available only in a non-static member of a class or interface. + return true; + }, + }; + \ No newline at end of file diff --git a/tests/baselines/reference/thisPredicateInObjectLiteral.js b/tests/baselines/reference/thisPredicateInObjectLiteral.js new file mode 100644 index 0000000000000..f2c9e45740756 --- /dev/null +++ b/tests/baselines/reference/thisPredicateInObjectLiteral.js @@ -0,0 +1,32 @@ +//// [tests/cases/compiler/thisPredicateInObjectLiteral.ts] //// + +//// [thisPredicateInObjectLiteral.ts] +// Should be OK +const foo2 = { + isNumber(): this is { b: string } { + return true; + }, +}; + +// Still an error +const foo3 = { + isNumber(x: any): x is this { + return true; + }, +}; + + +//// [thisPredicateInObjectLiteral.js] +"use strict"; +// Should be OK +var foo2 = { + isNumber: function () { + return true; + }, +}; +// Still an error +var foo3 = { + isNumber: function (x) { + return true; + }, +}; diff --git a/tests/baselines/reference/thisPredicateInObjectLiteral.symbols b/tests/baselines/reference/thisPredicateInObjectLiteral.symbols new file mode 100644 index 0000000000000..ed78d8775bdf1 --- /dev/null +++ b/tests/baselines/reference/thisPredicateInObjectLiteral.symbols @@ -0,0 +1,28 @@ +//// [tests/cases/compiler/thisPredicateInObjectLiteral.ts] //// + +=== thisPredicateInObjectLiteral.ts === +// Should be OK +const foo2 = { +>foo2 : Symbol(foo2, Decl(thisPredicateInObjectLiteral.ts, 1, 5)) + + isNumber(): this is { b: string } { +>isNumber : Symbol(isNumber, Decl(thisPredicateInObjectLiteral.ts, 1, 14)) +>b : Symbol(b, Decl(thisPredicateInObjectLiteral.ts, 2, 25)) + + return true; + }, +}; + +// Still an error +const foo3 = { +>foo3 : Symbol(foo3, Decl(thisPredicateInObjectLiteral.ts, 8, 5)) + + isNumber(x: any): x is this { +>isNumber : Symbol(isNumber, Decl(thisPredicateInObjectLiteral.ts, 8, 14)) +>x : Symbol(x, Decl(thisPredicateInObjectLiteral.ts, 9, 13)) +>x : Symbol(x, Decl(thisPredicateInObjectLiteral.ts, 9, 13)) + + return true; + }, +}; + diff --git a/tests/baselines/reference/thisPredicateInObjectLiteral.types b/tests/baselines/reference/thisPredicateInObjectLiteral.types new file mode 100644 index 0000000000000..96963ea5061e6 --- /dev/null +++ b/tests/baselines/reference/thisPredicateInObjectLiteral.types @@ -0,0 +1,43 @@ +//// [tests/cases/compiler/thisPredicateInObjectLiteral.ts] //// + +=== thisPredicateInObjectLiteral.ts === +// Should be OK +const foo2 = { +>foo2 : { isNumber(): this is { b: string; }; } +> : ^^^^^^^^^^^^^^ ^^^ +>{ isNumber(): this is { b: string } { return true; },} : { isNumber(): this is { b: string; }; } +> : ^^^^^^^^^^^^^^ ^^^ + + isNumber(): this is { b: string } { +>isNumber : () => this is { b: string; } +> : ^^^^^^ +>b : string +> : ^^^^^^ + + return true; +>true : true +> : ^^^^ + + }, +}; + +// Still an error +const foo3 = { +>foo3 : { isNumber(x: any): x is this; } +> : ^^^^^^^^^^^ ^^ ^^^ ^^^ +>{ isNumber(x: any): x is this { return true; },} : { isNumber(x: any): x is this; } +> : ^^^^^^^^^^^ ^^ ^^^ ^^^ + + isNumber(x: any): x is this { +>isNumber : (x: any) => x is this +> : ^ ^^ ^^^^^ +>x : any +> : ^^^ + + return true; +>true : true +> : ^^^^ + + }, +}; + diff --git a/tests/baselines/reference/typeGuardFunctionOfFormThisErrors.errors.txt b/tests/baselines/reference/typeGuardFunctionOfFormThisErrors.errors.txt index bb8daf5500d05..8c8da810d4748 100644 --- a/tests/baselines/reference/typeGuardFunctionOfFormThisErrors.errors.txt +++ b/tests/baselines/reference/typeGuardFunctionOfFormThisErrors.errors.txt @@ -10,12 +10,11 @@ typeGuardFunctionOfFormThisErrors.ts(26,1): error TS2322: Type '() => this is Le typeGuardFunctionOfFormThisErrors.ts(27,1): error TS2322: Type '() => this is FollowerGuard' is not assignable to type '() => this is LeadGuard'. Type predicate 'this is FollowerGuard' is not assignable to 'this is LeadGuard'. Property 'lead' is missing in type 'FollowerGuard' but required in type 'LeadGuard'. -typeGuardFunctionOfFormThisErrors.ts(29,32): error TS2526: A 'this' type is available only in a non-static member of a class or interface. typeGuardFunctionOfFormThisErrors.ts(55,7): error TS2339: Property 'follow' does not exist on type 'RoyalGuard'. typeGuardFunctionOfFormThisErrors.ts(58,7): error TS2339: Property 'lead' does not exist on type 'RoyalGuard'. -==== typeGuardFunctionOfFormThisErrors.ts (7 errors) ==== +==== typeGuardFunctionOfFormThisErrors.ts (6 errors) ==== class RoyalGuard { isLeader(): this is LeadGuard { return this instanceof LeadGuard; @@ -65,8 +64,6 @@ typeGuardFunctionOfFormThisErrors.ts(58,7): error TS2339: Property 'lead' does n !!! related TS2728 typeGuardFunctionOfFormThisErrors.ts:11:5: 'lead' is declared here. function invalidGuard(c: any): this is number { - ~~~~ -!!! error TS2526: A 'this' type is available only in a non-static member of a class or interface. return false; } diff --git a/tests/cases/compiler/thisPredicateInObjectLiteral.ts b/tests/cases/compiler/thisPredicateInObjectLiteral.ts new file mode 100644 index 0000000000000..54c5ce2f974be --- /dev/null +++ b/tests/cases/compiler/thisPredicateInObjectLiteral.ts @@ -0,0 +1,15 @@ +// @strict: true + +// Should be OK +const foo2 = { + isNumber(): this is { b: string } { + return true; + }, +}; + +// Still an error +const foo3 = { + isNumber(x: any): x is this { + return true; + }, +}; From ca2fb0e9a733bef96d72d89963abbe46bd6996ff Mon Sep 17 00:00:00 2001 From: Jake Bailey <5341706+jakebailey@users.noreply.github.com> Date: Fri, 2 Aug 2024 11:22:36 -0700 Subject: [PATCH 02/50] Update deps (#59466) --- .dprint.jsonc | 4 +- package-lock.json | 537 ++++++++++++++++++++++------------------------ package.json | 18 +- 3 files changed, 270 insertions(+), 289 deletions(-) diff --git a/.dprint.jsonc b/.dprint.jsonc index d4bbf5073b20a..aaa8e9927a0ae 100644 --- a/.dprint.jsonc +++ b/.dprint.jsonc @@ -59,8 +59,8 @@ // Note: if adding new languages, make sure settings.template.json is updated too. // Also, if updating typescript, update the one in package.json. "plugins": [ - "https://plugins.dprint.dev/typescript-0.91.4.wasm", + "https://plugins.dprint.dev/typescript-0.91.6.wasm", "https://plugins.dprint.dev/json-0.19.3.wasm", - "https://plugins.dprint.dev/prettier-0.40.0.json@68c668863ec834d4be0f6f5ccaab415df75336a992aceb7eeeb14fdf096a9e9c" + "https://plugins.dprint.dev/prettier-0.46.1.json@e5bd083088a8dfc6e5ce2d3c9bee81489b065bd5345ef55b59f5d96627928b7a" ] } diff --git a/package-lock.json b/package-lock.json index dcc408da63ea4..c2f6d848d2dbf 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,11 +14,11 @@ }, "devDependencies": { "@dprint/formatter": "^0.4.1", - "@dprint/typescript": "0.91.4", + "@dprint/typescript": "0.91.6", "@esfx/canceltoken": "^1.0.0", "@eslint/js": "^8.57.0", "@octokit/rest": "^21.0.1", - "@types/chai": "^4.3.16", + "@types/chai": "^4.3.17", "@types/diff": "^5.2.1", "@types/minimist": "^1.2.5", "@types/mocha": "^10.0.7", @@ -26,10 +26,10 @@ "@types/node": "latest", "@types/source-map-support": "^0.5.10", "@types/which": "^3.0.4", - "@typescript-eslint/utils": "^7.17.0", + "@typescript-eslint/utils": "^7.18.0", "azure-devops-node-api": "^14.0.1", "c8": "^10.1.2", - "chai": "^4.4.1", + "chai": "^4.5.0", "chalk": "^4.1.2", "chokidar": "^3.6.0", "diff": "^5.2.0", @@ -37,23 +37,23 @@ "esbuild": "^0.23.0", "eslint": "^8.57.0", "eslint-formatter-autolinkable-stylish": "^1.3.0", - "fast-xml-parser": "^4.4.0", + "fast-xml-parser": "^4.4.1", "glob": "^10.4.5", - "globals": "^13.24.0", + "globals": "^15.9.0", "hereby": "^1.9.0", "jsonc-parser": "^3.3.1", - "knip": "^5.26.0", + "knip": "^5.27.0", "minimist": "^1.2.8", "mocha": "^10.7.0", "mocha-fivemat-progress-reporter": "^0.1.0", - "monocart-coverage-reports": "^2.9.3", + "monocart-coverage-reports": "^2.10.0", "ms": "^2.1.3", "node-fetch": "^3.3.2", "playwright": "^1.45.3", "source-map-support": "^0.5.21", "tslib": "^2.6.3", "typescript": "^5.5.4", - "typescript-eslint": "^7.17.0", + "typescript-eslint": "^7.18.0", "which": "^3.0.1" }, "engines": { @@ -151,9 +151,9 @@ ] }, "node_modules/@dprint/typescript": { - "version": "0.91.4", - "resolved": "https://registry.npmjs.org/@dprint/typescript/-/typescript-0.91.4.tgz", - "integrity": "sha512-je/T8JF07xehOVS7rx6Xo7T8Aa1Sd/p/+e/b/J2RE8yJHu09O+L0aHBSvec+usjR8/QwCu23AuDLl47zFSey5Q==", + "version": "0.91.6", + "resolved": "https://registry.npmjs.org/@dprint/typescript/-/typescript-0.91.6.tgz", + "integrity": "sha512-rbgODMD0hsQJ6w32eMELqt+KnkzxVVLT4qRMcvlz8PsFwSPyIfBslpZcFhmJWdyurVKKNcUPNC6Aq9PcUIX13w==", "dev": true }, "node_modules/@dprint/win32-arm64": { @@ -649,6 +649,21 @@ "concat-map": "0.0.1" } }, + "node_modules/@eslint/eslintrc/node_modules/globals": { + "version": "13.24.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", + "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", + "dev": true, + "dependencies": { + "type-fest": "^0.20.2" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/@eslint/eslintrc/node_modules/minimatch": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", @@ -1021,9 +1036,9 @@ } }, "node_modules/@types/chai": { - "version": "4.3.16", - "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.3.16.tgz", - "integrity": "sha512-PatH4iOdyh3MyWtmHVFXLWCCIhUbopaltqddG9BzB+gMIzee2MJrvd+jouii9Z3wzQJruGWAm7WOMjgfG8hQlQ==", + "version": "4.3.17", + "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.3.17.tgz", + "integrity": "sha512-zmZ21EWzR71B4Sscphjief5djsLre50M6lI622OSySTmn9DB3j+C3kWroHfBQWXbOBwbgg/M8CG/hUxDLIloow==", "dev": true }, "node_modules/@types/diff": { @@ -1057,12 +1072,12 @@ "dev": true }, "node_modules/@types/node": { - "version": "20.14.11", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.14.11.tgz", - "integrity": "sha512-kprQpL8MMeszbz6ojB5/tU8PLN4kesnN8Gjzw349rDlNgsSzg90lAVj3llK99Dh7JON+t9AuscPPFW6mPbTnSA==", + "version": "22.1.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.1.0.tgz", + "integrity": "sha512-AOmuRF0R2/5j1knA3c6G3HOk523Ga+l+ZXltX8SF1+5oqcXijjfTd8fY3XRZqSihEu9XhtQnKYLmkFaoxgsJHw==", "dev": true, "dependencies": { - "undici-types": "~5.26.4" + "undici-types": "~6.13.0" } }, "node_modules/@types/source-map-support": { @@ -1081,16 +1096,16 @@ "dev": true }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "7.17.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.17.0.tgz", - "integrity": "sha512-pyiDhEuLM3PuANxH7uNYan1AaFs5XE0zw1hq69JBvGvE7gSuEoQl1ydtEe/XQeoC3GQxLXyOVa5kNOATgM638A==", + "version": "7.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.18.0.tgz", + "integrity": "sha512-94EQTWZ40mzBc42ATNIBimBEDltSJ9RQHCC8vc/PDbxi4k8dVwUAv4o98dk50M1zB+JGFxp43FP7f8+FP8R6Sw==", "dev": true, "dependencies": { "@eslint-community/regexpp": "^4.10.0", - "@typescript-eslint/scope-manager": "7.17.0", - "@typescript-eslint/type-utils": "7.17.0", - "@typescript-eslint/utils": "7.17.0", - "@typescript-eslint/visitor-keys": "7.17.0", + "@typescript-eslint/scope-manager": "7.18.0", + "@typescript-eslint/type-utils": "7.18.0", + "@typescript-eslint/utils": "7.18.0", + "@typescript-eslint/visitor-keys": "7.18.0", "graphemer": "^1.4.0", "ignore": "^5.3.1", "natural-compare": "^1.4.0", @@ -1114,15 +1129,15 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "7.17.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-7.17.0.tgz", - "integrity": "sha512-puiYfGeg5Ydop8eusb/Hy1k7QmOU6X3nvsqCgzrB2K4qMavK//21+PzNE8qeECgNOIoertJPUC1SpegHDI515A==", + "version": "7.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-7.18.0.tgz", + "integrity": "sha512-4Z+L8I2OqhZV8qA132M4wNL30ypZGYOQVBfMgxDH/K5UX0PNqTu1c6za9ST5r9+tavvHiTWmBnKzpCJ/GlVFtg==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "7.17.0", - "@typescript-eslint/types": "7.17.0", - "@typescript-eslint/typescript-estree": "7.17.0", - "@typescript-eslint/visitor-keys": "7.17.0", + "@typescript-eslint/scope-manager": "7.18.0", + "@typescript-eslint/types": "7.18.0", + "@typescript-eslint/typescript-estree": "7.18.0", + "@typescript-eslint/visitor-keys": "7.18.0", "debug": "^4.3.4" }, "engines": { @@ -1142,13 +1157,13 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "7.17.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.17.0.tgz", - "integrity": "sha512-0P2jTTqyxWp9HiKLu/Vemr2Rg1Xb5B7uHItdVZ6iAenXmPo4SZ86yOPCJwMqpCyaMiEHTNqizHfsbmCFT1x9SA==", + "version": "7.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.18.0.tgz", + "integrity": "sha512-jjhdIE/FPF2B7Z1uzc6i3oWKbGcHb87Qw7AWj6jmEqNOfDFbJWtjt/XfwCpvNkpGWlcJaog5vTR+VV8+w9JflA==", "dev": true, "dependencies": { - "@typescript-eslint/types": "7.17.0", - "@typescript-eslint/visitor-keys": "7.17.0" + "@typescript-eslint/types": "7.18.0", + "@typescript-eslint/visitor-keys": "7.18.0" }, "engines": { "node": "^18.18.0 || >=20.0.0" @@ -1159,13 +1174,13 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "7.17.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-7.17.0.tgz", - "integrity": "sha512-XD3aaBt+orgkM/7Cei0XNEm1vwUxQ958AOLALzPlbPqb8C1G8PZK85tND7Jpe69Wualri81PLU+Zc48GVKIMMA==", + "version": "7.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-7.18.0.tgz", + "integrity": "sha512-XL0FJXuCLaDuX2sYqZUUSOJ2sG5/i1AAze+axqmLnSkNEVMVYLF+cbwlB2w8D1tinFuSikHmFta+P+HOofrLeA==", "dev": true, "dependencies": { - "@typescript-eslint/typescript-estree": "7.17.0", - "@typescript-eslint/utils": "7.17.0", + "@typescript-eslint/typescript-estree": "7.18.0", + "@typescript-eslint/utils": "7.18.0", "debug": "^4.3.4", "ts-api-utils": "^1.3.0" }, @@ -1186,9 +1201,9 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "7.17.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.17.0.tgz", - "integrity": "sha512-a29Ir0EbyKTKHnZWbNsrc/gqfIBqYPwj3F2M+jWE/9bqfEHg0AMtXzkbUkOG6QgEScxh2+Pz9OXe11jHDnHR7A==", + "version": "7.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.18.0.tgz", + "integrity": "sha512-iZqi+Ds1y4EDYUtlOOC+aUmxnE9xS/yCigkjA7XpTKV6nCBd3Hp/PRGGmdwnfkV2ThMyYldP1wRpm/id99spTQ==", "dev": true, "engines": { "node": "^18.18.0 || >=20.0.0" @@ -1199,13 +1214,13 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "7.17.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.17.0.tgz", - "integrity": "sha512-72I3TGq93t2GoSBWI093wmKo0n6/b7O4j9o8U+f65TVD0FS6bI2180X5eGEr8MA8PhKMvYe9myZJquUT2JkCZw==", + "version": "7.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.18.0.tgz", + "integrity": "sha512-aP1v/BSPnnyhMHts8cf1qQ6Q1IFwwRvAQGRvBFkWlo3/lH29OXA3Pts+c10nxRxIBrDnoMqzhgdwVe5f2D6OzA==", "dev": true, "dependencies": { - "@typescript-eslint/types": "7.17.0", - "@typescript-eslint/visitor-keys": "7.17.0", + "@typescript-eslint/types": "7.18.0", + "@typescript-eslint/visitor-keys": "7.18.0", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", @@ -1227,15 +1242,15 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "7.17.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-7.17.0.tgz", - "integrity": "sha512-r+JFlm5NdB+JXc7aWWZ3fKSm1gn0pkswEwIYsrGPdsT2GjsRATAKXiNtp3vgAAO1xZhX8alIOEQnNMl3kbTgJw==", + "version": "7.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-7.18.0.tgz", + "integrity": "sha512-kK0/rNa2j74XuHVcoCZxdFBMF+aq/vH83CXAOHieC+2Gis4mF8jJXT5eAfyD3K0sAxtPuwxaIOIOvhwzVDt/kw==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.4.0", - "@typescript-eslint/scope-manager": "7.17.0", - "@typescript-eslint/types": "7.17.0", - "@typescript-eslint/typescript-estree": "7.17.0" + "@typescript-eslint/scope-manager": "7.18.0", + "@typescript-eslint/types": "7.18.0", + "@typescript-eslint/typescript-estree": "7.18.0" }, "engines": { "node": "^18.18.0 || >=20.0.0" @@ -1249,12 +1264,12 @@ } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "7.17.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.17.0.tgz", - "integrity": "sha512-RVGC9UhPOCsfCdI9pU++K4nD7to+jTcMIbXTSOcrLqUEW6gF2pU1UUbYJKc9cvcRSK1UDeMJ7pdMxf4bhMpV/A==", + "version": "7.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.18.0.tgz", + "integrity": "sha512-cDF0/Gf81QpY3xYyJKDV14Zwdmid5+uuENhjH2EqFaF0ni+yAyq/LzMaIJdhNJXZI7uLzwIlA+V7oWoyn6Curg==", "dev": true, "dependencies": { - "@typescript-eslint/types": "7.17.0", + "@typescript-eslint/types": "7.18.0", "eslint-visitor-keys": "^3.4.3" }, "engines": { @@ -1568,9 +1583,9 @@ } }, "node_modules/chai": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/chai/-/chai-4.4.1.tgz", - "integrity": "sha512-13sOfMv2+DWduEU+/xbun3LScLoqN17nBeTLUsmDfKdoiC1fr0n9PU4guu4AhRcOVFk/sW8LyZWHuhWtQZiF+g==", + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/chai/-/chai-4.5.0.tgz", + "integrity": "sha512-RITGBfijLkBddZvnn8jdqoTypxvqbOLYQkGGxXzeFjVHvudaPw0HNFD9x928/eUwYWd2dPCugVqspGALTZZQKw==", "dev": true, "dependencies": { "assertion-error": "^1.1.0", @@ -1579,7 +1594,7 @@ "get-func-name": "^2.0.2", "loupe": "^2.3.6", "pathval": "^1.1.1", - "type-detect": "^4.0.8" + "type-detect": "^4.1.0" }, "engines": { "node": ">=4" @@ -1877,9 +1892,9 @@ } }, "node_modules/debug": { - "version": "4.3.5", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.5.tgz", - "integrity": "sha512-pt0bNEmneDIvdL1Xsd9oDQ/wrQRkXDT4AUWlNZNPKvW5x/jyO9VFXkJUP07vQ2upmw5PlaITaPKc31jK13V+jg==", + "version": "4.3.6", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.6.tgz", + "integrity": "sha512-O/09Bd4Z1fBrU4VzkhFqVgpPzaGbw6Sm9FEkBT1A/YBXQFGuuSxa1dN2nxgxS34JmKXqYx8CZAwEVoJFImUXIg==", "dev": true, "dependencies": { "ms": "2.1.2" @@ -1987,15 +2002,6 @@ "node": ">=0.3.1" } }, - "node_modules/diff-sequences": { - "version": "29.6.3", - "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-29.6.3.tgz", - "integrity": "sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q==", - "dev": true, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, "node_modules/dir-glob": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", @@ -2272,6 +2278,21 @@ "node": ">=10.13.0" } }, + "node_modules/eslint/node_modules/globals": { + "version": "13.24.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", + "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", + "dev": true, + "dependencies": { + "type-fest": "^0.20.2" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/eslint/node_modules/minimatch": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", @@ -2378,9 +2399,9 @@ "dev": true }, "node_modules/fast-xml-parser": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-4.4.0.tgz", - "integrity": "sha512-kLY3jFlwIYwBNDojclKsNAC12sfD6NwW74QB2CoNGPvtVxjliYehVunB3HYyNi+n4Tt1dAcgwYvmKF/Z18flqg==", + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-4.4.1.tgz", + "integrity": "sha512-xkjOecfnKGkSsOwtZ5Pz7Us/T6mrbPQrq0nh+aCO5V9nk5NLWmasAHumTKjiPJPWANe+kAZ84Jc8ooJkzZ88Sw==", "dev": true, "funding": [ { @@ -2636,15 +2657,12 @@ } }, "node_modules/globals": { - "version": "13.24.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", - "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", + "version": "15.9.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-15.9.0.tgz", + "integrity": "sha512-SmSKyLLKFbSr6rptvP8izbyxJL4ILwqO9Jg23UA0sDlGlu58V59D1//I3vlc0KJphVdUR7vMjHIplYnzBxorQA==", "dev": true, - "dependencies": { - "type-fest": "^0.20.2" - }, "engines": { - "node": ">=8" + "node": ">=18" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" @@ -3062,9 +3080,9 @@ } }, "node_modules/knip": { - "version": "5.26.0", - "resolved": "https://registry.npmjs.org/knip/-/knip-5.26.0.tgz", - "integrity": "sha512-vOp+Wk86aqlPwElrUpxXyg6Q8w+j0j6wuzyu5p6k/mBWUI8iP91PCAz1Jzz9PGq5JYdptV7rFBYB9vHr7AFgqg==", + "version": "5.27.0", + "resolved": "https://registry.npmjs.org/knip/-/knip-5.27.0.tgz", + "integrity": "sha512-W8+jhO7i5pXRUqOzhJGm2DT5/d9aQjyrYTCSojqJxFOvi7ku/nHKzpBO3WNf4eflJo0t3zitmUkM69g53qoZQw==", "dev": true, "funding": [ { @@ -3135,9 +3153,9 @@ } }, "node_modules/knip/node_modules/pretty-ms": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/pretty-ms/-/pretty-ms-9.0.0.tgz", - "integrity": "sha512-E9e9HJ9R9NasGOgPaPE8VMeiPKAyWR5jcFpNnwIejslIhWqdqOrb2wShBsncMPUb+BcCd2OPYfh7p2W6oemTng==", + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/pretty-ms/-/pretty-ms-9.1.0.tgz", + "integrity": "sha512-o1piW0n3tgKIKCwk2vpM/vOV13zjJzvP37Ioze54YlTHE06m4tjEbzg9WsKkvTuyYln2DHjo5pY4qrZGI0otpw==", "dev": true, "dependencies": { "parse-ms": "^4.0.0" @@ -3227,9 +3245,9 @@ "dev": true }, "node_modules/lz-utils": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/lz-utils/-/lz-utils-2.0.2.tgz", - "integrity": "sha512-i1PJN4hNEevkrvLMqNWCCac1BcB5SRaghywG7HVzWOyVkFOasLCG19ND1sY1F/ZEsM6SnGtoXyBWnmfqOM5r6g==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/lz-utils/-/lz-utils-2.1.0.tgz", + "integrity": "sha512-CMkfimAypidTtWjNDxY8a1bc1mJdyEh04V2FfEQ5Zh8Nx4v7k850EYa+dOWGn9hKG5xOyHP5MkuduAZCTHRvJw==", "dev": true }, "node_modules/make-dir": { @@ -3471,16 +3489,10 @@ "node": ">=10" } }, - "node_modules/monocart-code-viewer": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/monocart-code-viewer/-/monocart-code-viewer-1.1.4.tgz", - "integrity": "sha512-ehSe1lBG7D1VDVLjTkHV63J3zAgzyhlC9OaxOri7D0X4L5/EcZUOG5TEoMmYErL+YGSOQXghU9kSSAelwNnp1Q==", - "dev": true - }, "node_modules/monocart-coverage-reports": { - "version": "2.9.3", - "resolved": "https://registry.npmjs.org/monocart-coverage-reports/-/monocart-coverage-reports-2.9.3.tgz", - "integrity": "sha512-guRHe/+FGwUc1x1XT4eKW4za5j9MQcq5Vp7CIZfzoGY1mwVp8LKZpDJUjoBkYAb5Xb+7CFAY3lSyNaQ8FKS6oQ==", + "version": "2.10.0", + "resolved": "https://registry.npmjs.org/monocart-coverage-reports/-/monocart-coverage-reports-2.10.0.tgz", + "integrity": "sha512-PxMFUGQ3gDVmQVbKejfwgXHncDDFX5zldPQLLbYNacDq7qFft2K8hvroEDGztQ5DionF9ztiqlbgKIGmeMyBeA==", "dev": true, "dependencies": { "@bcoe/v8-coverage": "^0.2.3", @@ -3490,18 +3502,13 @@ "acorn-walk": "^8.3.3", "commander": "^12.1.0", "console-grid": "^2.2.2", - "diff-sequences": "^29.6.3", "eight-colors": "^1.3.0", "foreground-child": "^3.2.1", "istanbul-lib-coverage": "^3.2.2", "istanbul-lib-report": "^3.0.1", "istanbul-reports": "^3.1.7", - "lz-utils": "^2.0.2", - "minimatch": "9.0.5", - "monocart-code-viewer": "^1.1.4", - "monocart-formatter": "^3.0.0", - "monocart-locator": "^1.0.2", - "turbogrid": "^3.2.0" + "lz-utils": "^2.1.0", + "monocart-locator": "^1.0.2" }, "bin": { "mcr": "lib/cli.js" @@ -3516,12 +3523,6 @@ "node": ">=18" } }, - "node_modules/monocart-formatter": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/monocart-formatter/-/monocart-formatter-3.0.0.tgz", - "integrity": "sha512-91OQpUb/9iDqvrblUv6ki11Jxi1d3Fp5u2jfVAPl3UdNp9TM+iBleLzXntUS51W0o+zoya3CJjZZ01z2XWn25g==", - "dev": true - }, "node_modules/monocart-locator": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/monocart-locator/-/monocart-locator-1.0.2.tgz", @@ -3877,9 +3878,9 @@ } }, "node_modules/qs": { - "version": "6.12.3", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.12.3.tgz", - "integrity": "sha512-AWJm14H1vVaO/iNZ4/hO+HyaTehuy9nRqVdkTqlJt0HWvBiBIEXFmb4C0DGeYo3Xes9rrEW+TxHsaigCbN5ICQ==", + "version": "6.13.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.13.0.tgz", + "integrity": "sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg==", "dev": true, "dependencies": { "side-channel": "^1.0.6" @@ -4429,12 +4430,6 @@ "node": ">=0.6.11 <=0.7.0 || >=0.7.3" } }, - "node_modules/turbogrid": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/turbogrid/-/turbogrid-3.2.0.tgz", - "integrity": "sha512-c+2qrCGWzoYpLlxtHgRJ4V5dDRE9fUT7D9maxtdBCqJ0NzCdY+x7xF3/F6cG/+n3VIzKfIS+p9Z/0YMQPf6k/Q==", - "dev": true - }, "node_modules/type-check": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", @@ -4448,9 +4443,9 @@ } }, "node_modules/type-detect": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", - "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.1.0.tgz", + "integrity": "sha512-Acylog8/luQ8L7il+geoSxhEkazvkslg7PSNKOX59mbB9cOveP5aq9h74Y7YU8yDpJwetzQQrfIwtf4Wp4LKcw==", "dev": true, "engines": { "node": ">=4" @@ -4498,14 +4493,14 @@ } }, "node_modules/typescript-eslint": { - "version": "7.17.0", - "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-7.17.0.tgz", - "integrity": "sha512-spQxsQvPguduCUfyUvLItvKqK3l8KJ/kqs5Pb/URtzQ5AC53Z6us32St37rpmlt2uESG23lOFpV4UErrmy4dZQ==", + "version": "7.18.0", + "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-7.18.0.tgz", + "integrity": "sha512-PonBkP603E3tt05lDkbOMyaxJjvKqQrXsnow72sVeOFINDE/qNmnnd+f9b4N+U7W6MXnnYyrhtmF2t08QWwUbA==", "dev": true, "dependencies": { - "@typescript-eslint/eslint-plugin": "7.17.0", - "@typescript-eslint/parser": "7.17.0", - "@typescript-eslint/utils": "7.17.0" + "@typescript-eslint/eslint-plugin": "7.18.0", + "@typescript-eslint/parser": "7.18.0", + "@typescript-eslint/utils": "7.18.0" }, "engines": { "node": "^18.18.0 || >=20.0.0" @@ -4533,15 +4528,15 @@ } }, "node_modules/underscore": { - "version": "1.13.6", - "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.13.6.tgz", - "integrity": "sha512-+A5Sja4HP1M08MaXya7p5LvjuM7K6q/2EaC0+iovj/wOcMsTzMvDFbasi/oSapiwOlt252IqsKqPjCl7huKS0A==", + "version": "1.13.7", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.13.7.tgz", + "integrity": "sha512-GMXzWtsc57XAtguZgaQViUOzs0KTkk8ojr3/xAxXLITqf/3EMwxC0inyETfDFjH/Krbhuep0HNbbjI9i/q3F3g==", "dev": true }, "node_modules/undici-types": { - "version": "5.26.5", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", - "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", + "version": "6.13.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.13.0.tgz", + "integrity": "sha512-xtFJHudx8S2DSoujjMd1WeWvn7KKWFRESZTMeL1RptAYERu29D6jphMjjY+vn96jvN3kVPDNxU/E13VTaXj6jg==", "dev": true }, "node_modules/universal-user-agent": { @@ -4828,9 +4823,9 @@ } }, "node_modules/zod-validation-error": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/zod-validation-error/-/zod-validation-error-3.3.0.tgz", - "integrity": "sha512-Syib9oumw1NTqEv4LT0e6U83Td9aVRk9iTXPUQr1otyV1PuXQKOvOwhMNqZIq5hluzHP2pMgnOmHEo7kPdI2mw==", + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/zod-validation-error/-/zod-validation-error-3.3.1.tgz", + "integrity": "sha512-uFzCZz7FQis256dqw4AhPQgD6f3pzNca/Zh62RNELavlumQB3nDIUFbF5JQfFLcMbO1s02Q7Xg/gpcOBlEnYZA==", "dev": true, "engines": { "node": ">=18.0.0" @@ -4896,9 +4891,9 @@ "optional": true }, "@dprint/typescript": { - "version": "0.91.4", - "resolved": "https://registry.npmjs.org/@dprint/typescript/-/typescript-0.91.4.tgz", - "integrity": "sha512-je/T8JF07xehOVS7rx6Xo7T8Aa1Sd/p/+e/b/J2RE8yJHu09O+L0aHBSvec+usjR8/QwCu23AuDLl47zFSey5Q==", + "version": "0.91.6", + "resolved": "https://registry.npmjs.org/@dprint/typescript/-/typescript-0.91.6.tgz", + "integrity": "sha512-rbgODMD0hsQJ6w32eMELqt+KnkzxVVLT4qRMcvlz8PsFwSPyIfBslpZcFhmJWdyurVKKNcUPNC6Aq9PcUIX13w==", "dev": true }, "@dprint/win32-arm64": { @@ -5151,6 +5146,15 @@ "concat-map": "0.0.1" } }, + "globals": { + "version": "13.24.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", + "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", + "dev": true, + "requires": { + "type-fest": "^0.20.2" + } + }, "minimatch": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", @@ -5431,9 +5435,9 @@ } }, "@types/chai": { - "version": "4.3.16", - "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.3.16.tgz", - "integrity": "sha512-PatH4iOdyh3MyWtmHVFXLWCCIhUbopaltqddG9BzB+gMIzee2MJrvd+jouii9Z3wzQJruGWAm7WOMjgfG8hQlQ==", + "version": "4.3.17", + "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.3.17.tgz", + "integrity": "sha512-zmZ21EWzR71B4Sscphjief5djsLre50M6lI622OSySTmn9DB3j+C3kWroHfBQWXbOBwbgg/M8CG/hUxDLIloow==", "dev": true }, "@types/diff": { @@ -5467,12 +5471,12 @@ "dev": true }, "@types/node": { - "version": "20.14.11", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.14.11.tgz", - "integrity": "sha512-kprQpL8MMeszbz6ojB5/tU8PLN4kesnN8Gjzw349rDlNgsSzg90lAVj3llK99Dh7JON+t9AuscPPFW6mPbTnSA==", + "version": "22.1.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.1.0.tgz", + "integrity": "sha512-AOmuRF0R2/5j1knA3c6G3HOk523Ga+l+ZXltX8SF1+5oqcXijjfTd8fY3XRZqSihEu9XhtQnKYLmkFaoxgsJHw==", "dev": true, "requires": { - "undici-types": "~5.26.4" + "undici-types": "~6.13.0" } }, "@types/source-map-support": { @@ -5491,16 +5495,16 @@ "dev": true }, "@typescript-eslint/eslint-plugin": { - "version": "7.17.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.17.0.tgz", - "integrity": "sha512-pyiDhEuLM3PuANxH7uNYan1AaFs5XE0zw1hq69JBvGvE7gSuEoQl1ydtEe/XQeoC3GQxLXyOVa5kNOATgM638A==", + "version": "7.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.18.0.tgz", + "integrity": "sha512-94EQTWZ40mzBc42ATNIBimBEDltSJ9RQHCC8vc/PDbxi4k8dVwUAv4o98dk50M1zB+JGFxp43FP7f8+FP8R6Sw==", "dev": true, "requires": { "@eslint-community/regexpp": "^4.10.0", - "@typescript-eslint/scope-manager": "7.17.0", - "@typescript-eslint/type-utils": "7.17.0", - "@typescript-eslint/utils": "7.17.0", - "@typescript-eslint/visitor-keys": "7.17.0", + "@typescript-eslint/scope-manager": "7.18.0", + "@typescript-eslint/type-utils": "7.18.0", + "@typescript-eslint/utils": "7.18.0", + "@typescript-eslint/visitor-keys": "7.18.0", "graphemer": "^1.4.0", "ignore": "^5.3.1", "natural-compare": "^1.4.0", @@ -5508,54 +5512,54 @@ } }, "@typescript-eslint/parser": { - "version": "7.17.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-7.17.0.tgz", - "integrity": "sha512-puiYfGeg5Ydop8eusb/Hy1k7QmOU6X3nvsqCgzrB2K4qMavK//21+PzNE8qeECgNOIoertJPUC1SpegHDI515A==", + "version": "7.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-7.18.0.tgz", + "integrity": "sha512-4Z+L8I2OqhZV8qA132M4wNL30ypZGYOQVBfMgxDH/K5UX0PNqTu1c6za9ST5r9+tavvHiTWmBnKzpCJ/GlVFtg==", "dev": true, "requires": { - "@typescript-eslint/scope-manager": "7.17.0", - "@typescript-eslint/types": "7.17.0", - "@typescript-eslint/typescript-estree": "7.17.0", - "@typescript-eslint/visitor-keys": "7.17.0", + "@typescript-eslint/scope-manager": "7.18.0", + "@typescript-eslint/types": "7.18.0", + "@typescript-eslint/typescript-estree": "7.18.0", + "@typescript-eslint/visitor-keys": "7.18.0", "debug": "^4.3.4" } }, "@typescript-eslint/scope-manager": { - "version": "7.17.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.17.0.tgz", - "integrity": "sha512-0P2jTTqyxWp9HiKLu/Vemr2Rg1Xb5B7uHItdVZ6iAenXmPo4SZ86yOPCJwMqpCyaMiEHTNqizHfsbmCFT1x9SA==", + "version": "7.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.18.0.tgz", + "integrity": "sha512-jjhdIE/FPF2B7Z1uzc6i3oWKbGcHb87Qw7AWj6jmEqNOfDFbJWtjt/XfwCpvNkpGWlcJaog5vTR+VV8+w9JflA==", "dev": true, "requires": { - "@typescript-eslint/types": "7.17.0", - "@typescript-eslint/visitor-keys": "7.17.0" + "@typescript-eslint/types": "7.18.0", + "@typescript-eslint/visitor-keys": "7.18.0" } }, "@typescript-eslint/type-utils": { - "version": "7.17.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-7.17.0.tgz", - "integrity": "sha512-XD3aaBt+orgkM/7Cei0XNEm1vwUxQ958AOLALzPlbPqb8C1G8PZK85tND7Jpe69Wualri81PLU+Zc48GVKIMMA==", + "version": "7.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-7.18.0.tgz", + "integrity": "sha512-XL0FJXuCLaDuX2sYqZUUSOJ2sG5/i1AAze+axqmLnSkNEVMVYLF+cbwlB2w8D1tinFuSikHmFta+P+HOofrLeA==", "dev": true, "requires": { - "@typescript-eslint/typescript-estree": "7.17.0", - "@typescript-eslint/utils": "7.17.0", + "@typescript-eslint/typescript-estree": "7.18.0", + "@typescript-eslint/utils": "7.18.0", "debug": "^4.3.4", "ts-api-utils": "^1.3.0" } }, "@typescript-eslint/types": { - "version": "7.17.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.17.0.tgz", - "integrity": "sha512-a29Ir0EbyKTKHnZWbNsrc/gqfIBqYPwj3F2M+jWE/9bqfEHg0AMtXzkbUkOG6QgEScxh2+Pz9OXe11jHDnHR7A==", + "version": "7.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.18.0.tgz", + "integrity": "sha512-iZqi+Ds1y4EDYUtlOOC+aUmxnE9xS/yCigkjA7XpTKV6nCBd3Hp/PRGGmdwnfkV2ThMyYldP1wRpm/id99spTQ==", "dev": true }, "@typescript-eslint/typescript-estree": { - "version": "7.17.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.17.0.tgz", - "integrity": "sha512-72I3TGq93t2GoSBWI093wmKo0n6/b7O4j9o8U+f65TVD0FS6bI2180X5eGEr8MA8PhKMvYe9myZJquUT2JkCZw==", + "version": "7.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.18.0.tgz", + "integrity": "sha512-aP1v/BSPnnyhMHts8cf1qQ6Q1IFwwRvAQGRvBFkWlo3/lH29OXA3Pts+c10nxRxIBrDnoMqzhgdwVe5f2D6OzA==", "dev": true, "requires": { - "@typescript-eslint/types": "7.17.0", - "@typescript-eslint/visitor-keys": "7.17.0", + "@typescript-eslint/types": "7.18.0", + "@typescript-eslint/visitor-keys": "7.18.0", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", @@ -5565,24 +5569,24 @@ } }, "@typescript-eslint/utils": { - "version": "7.17.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-7.17.0.tgz", - "integrity": "sha512-r+JFlm5NdB+JXc7aWWZ3fKSm1gn0pkswEwIYsrGPdsT2GjsRATAKXiNtp3vgAAO1xZhX8alIOEQnNMl3kbTgJw==", + "version": "7.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-7.18.0.tgz", + "integrity": "sha512-kK0/rNa2j74XuHVcoCZxdFBMF+aq/vH83CXAOHieC+2Gis4mF8jJXT5eAfyD3K0sAxtPuwxaIOIOvhwzVDt/kw==", "dev": true, "requires": { "@eslint-community/eslint-utils": "^4.4.0", - "@typescript-eslint/scope-manager": "7.17.0", - "@typescript-eslint/types": "7.17.0", - "@typescript-eslint/typescript-estree": "7.17.0" + "@typescript-eslint/scope-manager": "7.18.0", + "@typescript-eslint/types": "7.18.0", + "@typescript-eslint/typescript-estree": "7.18.0" } }, "@typescript-eslint/visitor-keys": { - "version": "7.17.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.17.0.tgz", - "integrity": "sha512-RVGC9UhPOCsfCdI9pU++K4nD7to+jTcMIbXTSOcrLqUEW6gF2pU1UUbYJKc9cvcRSK1UDeMJ7pdMxf4bhMpV/A==", + "version": "7.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.18.0.tgz", + "integrity": "sha512-cDF0/Gf81QpY3xYyJKDV14Zwdmid5+uuENhjH2EqFaF0ni+yAyq/LzMaIJdhNJXZI7uLzwIlA+V7oWoyn6Curg==", "dev": true, "requires": { - "@typescript-eslint/types": "7.17.0", + "@typescript-eslint/types": "7.18.0", "eslint-visitor-keys": "^3.4.3" } }, @@ -5803,9 +5807,9 @@ "dev": true }, "chai": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/chai/-/chai-4.4.1.tgz", - "integrity": "sha512-13sOfMv2+DWduEU+/xbun3LScLoqN17nBeTLUsmDfKdoiC1fr0n9PU4guu4AhRcOVFk/sW8LyZWHuhWtQZiF+g==", + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/chai/-/chai-4.5.0.tgz", + "integrity": "sha512-RITGBfijLkBddZvnn8jdqoTypxvqbOLYQkGGxXzeFjVHvudaPw0HNFD9x928/eUwYWd2dPCugVqspGALTZZQKw==", "dev": true, "requires": { "assertion-error": "^1.1.0", @@ -5814,7 +5818,7 @@ "get-func-name": "^2.0.2", "loupe": "^2.3.6", "pathval": "^1.1.1", - "type-detect": "^4.0.8" + "type-detect": "^4.1.0" } }, "chalk": { @@ -6044,9 +6048,9 @@ "dev": true }, "debug": { - "version": "4.3.5", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.5.tgz", - "integrity": "sha512-pt0bNEmneDIvdL1Xsd9oDQ/wrQRkXDT4AUWlNZNPKvW5x/jyO9VFXkJUP07vQ2upmw5PlaITaPKc31jK13V+jg==", + "version": "4.3.6", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.6.tgz", + "integrity": "sha512-O/09Bd4Z1fBrU4VzkhFqVgpPzaGbw6Sm9FEkBT1A/YBXQFGuuSxa1dN2nxgxS34JmKXqYx8CZAwEVoJFImUXIg==", "dev": true, "requires": { "ms": "2.1.2" @@ -6124,12 +6128,6 @@ "integrity": "sha512-uIFDxqpRZGZ6ThOk84hEfqWoHx2devRFvpTZcTHur85vImfaxUbTW9Ryh4CpCuDnToOP1CEtXKIgytHBPVff5A==", "dev": true }, - "diff-sequences": { - "version": "29.6.3", - "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-29.6.3.tgz", - "integrity": "sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q==", - "dev": true - }, "dir-glob": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", @@ -6316,6 +6314,15 @@ "is-glob": "^4.0.3" } }, + "globals": { + "version": "13.24.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", + "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", + "dev": true, + "requires": { + "type-fest": "^0.20.2" + } + }, "minimatch": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", @@ -6426,9 +6433,9 @@ "dev": true }, "fast-xml-parser": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-4.4.0.tgz", - "integrity": "sha512-kLY3jFlwIYwBNDojclKsNAC12sfD6NwW74QB2CoNGPvtVxjliYehVunB3HYyNi+n4Tt1dAcgwYvmKF/Z18flqg==", + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-4.4.1.tgz", + "integrity": "sha512-xkjOecfnKGkSsOwtZ5Pz7Us/T6mrbPQrq0nh+aCO5V9nk5NLWmasAHumTKjiPJPWANe+kAZ84Jc8ooJkzZ88Sw==", "dev": true, "requires": { "strnum": "^1.0.5" @@ -6597,13 +6604,10 @@ } }, "globals": { - "version": "13.24.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", - "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", - "dev": true, - "requires": { - "type-fest": "^0.20.2" - } + "version": "15.9.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-15.9.0.tgz", + "integrity": "sha512-SmSKyLLKFbSr6rptvP8izbyxJL4ILwqO9Jg23UA0sDlGlu58V59D1//I3vlc0KJphVdUR7vMjHIplYnzBxorQA==", + "dev": true }, "globby": { "version": "11.1.0", @@ -6906,9 +6910,9 @@ } }, "knip": { - "version": "5.26.0", - "resolved": "https://registry.npmjs.org/knip/-/knip-5.26.0.tgz", - "integrity": "sha512-vOp+Wk86aqlPwElrUpxXyg6Q8w+j0j6wuzyu5p6k/mBWUI8iP91PCAz1Jzz9PGq5JYdptV7rFBYB9vHr7AFgqg==", + "version": "5.27.0", + "resolved": "https://registry.npmjs.org/knip/-/knip-5.27.0.tgz", + "integrity": "sha512-W8+jhO7i5pXRUqOzhJGm2DT5/d9aQjyrYTCSojqJxFOvi7ku/nHKzpBO3WNf4eflJo0t3zitmUkM69g53qoZQw==", "dev": true, "requires": { "@nodelib/fs.walk": "1.2.8", @@ -6942,9 +6946,9 @@ "dev": true }, "pretty-ms": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/pretty-ms/-/pretty-ms-9.0.0.tgz", - "integrity": "sha512-E9e9HJ9R9NasGOgPaPE8VMeiPKAyWR5jcFpNnwIejslIhWqdqOrb2wShBsncMPUb+BcCd2OPYfh7p2W6oemTng==", + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/pretty-ms/-/pretty-ms-9.1.0.tgz", + "integrity": "sha512-o1piW0n3tgKIKCwk2vpM/vOV13zjJzvP37Ioze54YlTHE06m4tjEbzg9WsKkvTuyYln2DHjo5pY4qrZGI0otpw==", "dev": true, "requires": { "parse-ms": "^4.0.0" @@ -7009,9 +7013,9 @@ "dev": true }, "lz-utils": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/lz-utils/-/lz-utils-2.0.2.tgz", - "integrity": "sha512-i1PJN4hNEevkrvLMqNWCCac1BcB5SRaghywG7HVzWOyVkFOasLCG19ND1sY1F/ZEsM6SnGtoXyBWnmfqOM5r6g==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/lz-utils/-/lz-utils-2.1.0.tgz", + "integrity": "sha512-CMkfimAypidTtWjNDxY8a1bc1mJdyEh04V2FfEQ5Zh8Nx4v7k850EYa+dOWGn9hKG5xOyHP5MkuduAZCTHRvJw==", "dev": true }, "make-dir": { @@ -7193,16 +7197,10 @@ "integrity": "sha512-nCf6dmCEHObJ8BBrcjW+UHYvVtHEL+FliYR/Mfc/v7dKenNmBQ0ZSuvlICgsyQy9Tt581ldvh+SReS4qp4LrQw==", "dev": true }, - "monocart-code-viewer": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/monocart-code-viewer/-/monocart-code-viewer-1.1.4.tgz", - "integrity": "sha512-ehSe1lBG7D1VDVLjTkHV63J3zAgzyhlC9OaxOri7D0X4L5/EcZUOG5TEoMmYErL+YGSOQXghU9kSSAelwNnp1Q==", - "dev": true - }, "monocart-coverage-reports": { - "version": "2.9.3", - "resolved": "https://registry.npmjs.org/monocart-coverage-reports/-/monocart-coverage-reports-2.9.3.tgz", - "integrity": "sha512-guRHe/+FGwUc1x1XT4eKW4za5j9MQcq5Vp7CIZfzoGY1mwVp8LKZpDJUjoBkYAb5Xb+7CFAY3lSyNaQ8FKS6oQ==", + "version": "2.10.0", + "resolved": "https://registry.npmjs.org/monocart-coverage-reports/-/monocart-coverage-reports-2.10.0.tgz", + "integrity": "sha512-PxMFUGQ3gDVmQVbKejfwgXHncDDFX5zldPQLLbYNacDq7qFft2K8hvroEDGztQ5DionF9ztiqlbgKIGmeMyBeA==", "dev": true, "requires": { "@bcoe/v8-coverage": "^0.2.3", @@ -7212,18 +7210,13 @@ "acorn-walk": "^8.3.3", "commander": "^12.1.0", "console-grid": "^2.2.2", - "diff-sequences": "^29.6.3", "eight-colors": "^1.3.0", "foreground-child": "^3.2.1", "istanbul-lib-coverage": "^3.2.2", "istanbul-lib-report": "^3.0.1", "istanbul-reports": "^3.1.7", - "lz-utils": "^2.0.2", - "minimatch": "9.0.5", - "monocart-code-viewer": "^1.1.4", - "monocart-formatter": "^3.0.0", - "monocart-locator": "^1.0.2", - "turbogrid": "^3.2.0" + "lz-utils": "^2.1.0", + "monocart-locator": "^1.0.2" }, "dependencies": { "commander": { @@ -7234,12 +7227,6 @@ } } }, - "monocart-formatter": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/monocart-formatter/-/monocart-formatter-3.0.0.tgz", - "integrity": "sha512-91OQpUb/9iDqvrblUv6ki11Jxi1d3Fp5u2jfVAPl3UdNp9TM+iBleLzXntUS51W0o+zoya3CJjZZ01z2XWn25g==", - "dev": true - }, "monocart-locator": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/monocart-locator/-/monocart-locator-1.0.2.tgz", @@ -7472,9 +7459,9 @@ "dev": true }, "qs": { - "version": "6.12.3", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.12.3.tgz", - "integrity": "sha512-AWJm14H1vVaO/iNZ4/hO+HyaTehuy9nRqVdkTqlJt0HWvBiBIEXFmb4C0DGeYo3Xes9rrEW+TxHsaigCbN5ICQ==", + "version": "6.13.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.13.0.tgz", + "integrity": "sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg==", "dev": true, "requires": { "side-channel": "^1.0.6" @@ -7843,12 +7830,6 @@ "integrity": "sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==", "dev": true }, - "turbogrid": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/turbogrid/-/turbogrid-3.2.0.tgz", - "integrity": "sha512-c+2qrCGWzoYpLlxtHgRJ4V5dDRE9fUT7D9maxtdBCqJ0NzCdY+x7xF3/F6cG/+n3VIzKfIS+p9Z/0YMQPf6k/Q==", - "dev": true - }, "type-check": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", @@ -7859,9 +7840,9 @@ } }, "type-detect": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", - "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.1.0.tgz", + "integrity": "sha512-Acylog8/luQ8L7il+geoSxhEkazvkslg7PSNKOX59mbB9cOveP5aq9h74Y7YU8yDpJwetzQQrfIwtf4Wp4LKcw==", "dev": true }, "type-fest": { @@ -7890,14 +7871,14 @@ "dev": true }, "typescript-eslint": { - "version": "7.17.0", - "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-7.17.0.tgz", - "integrity": "sha512-spQxsQvPguduCUfyUvLItvKqK3l8KJ/kqs5Pb/URtzQ5AC53Z6us32St37rpmlt2uESG23lOFpV4UErrmy4dZQ==", + "version": "7.18.0", + "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-7.18.0.tgz", + "integrity": "sha512-PonBkP603E3tt05lDkbOMyaxJjvKqQrXsnow72sVeOFINDE/qNmnnd+f9b4N+U7W6MXnnYyrhtmF2t08QWwUbA==", "dev": true, "requires": { - "@typescript-eslint/eslint-plugin": "7.17.0", - "@typescript-eslint/parser": "7.17.0", - "@typescript-eslint/utils": "7.17.0" + "@typescript-eslint/eslint-plugin": "7.18.0", + "@typescript-eslint/parser": "7.18.0", + "@typescript-eslint/utils": "7.18.0" } }, "typical": { @@ -7907,15 +7888,15 @@ "dev": true }, "underscore": { - "version": "1.13.6", - "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.13.6.tgz", - "integrity": "sha512-+A5Sja4HP1M08MaXya7p5LvjuM7K6q/2EaC0+iovj/wOcMsTzMvDFbasi/oSapiwOlt252IqsKqPjCl7huKS0A==", + "version": "1.13.7", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.13.7.tgz", + "integrity": "sha512-GMXzWtsc57XAtguZgaQViUOzs0KTkk8ojr3/xAxXLITqf/3EMwxC0inyETfDFjH/Krbhuep0HNbbjI9i/q3F3g==", "dev": true }, "undici-types": { - "version": "5.26.5", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", - "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", + "version": "6.13.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.13.0.tgz", + "integrity": "sha512-xtFJHudx8S2DSoujjMd1WeWvn7KKWFRESZTMeL1RptAYERu29D6jphMjjY+vn96jvN3kVPDNxU/E13VTaXj6jg==", "dev": true }, "universal-user-agent": { @@ -8132,9 +8113,9 @@ "dev": true }, "zod-validation-error": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/zod-validation-error/-/zod-validation-error-3.3.0.tgz", - "integrity": "sha512-Syib9oumw1NTqEv4LT0e6U83Td9aVRk9iTXPUQr1otyV1PuXQKOvOwhMNqZIq5hluzHP2pMgnOmHEo7kPdI2mw==", + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/zod-validation-error/-/zod-validation-error-3.3.1.tgz", + "integrity": "sha512-uFzCZz7FQis256dqw4AhPQgD6f3pzNca/Zh62RNELavlumQB3nDIUFbF5JQfFLcMbO1s02Q7Xg/gpcOBlEnYZA==", "dev": true, "requires": {} } diff --git a/package.json b/package.json index a1cd7a798b211..71c804ccdccaa 100644 --- a/package.json +++ b/package.json @@ -40,11 +40,11 @@ ], "devDependencies": { "@dprint/formatter": "^0.4.1", - "@dprint/typescript": "0.91.4", + "@dprint/typescript": "0.91.6", "@esfx/canceltoken": "^1.0.0", "@eslint/js": "^8.57.0", "@octokit/rest": "^21.0.1", - "@types/chai": "^4.3.16", + "@types/chai": "^4.3.17", "@types/diff": "^5.2.1", "@types/minimist": "^1.2.5", "@types/mocha": "^10.0.7", @@ -52,10 +52,10 @@ "@types/node": "latest", "@types/source-map-support": "^0.5.10", "@types/which": "^3.0.4", - "@typescript-eslint/utils": "^7.17.0", + "@typescript-eslint/utils": "^7.18.0", "azure-devops-node-api": "^14.0.1", "c8": "^10.1.2", - "chai": "^4.4.1", + "chai": "^4.5.0", "chalk": "^4.1.2", "chokidar": "^3.6.0", "diff": "^5.2.0", @@ -63,23 +63,23 @@ "esbuild": "^0.23.0", "eslint": "^8.57.0", "eslint-formatter-autolinkable-stylish": "^1.3.0", - "fast-xml-parser": "^4.4.0", + "fast-xml-parser": "^4.4.1", "glob": "^10.4.5", - "globals": "^13.24.0", + "globals": "^15.9.0", "hereby": "^1.9.0", "jsonc-parser": "^3.3.1", - "knip": "^5.26.0", + "knip": "^5.27.0", "minimist": "^1.2.8", "mocha": "^10.7.0", "mocha-fivemat-progress-reporter": "^0.1.0", - "monocart-coverage-reports": "^2.9.3", + "monocart-coverage-reports": "^2.10.0", "ms": "^2.1.3", "node-fetch": "^3.3.2", "playwright": "^1.45.3", "source-map-support": "^0.5.21", "tslib": "^2.6.3", "typescript": "^5.5.4", - "typescript-eslint": "^7.17.0", + "typescript-eslint": "^7.18.0", "which": "^3.0.1" }, "overrides": { From e078a9367eb6cf7a1e8b33dd94fadbdba054ac9c Mon Sep 17 00:00:00 2001 From: "CSIGS@microsoft.com" Date: Fri, 2 Aug 2024 12:22:28 -0700 Subject: [PATCH 03/50] LEGO: Pull request from lego/hb_5378966c-b857-470a-8675-daebef4a6da1_20240802111725489 to main (#59511) --- .../diagnosticMessages.generated.json.lcl | 849 +++++++++++++++++- 1 file changed, 843 insertions(+), 6 deletions(-) diff --git a/src/loc/lcl/cht/diagnosticMessages/diagnosticMessages.generated.json.lcl b/src/loc/lcl/cht/diagnosticMessages/diagnosticMessages.generated.json.lcl index 6910094eaeaed..8c99492152309 100644 --- a/src/loc/lcl/cht/diagnosticMessages/diagnosticMessages.generated.json.lcl +++ b/src/loc/lcl/cht/diagnosticMessages/diagnosticMessages.generated.json.lcl @@ -51,6 +51,9 @@ + + + @@ -66,6 +69,9 @@ + + + @@ -117,12 +123,18 @@ + + + + + + @@ -147,12 +159,18 @@ + + + + + + @@ -318,6 +336,9 @@ + + + @@ -387,6 +408,9 @@ + + + @@ -432,6 +456,9 @@ + + + @@ -909,6 +936,9 @@ + + + @@ -1050,6 +1080,9 @@ + + + @@ -1110,48 +1143,72 @@ + + + + + + + + + + + + + + + + + + + + + + + + @@ -1221,6 +1278,9 @@ + + + @@ -1254,18 +1314,27 @@ + + + + + + + + + @@ -1437,6 +1506,9 @@ + + + @@ -1479,12 +1551,18 @@ + + + + + + @@ -1530,6 +1608,9 @@ + + + @@ -1581,18 +1662,27 @@ + + + + + + + + + @@ -1824,6 +1914,9 @@ + + + @@ -1965,6 +2058,9 @@ + + + @@ -2100,24 +2196,36 @@ + + + + + + + + + + + + @@ -2181,6 +2289,9 @@ + + + @@ -2223,6 +2334,9 @@ + + + @@ -2346,6 +2460,9 @@ + + + @@ -2415,6 +2532,9 @@ + + + @@ -2475,6 +2595,9 @@ + + + @@ -2499,12 +2622,18 @@ + + + + + + @@ -2586,6 +2715,9 @@ + + + @@ -2610,6 +2742,9 @@ + + + @@ -2625,6 +2760,9 @@ + + + @@ -2739,6 +2877,9 @@ + + + @@ -2802,6 +2943,9 @@ + + + @@ -2901,6 +3045,9 @@ + + + @@ -2916,12 +3063,18 @@ + + + + + + @@ -3168,6 +3321,9 @@ + + + @@ -3252,12 +3408,18 @@ + + + + + + @@ -3444,12 +3606,18 @@ + + + + + + @@ -3525,6 +3693,9 @@ + + + @@ -3684,6 +3855,9 @@ + + + @@ -3849,6 +4023,9 @@ + + + @@ -3939,6 +4116,9 @@ + + + @@ -4068,6 +4248,9 @@ + + + @@ -4083,6 +4266,9 @@ + + + @@ -4107,6 +4293,9 @@ + + + @@ -4347,6 +4536,9 @@ + + + @@ -4569,6 +4761,9 @@ + + + @@ -4701,6 +4896,9 @@ + + + @@ -4764,12 +4962,18 @@ + + + + + + @@ -4785,6 +4989,9 @@ + + + @@ -4809,6 +5016,9 @@ + + + @@ -4842,7 +5052,7 @@ - + @@ -4965,6 +5175,9 @@ + + + @@ -4989,6 +5202,9 @@ + + + @@ -5022,6 +5238,9 @@ + + + @@ -5322,6 +5541,9 @@ + + + @@ -5592,6 +5814,9 @@ + + + @@ -5727,6 +5952,9 @@ + + + @@ -5754,30 +5982,45 @@ + + + + + + + + + + + + + + + @@ -6030,12 +6273,18 @@ + + + + + + @@ -6213,6 +6462,9 @@ + + + @@ -6291,12 +6543,18 @@ + + + + + + @@ -6333,6 +6591,9 @@ + + + @@ -6348,6 +6609,9 @@ + + + @@ -6363,6 +6627,9 @@ + + + @@ -6423,30 +6690,45 @@ + + + + + + + + + + + + + + + @@ -6645,6 +6927,9 @@ + + + @@ -6705,30 +6990,45 @@ + + + + + + + + + + + + + + + @@ -6744,6 +7044,9 @@ + + + @@ -6813,6 +7116,9 @@ + + + @@ -6846,12 +7152,18 @@ + + + + + + @@ -6894,6 +7206,9 @@ + + + @@ -6963,6 +7278,9 @@ + + + @@ -7143,6 +7461,9 @@ + + + @@ -7233,6 +7554,9 @@ + + + @@ -7293,6 +7617,9 @@ + + + @@ -7308,24 +7635,36 @@ + + + + + + + + + + + + @@ -7377,6 +7716,9 @@ + + + @@ -7704,6 +8046,9 @@ + + + @@ -7815,12 +8160,18 @@ + + + + + + @@ -7845,12 +8196,18 @@ + + + + + + @@ -7875,24 +8232,36 @@ + + + + + + + + + + + + @@ -8112,6 +8481,9 @@ + + + @@ -8196,6 +8568,9 @@ + + + @@ -8262,6 +8637,9 @@ + + + @@ -8415,6 +8793,9 @@ + + + @@ -8448,6 +8829,9 @@ + + + @@ -8517,6 +8901,9 @@ + + + @@ -8568,6 +8955,9 @@ + + + @@ -8583,6 +8973,9 @@ + + + @@ -8862,12 +9255,18 @@ + + + + + + @@ -8958,6 +9357,9 @@ + + + @@ -9063,6 +9465,9 @@ + + + @@ -9219,6 +9624,9 @@ + + + @@ -9327,6 +9735,9 @@ + + + @@ -9342,6 +9753,9 @@ + + + @@ -9384,12 +9798,18 @@ + + + + + + @@ -9432,12 +9852,18 @@ + + + + + + @@ -9543,7 +9969,7 @@ - + @@ -9555,12 +9981,18 @@ + + + + + + @@ -9576,12 +10008,18 @@ + + + + + + @@ -9642,6 +10080,9 @@ + + + @@ -9729,12 +10170,18 @@ + + + + + + @@ -9750,24 +10197,36 @@ + + + + + + + + + + + + @@ -9819,6 +10278,9 @@ + + + @@ -9870,6 +10332,9 @@ + + + @@ -9885,12 +10350,18 @@ + + + + + + @@ -9915,6 +10386,9 @@ + + + @@ -9930,12 +10404,18 @@ + + + + + + @@ -9978,24 +10458,36 @@ + + + + + + + + + + + + @@ -10032,18 +10524,27 @@ + + + + + + + + + @@ -10059,24 +10560,36 @@ + + + + + + + + + + + + @@ -10506,6 +11019,9 @@ + + + @@ -10746,6 +11262,9 @@ + + + @@ -10818,18 +11337,27 @@ + + + + + + + + + @@ -10845,6 +11373,9 @@ + + + @@ -11262,6 +11793,9 @@ + + + @@ -11331,6 +11865,9 @@ + + + @@ -11355,6 +11892,9 @@ + + + @@ -11508,18 +12048,27 @@ + + + + + + + + + @@ -11571,12 +12120,18 @@ + + + + + + @@ -11889,6 +12444,9 @@ + + + @@ -11931,12 +12489,18 @@ + + + + + + @@ -11952,6 +12516,9 @@ + + + @@ -12042,6 +12609,9 @@ + + + @@ -12453,6 +13023,9 @@ + + + @@ -12513,12 +13086,18 @@ + + + + + + @@ -12642,6 +13221,9 @@ + + + @@ -12675,6 +13257,9 @@ + + + @@ -13245,6 +13830,9 @@ + + + @@ -13272,6 +13860,9 @@ + + + @@ -13443,6 +14034,9 @@ + + + @@ -13503,18 +14097,27 @@ + + + + + + + + + @@ -13761,12 +14364,18 @@ + + + + + + @@ -13836,12 +14445,18 @@ + + + + + + @@ -13947,6 +14562,9 @@ + + + @@ -14142,12 +14760,18 @@ + + + + + + @@ -14163,12 +14787,18 @@ + + + + + + @@ -14367,24 +14997,36 @@ + + + + + + + + + + + + @@ -14409,24 +15051,36 @@ + + + + + + + + + + + + @@ -14487,6 +15141,9 @@ + + + @@ -14538,12 +15195,18 @@ + + + + + + @@ -14658,6 +15321,9 @@ + + + @@ -14700,12 +15366,18 @@ + + + + + + @@ -14820,8 +15492,8 @@ - - + + @@ -14832,6 +15504,9 @@ + + + @@ -14847,8 +15522,8 @@ - - + + @@ -15015,6 +15690,9 @@ + + + @@ -15048,6 +15726,9 @@ + + + @@ -15126,6 +15807,9 @@ + + + @@ -15345,6 +16029,9 @@ + + + @@ -15378,6 +16065,9 @@ + + + @@ -15792,12 +16482,18 @@ + + + + + + @@ -15876,36 +16572,54 @@ + + + + + + + + + + + + + + + + + + @@ -15966,6 +16680,9 @@ + + + @@ -16098,6 +16815,9 @@ + + + @@ -16131,6 +16851,9 @@ + + + @@ -16164,6 +16887,9 @@ + + + @@ -16179,18 +16905,27 @@ + + + + + + + + + @@ -16332,12 +17067,18 @@ + + + + + + @@ -16464,6 +17205,9 @@ + + + @@ -16497,6 +17241,9 @@ + + + @@ -16611,12 +17358,18 @@ + + + + + + @@ -16722,6 +17475,9 @@ + + + @@ -16737,12 +17493,18 @@ + + + + + + @@ -16758,6 +17520,9 @@ + + + @@ -16836,6 +17601,9 @@ + + + @@ -17043,6 +17811,9 @@ + + + @@ -17094,12 +17865,18 @@ + + + + + + @@ -17172,6 +17949,9 @@ + + + @@ -17244,36 +18024,54 @@ + + + + + + + + + + + + + + + + + + @@ -17391,6 +18189,9 @@ + + + @@ -17433,18 +18234,27 @@ + + + + + + + + + @@ -17463,6 +18273,9 @@ + + + @@ -17514,6 +18327,9 @@ + + + @@ -17685,6 +18501,9 @@ + + + @@ -17745,6 +18564,9 @@ + + + @@ -17877,6 +18699,9 @@ + + + @@ -17946,12 +18771,18 @@ + + + + + + @@ -18003,6 +18834,9 @@ + + + @@ -18183,6 +19017,9 @@ + + + From 6f646429e05e80e2a1b596b35357fc018bef831a Mon Sep 17 00:00:00 2001 From: Ryan Cavanaugh Date: Fri, 2 Aug 2024 12:51:07 -0700 Subject: [PATCH 04/50] Remove incorrect call to checkTruthinessExpression (#59507) --- src/compiler/checker.ts | 2 +- .../nullishCoalescingOperator7.errors.txt | 24 ----------------- .../reference/predicateSemantics.errors.txt | 3 +++ .../baselines/reference/predicateSemantics.js | 5 ++++ .../reference/predicateSemantics.symbols | 9 +++++++ .../reference/predicateSemantics.types | 27 +++++++++++++++++++ tests/cases/compiler/predicateSemantics.ts | 3 +++ 7 files changed, 48 insertions(+), 25 deletions(-) delete mode 100644 tests/baselines/reference/nullishCoalescingOperator7.errors.txt diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index c095639094515..702c8850afe42 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -44186,7 +44186,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { bothHelper(location, body); return; } - const type = location === condExpr ? condType : checkTruthinessExpression(location); + const type = location === condExpr ? condType : checkExpression(location); if (type.flags & TypeFlags.EnumLiteral && isPropertyAccessExpression(location) && (getNodeLinks(location.expression).resolvedSymbol ?? unknownSymbol).flags & SymbolFlags.Enum) { // EnumLiteral type at condition with known value is always truthy or always falsy, likely an error error(location, Diagnostics.This_condition_will_always_return_0, !!(type as LiteralType).value ? "true" : "false"); diff --git a/tests/baselines/reference/nullishCoalescingOperator7.errors.txt b/tests/baselines/reference/nullishCoalescingOperator7.errors.txt deleted file mode 100644 index 008d589a9e769..0000000000000 --- a/tests/baselines/reference/nullishCoalescingOperator7.errors.txt +++ /dev/null @@ -1,24 +0,0 @@ -nullishCoalescingOperator7.ts(6,19): error TS2872: This kind of expression is always truthy. -nullishCoalescingOperator7.ts(7,19): error TS2872: This kind of expression is always truthy. -nullishCoalescingOperator7.ts(10,23): error TS2872: This kind of expression is always truthy. - - -==== nullishCoalescingOperator7.ts (3 errors) ==== - declare const a: string | undefined; - declare const b: string | undefined; - declare const c: string | undefined; - - const foo1 = a ? 1 : 2; - const foo2 = a ?? 'foo' ? 1 : 2; - ~~~~~ -!!! error TS2872: This kind of expression is always truthy. - const foo3 = a ?? 'foo' ? (b ?? 'bar') : (c ?? 'baz'); - ~~~~~ -!!! error TS2872: This kind of expression is always truthy. - - function f () { - const foo4 = a ?? 'foo' ? b ?? 'bar' : c ?? 'baz'; - ~~~~~ -!!! error TS2872: This kind of expression is always truthy. - } - \ No newline at end of file diff --git a/tests/baselines/reference/predicateSemantics.errors.txt b/tests/baselines/reference/predicateSemantics.errors.txt index 4d96f98df22e5..883ce4570983b 100644 --- a/tests/baselines/reference/predicateSemantics.errors.txt +++ b/tests/baselines/reference/predicateSemantics.errors.txt @@ -70,4 +70,7 @@ predicateSemantics.ts(36,8): error TS2872: This kind of expression is always tru while ((({}))) { } ~~~~~~ !!! error TS2872: This kind of expression is always truthy. + + // Should be OK + console.log((cond || undefined) && 1 / cond); \ No newline at end of file diff --git a/tests/baselines/reference/predicateSemantics.js b/tests/baselines/reference/predicateSemantics.js index c1aebaad42b65..4ed294189332c 100644 --- a/tests/baselines/reference/predicateSemantics.js +++ b/tests/baselines/reference/predicateSemantics.js @@ -37,6 +37,9 @@ while ({} as any) { } while ({} satisfies unknown) { } while ((({}))) { } while ((({}))) { } + +// Should be OK +console.log((cond || undefined) && 1 / cond); //// [predicateSemantics.js] @@ -75,3 +78,5 @@ while ({}) { } while ({}) { } while (({})) { } while ((({}))) { } +// Should be OK +console.log((cond || undefined) && 1 / cond); diff --git a/tests/baselines/reference/predicateSemantics.symbols b/tests/baselines/reference/predicateSemantics.symbols index f92a128bbd48e..39ce291427a74 100644 --- a/tests/baselines/reference/predicateSemantics.symbols +++ b/tests/baselines/reference/predicateSemantics.symbols @@ -61,3 +61,12 @@ while ({} satisfies unknown) { } while ((({}))) { } while ((({}))) { } +// Should be OK +console.log((cond || undefined) && 1 / cond); +>console.log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --)) +>console : Symbol(console, Decl(lib.dom.d.ts, --, --)) +>log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --)) +>cond : Symbol(cond, Decl(predicateSemantics.ts, 0, 11)) +>undefined : Symbol(undefined) +>cond : Symbol(cond, Decl(predicateSemantics.ts, 0, 11)) + diff --git a/tests/baselines/reference/predicateSemantics.types b/tests/baselines/reference/predicateSemantics.types index b75183dc538bf..b4f418ce33943 100644 --- a/tests/baselines/reference/predicateSemantics.types +++ b/tests/baselines/reference/predicateSemantics.types @@ -192,3 +192,30 @@ while ((({}))) { } >{} : {} > : ^^ +// Should be OK +console.log((cond || undefined) && 1 / cond); +>console.log((cond || undefined) && 1 / cond) : void +> : ^^^^ +>console.log : (...data: any[]) => void +> : ^^^^ ^^ ^^^^^ +>console : Console +> : ^^^^^^^ +>log : (...data: any[]) => void +> : ^^^^ ^^ ^^^^^ +>(cond || undefined) && 1 / cond : number +> : ^^^^^^ +>(cond || undefined) : any +> : ^^^ +>cond || undefined : any +> : ^^^ +>cond : any +> : ^^^ +>undefined : undefined +> : ^^^^^^^^^ +>1 / cond : number +> : ^^^^^^ +>1 : 1 +> : ^ +>cond : any +> : ^^^ + diff --git a/tests/cases/compiler/predicateSemantics.ts b/tests/cases/compiler/predicateSemantics.ts index 4211a43ca5894..4069c1da6eec7 100644 --- a/tests/cases/compiler/predicateSemantics.ts +++ b/tests/cases/compiler/predicateSemantics.ts @@ -34,3 +34,6 @@ while ({} as any) { } while ({} satisfies unknown) { } while ((({}))) { } while ((({}))) { } + +// Should be OK +console.log((cond || undefined) && 1 / cond); From 5d545aa9b358184569cf3a77c1596c71e9181bee Mon Sep 17 00:00:00 2001 From: Ryan Cavanaugh Date: Fri, 2 Aug 2024 12:55:27 -0700 Subject: [PATCH 05/50] Allow `import =` in module augmentations (#57704) --- src/compiler/checker.ts | 3 ++ ...importAliasInModuleAugmentation.errors.txt | 26 +++++++++++ .../importAliasInModuleAugmentation.js | 31 +++++++++++++ .../importAliasInModuleAugmentation.symbols | 43 ++++++++++++++++++ .../importAliasInModuleAugmentation.types | 45 +++++++++++++++++++ ...eAugmentationImportsAndExports2.errors.txt | 8 +--- ...eAugmentationImportsAndExports3.errors.txt | 8 +--- .../newNamesInGlobalAugmentations1.errors.txt | 24 ---------- .../importAliasInModuleAugmentation.ts | 17 +++++++ 9 files changed, 167 insertions(+), 38 deletions(-) create mode 100644 tests/baselines/reference/importAliasInModuleAugmentation.errors.txt create mode 100644 tests/baselines/reference/importAliasInModuleAugmentation.js create mode 100644 tests/baselines/reference/importAliasInModuleAugmentation.symbols create mode 100644 tests/baselines/reference/importAliasInModuleAugmentation.types delete mode 100644 tests/baselines/reference/newNamesInGlobalAugmentations1.errors.txt create mode 100644 tests/cases/compiler/importAliasInModuleAugmentation.ts diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 702c8850afe42..4680ae60a031d 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -47029,6 +47029,9 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { grammarErrorOnFirstToken(node, Diagnostics.Exports_and_export_assignments_are_not_permitted_in_module_augmentations); break; case SyntaxKind.ImportEqualsDeclaration: + // import a = e.x; in module augmentation is ok, but not import a = require('fs) + if (isInternalModuleImportEqualsDeclaration(node)) break; + // falls through case SyntaxKind.ImportDeclaration: grammarErrorOnFirstToken(node, Diagnostics.Imports_are_not_permitted_in_module_augmentations_Consider_moving_them_to_the_enclosing_external_module); break; diff --git a/tests/baselines/reference/importAliasInModuleAugmentation.errors.txt b/tests/baselines/reference/importAliasInModuleAugmentation.errors.txt new file mode 100644 index 0000000000000..d8b96f6317073 --- /dev/null +++ b/tests/baselines/reference/importAliasInModuleAugmentation.errors.txt @@ -0,0 +1,26 @@ +importAliasInModuleAugmentation.ts(12,5): error TS2667: Imports are not permitted in module augmentations. Consider moving them to the enclosing external module. +importAliasInModuleAugmentation.ts(12,24): error TS2307: Cannot find module 'fs' or its corresponding type declarations. + + +==== importAliasInModuleAugmentation.ts (2 errors) ==== + export { } + + namespace A { + export const y = 34; + export interface y { s: string } + } + + declare global { + export import x = A.y; + + // Should still error + import f = require("fs"); + ~~~~~~ +!!! error TS2667: Imports are not permitted in module augmentations. Consider moving them to the enclosing external module. + ~~~~ +!!! error TS2307: Cannot find module 'fs' or its corresponding type declarations. + } + + const m: number = x; + let s: x = { s: "" }; + void s.s; \ No newline at end of file diff --git a/tests/baselines/reference/importAliasInModuleAugmentation.js b/tests/baselines/reference/importAliasInModuleAugmentation.js new file mode 100644 index 0000000000000..f6616d7af9c74 --- /dev/null +++ b/tests/baselines/reference/importAliasInModuleAugmentation.js @@ -0,0 +1,31 @@ +//// [tests/cases/compiler/importAliasInModuleAugmentation.ts] //// + +//// [importAliasInModuleAugmentation.ts] +export { } + +namespace A { + export const y = 34; + export interface y { s: string } +} + +declare global { + export import x = A.y; + + // Should still error + import f = require("fs"); +} + +const m: number = x; +let s: x = { s: "" }; +void s.s; + +//// [importAliasInModuleAugmentation.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var A; +(function (A) { + A.y = 34; +})(A || (A = {})); +var m = x; +var s = { s: "" }; +void s.s; diff --git a/tests/baselines/reference/importAliasInModuleAugmentation.symbols b/tests/baselines/reference/importAliasInModuleAugmentation.symbols new file mode 100644 index 0000000000000..ff1228d4bd6f5 --- /dev/null +++ b/tests/baselines/reference/importAliasInModuleAugmentation.symbols @@ -0,0 +1,43 @@ +//// [tests/cases/compiler/importAliasInModuleAugmentation.ts] //// + +=== importAliasInModuleAugmentation.ts === +export { } + +namespace A { +>A : Symbol(A, Decl(importAliasInModuleAugmentation.ts, 0, 10)) + + export const y = 34; +>y : Symbol(y, Decl(importAliasInModuleAugmentation.ts, 3, 16), Decl(importAliasInModuleAugmentation.ts, 3, 24)) + + export interface y { s: string } +>y : Symbol(y, Decl(importAliasInModuleAugmentation.ts, 3, 16), Decl(importAliasInModuleAugmentation.ts, 3, 24)) +>s : Symbol(y.s, Decl(importAliasInModuleAugmentation.ts, 4, 24)) +} + +declare global { +>global : Symbol(global, Decl(importAliasInModuleAugmentation.ts, 5, 1)) + + export import x = A.y; +>x : Symbol(x, Decl(importAliasInModuleAugmentation.ts, 7, 16)) +>A : Symbol(A, Decl(importAliasInModuleAugmentation.ts, 0, 10)) +>y : Symbol(x, Decl(importAliasInModuleAugmentation.ts, 3, 16), Decl(importAliasInModuleAugmentation.ts, 3, 24)) + + // Should still error + import f = require("fs"); +>f : Symbol(f, Decl(importAliasInModuleAugmentation.ts, 8, 26)) +} + +const m: number = x; +>m : Symbol(m, Decl(importAliasInModuleAugmentation.ts, 14, 5)) +>x : Symbol(x, Decl(importAliasInModuleAugmentation.ts, 7, 16)) + +let s: x = { s: "" }; +>s : Symbol(s, Decl(importAliasInModuleAugmentation.ts, 15, 3)) +>x : Symbol(x, Decl(importAliasInModuleAugmentation.ts, 7, 16)) +>s : Symbol(s, Decl(importAliasInModuleAugmentation.ts, 15, 12)) + +void s.s; +>s.s : Symbol(x.s, Decl(importAliasInModuleAugmentation.ts, 4, 24)) +>s : Symbol(s, Decl(importAliasInModuleAugmentation.ts, 15, 3)) +>s : Symbol(x.s, Decl(importAliasInModuleAugmentation.ts, 4, 24)) + diff --git a/tests/baselines/reference/importAliasInModuleAugmentation.types b/tests/baselines/reference/importAliasInModuleAugmentation.types new file mode 100644 index 0000000000000..5733d12e0d40f --- /dev/null +++ b/tests/baselines/reference/importAliasInModuleAugmentation.types @@ -0,0 +1,45 @@ +//// [tests/cases/compiler/importAliasInModuleAugmentation.ts] //// + +=== importAliasInModuleAugmentation.ts === +export { } + +namespace A { +>A : typeof A + + export const y = 34; +>y : 34 +>34 : 34 + + export interface y { s: string } +>s : string +} + +declare global { +>global : typeof global + + export import x = A.y; +>x : 34 +>A : typeof A +>y : x + + // Should still error + import f = require("fs"); +>f : any +} + +const m: number = x; +>m : number +>x : 34 + +let s: x = { s: "" }; +>s : x +>{ s: "" } : { s: string; } +>s : string +>"" : "" + +void s.s; +>void s.s : undefined +>s.s : string +>s : x +>s : string + diff --git a/tests/baselines/reference/moduleAugmentationImportsAndExports2.errors.txt b/tests/baselines/reference/moduleAugmentationImportsAndExports2.errors.txt index 9f94f43b61412..f472daec04d69 100644 --- a/tests/baselines/reference/moduleAugmentationImportsAndExports2.errors.txt +++ b/tests/baselines/reference/moduleAugmentationImportsAndExports2.errors.txt @@ -3,8 +3,6 @@ f3.ts(11,5): error TS2667: Imports are not permitted in module augmentations. Co f3.ts(11,21): error TS2307: Cannot find module './f2' or its corresponding type declarations. f3.ts(12,5): error TS2666: Exports and export assignments are not permitted in module augmentations. f3.ts(12,21): error TS2307: Cannot find module './f2' or its corresponding type declarations. -f3.ts(13,5): error TS2667: Imports are not permitted in module augmentations. Consider moving them to the enclosing external module. -f3.ts(14,5): error TS2667: Imports are not permitted in module augmentations. Consider moving them to the enclosing external module. f4.ts(5,11): error TS2339: Property 'foo' does not exist on type 'A'. @@ -16,7 +14,7 @@ f4.ts(5,11): error TS2339: Property 'foo' does not exist on type 'A'. n: number; } -==== f3.ts (7 errors) ==== +==== f3.ts (5 errors) ==== import {A} from "./f1"; A.prototype.foo = function () { return undefined; } @@ -40,11 +38,7 @@ f4.ts(5,11): error TS2339: Property 'foo' does not exist on type 'A'. ~~~~~~ !!! error TS2307: Cannot find module './f2' or its corresponding type declarations. import I = N.Ifc; - ~~~~~~ -!!! error TS2667: Imports are not permitted in module augmentations. Consider moving them to the enclosing external module. import C = N.Cls; - ~~~~~~ -!!! error TS2667: Imports are not permitted in module augmentations. Consider moving them to the enclosing external module. // should have explicit export interface A { foo(): B; diff --git a/tests/baselines/reference/moduleAugmentationImportsAndExports3.errors.txt b/tests/baselines/reference/moduleAugmentationImportsAndExports3.errors.txt index ecd0eb189d45a..f66ce9db2bfdd 100644 --- a/tests/baselines/reference/moduleAugmentationImportsAndExports3.errors.txt +++ b/tests/baselines/reference/moduleAugmentationImportsAndExports3.errors.txt @@ -1,7 +1,5 @@ f3.ts(11,5): error TS2667: Imports are not permitted in module augmentations. Consider moving them to the enclosing external module. f3.ts(11,21): error TS2307: Cannot find module './f2' or its corresponding type declarations. -f3.ts(12,5): error TS2667: Imports are not permitted in module augmentations. Consider moving them to the enclosing external module. -f3.ts(13,5): error TS2667: Imports are not permitted in module augmentations. Consider moving them to the enclosing external module. ==== f1.ts (0 errors) ==== @@ -12,7 +10,7 @@ f3.ts(13,5): error TS2667: Imports are not permitted in module augmentations. Co n: number; } -==== f3.ts (4 errors) ==== +==== f3.ts (2 errors) ==== import {A} from "./f1"; A.prototype.foo = function () { return undefined; } @@ -29,11 +27,7 @@ f3.ts(13,5): error TS2667: Imports are not permitted in module augmentations. Co ~~~~~~ !!! error TS2307: Cannot find module './f2' or its corresponding type declarations. import I = N.Ifc; - ~~~~~~ -!!! error TS2667: Imports are not permitted in module augmentations. Consider moving them to the enclosing external module. import C = N.Cls; - ~~~~~~ -!!! error TS2667: Imports are not permitted in module augmentations. Consider moving them to the enclosing external module. interface A { foo(): B; bar(): I; diff --git a/tests/baselines/reference/newNamesInGlobalAugmentations1.errors.txt b/tests/baselines/reference/newNamesInGlobalAugmentations1.errors.txt deleted file mode 100644 index 01daf853a5dc3..0000000000000 --- a/tests/baselines/reference/newNamesInGlobalAugmentations1.errors.txt +++ /dev/null @@ -1,24 +0,0 @@ -f1.d.ts(12,5): error TS2667: Imports are not permitted in module augmentations. Consider moving them to the enclosing external module. - - -==== f1.d.ts (1 errors) ==== - export {}; - - declare module M.M1 { - export let x: number; - } - declare global { - interface SymbolConstructor { - observable: symbol; - } - class Cls {x} - let [a, b]: number[]; - export import X = M.M1.x; - ~~~~~~ -!!! error TS2667: Imports are not permitted in module augmentations. Consider moving them to the enclosing external module. - } - -==== main.ts (0 errors) ==== - Symbol.observable; - new Cls().x - let c = a + b + X; \ No newline at end of file diff --git a/tests/cases/compiler/importAliasInModuleAugmentation.ts b/tests/cases/compiler/importAliasInModuleAugmentation.ts new file mode 100644 index 0000000000000..99ec85396eabd --- /dev/null +++ b/tests/cases/compiler/importAliasInModuleAugmentation.ts @@ -0,0 +1,17 @@ +export { } + +namespace A { + export const y = 34; + export interface y { s: string } +} + +declare global { + export import x = A.y; + + // Should still error + import f = require("fs"); +} + +const m: number = x; +let s: x = { s: "" }; +void s.s; \ No newline at end of file From 269219f68e086b4b56f47aff049ab9f6f80612a1 Mon Sep 17 00:00:00 2001 From: Ryan Cavanaugh Date: Fri, 2 Aug 2024 15:04:47 -0700 Subject: [PATCH 06/50] Fix mismerged baselines (#59522) --- .../importAliasInModuleAugmentation.types | 19 +++++++++++++++++++ .../newNamesInGlobalAugmentations1.types | 2 -- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/tests/baselines/reference/importAliasInModuleAugmentation.types b/tests/baselines/reference/importAliasInModuleAugmentation.types index 5733d12e0d40f..361cff4f663d4 100644 --- a/tests/baselines/reference/importAliasInModuleAugmentation.types +++ b/tests/baselines/reference/importAliasInModuleAugmentation.types @@ -5,41 +5,60 @@ export { } namespace A { >A : typeof A +> : ^^^^^^^^ export const y = 34; >y : 34 +> : ^^ >34 : 34 +> : ^^ export interface y { s: string } >s : string +> : ^^^^^^ } declare global { >global : typeof global +> : ^^^^^^^^^^^^^ export import x = A.y; >x : 34 +> : ^^ >A : typeof A +> : ^^^^^^^^ >y : x +> : ^ // Should still error import f = require("fs"); >f : any +> : ^^^ } const m: number = x; >m : number +> : ^^^^^^ >x : 34 +> : ^^ let s: x = { s: "" }; >s : x +> : ^ >{ s: "" } : { s: string; } +> : ^^^^^^^^^^^^^^ >s : string +> : ^^^^^^ >"" : "" +> : ^^ void s.s; >void s.s : undefined +> : ^^^^^^^^^ >s.s : string +> : ^^^^^^ >s : x +> : ^ >s : string +> : ^^^^^^ diff --git a/tests/baselines/reference/newNamesInGlobalAugmentations1.types b/tests/baselines/reference/newNamesInGlobalAugmentations1.types index f46c99b0c5bca..324a8b494003a 100644 --- a/tests/baselines/reference/newNamesInGlobalAugmentations1.types +++ b/tests/baselines/reference/newNamesInGlobalAugmentations1.types @@ -26,7 +26,6 @@ declare global { >Cls : Cls > : ^^^ >x : any -> : ^^^ let [a, b]: number[]; >a : number @@ -56,7 +55,6 @@ Symbol.observable; new Cls().x >new Cls().x : any -> : ^^^ >new Cls() : Cls > : ^^^ >Cls : typeof Cls From aafdfe5b3f76f5c41abeec412ce73c86da94c75f Mon Sep 17 00:00:00 2001 From: Ryan Cavanaugh Date: Fri, 2 Aug 2024 15:22:20 -0700 Subject: [PATCH 07/50] Use contextual type to determine 'this' when determining member visibility (#56105) --- src/compiler/checker.ts | 16 ++- ...ctedAccessThroughContextualThis.errors.txt | 30 ++++ .../protectedAccessThroughContextualThis.js | 44 ++++++ ...otectedAccessThroughContextualThis.symbols | 77 ++++++++++ ...protectedAccessThroughContextualThis.types | 133 ++++++++++++++++++ .../protectedAccessThroughContextualThis.ts | 23 +++ 6 files changed, 321 insertions(+), 2 deletions(-) create mode 100644 tests/baselines/reference/protectedAccessThroughContextualThis.errors.txt create mode 100644 tests/baselines/reference/protectedAccessThroughContextualThis.js create mode 100644 tests/baselines/reference/protectedAccessThroughContextualThis.symbols create mode 100644 tests/baselines/reference/protectedAccessThroughContextualThis.types create mode 100644 tests/cases/compiler/protectedAccessThroughContextualThis.ts diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 4680ae60a031d..6233873ab6de1 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -33667,10 +33667,22 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { } function getEnclosingClassFromThisParameter(node: Node): InterfaceType | undefined { + // 'this' type for a node comes from, in priority order... + // 1. The type of a syntactic 'this' parameter in the enclosing function scope const thisParameter = getThisParameterFromNodeContext(node); let thisType = thisParameter?.type && getTypeFromTypeNode(thisParameter.type); - if (thisType && thisType.flags & TypeFlags.TypeParameter) { - thisType = getConstraintOfTypeParameter(thisType as TypeParameter); + if (thisType) { + // 2. The constraint of a type parameter used for an explicit 'this' parameter + if (thisType.flags & TypeFlags.TypeParameter) { + thisType = getConstraintOfTypeParameter(thisType as TypeParameter); + } + } + else { + // 3. The 'this' parameter of a contextual type + const thisContainer = getThisContainer(node, /*includeArrowFunctions*/ false, /*includeClassComputedPropertyName*/ false); + if (isFunctionLike(thisContainer)) { + thisType = getContextualThisParameterType(thisContainer); + } } if (thisType && getObjectFlags(thisType) & (ObjectFlags.ClassOrInterface | ObjectFlags.Reference)) { return getTargetType(thisType) as InterfaceType; diff --git a/tests/baselines/reference/protectedAccessThroughContextualThis.errors.txt b/tests/baselines/reference/protectedAccessThroughContextualThis.errors.txt new file mode 100644 index 0000000000000..65aaa37775a98 --- /dev/null +++ b/tests/baselines/reference/protectedAccessThroughContextualThis.errors.txt @@ -0,0 +1,30 @@ +protectedAccessThroughContextualThis.ts(13,20): error TS2341: Property 'privat' is private and only accessible within class 'Foo'. +protectedAccessThroughContextualThis.ts(20,20): error TS2341: Property 'privat' is private and only accessible within class 'Foo'. + + +==== protectedAccessThroughContextualThis.ts (2 errors) ==== + class Foo { + protected protec = 'bar'; + private privat = ''; + copy!: string + constructor() { + bindCopy.call(this) + bindCopy2.call(this) + } + } + + function bindCopy(this: Foo) { + this.copy = this.protec; // Should OK + console.log(this.privat); // Should error + ~~~~~~ +!!! error TS2341: Property 'privat' is private and only accessible within class 'Foo'. + } + + type BindingFunction = (this: Foo) => void; + + const bindCopy2: BindingFunction = function () { + this.copy = this.protec; // Should OK + console.log(this.privat); // Should error + ~~~~~~ +!!! error TS2341: Property 'privat' is private and only accessible within class 'Foo'. + } \ No newline at end of file diff --git a/tests/baselines/reference/protectedAccessThroughContextualThis.js b/tests/baselines/reference/protectedAccessThroughContextualThis.js new file mode 100644 index 0000000000000..30bd2e1b3a578 --- /dev/null +++ b/tests/baselines/reference/protectedAccessThroughContextualThis.js @@ -0,0 +1,44 @@ +//// [tests/cases/compiler/protectedAccessThroughContextualThis.ts] //// + +//// [protectedAccessThroughContextualThis.ts] +class Foo { + protected protec = 'bar'; + private privat = ''; + copy!: string + constructor() { + bindCopy.call(this) + bindCopy2.call(this) + } +} + +function bindCopy(this: Foo) { + this.copy = this.protec; // Should OK + console.log(this.privat); // Should error +} + +type BindingFunction = (this: Foo) => void; + +const bindCopy2: BindingFunction = function () { + this.copy = this.protec; // Should OK + console.log(this.privat); // Should error +} + +//// [protectedAccessThroughContextualThis.js] +"use strict"; +var Foo = /** @class */ (function () { + function Foo() { + this.protec = 'bar'; + this.privat = ''; + bindCopy.call(this); + bindCopy2.call(this); + } + return Foo; +}()); +function bindCopy() { + this.copy = this.protec; // Should OK + console.log(this.privat); // Should error +} +var bindCopy2 = function () { + this.copy = this.protec; // Should OK + console.log(this.privat); // Should error +}; diff --git a/tests/baselines/reference/protectedAccessThroughContextualThis.symbols b/tests/baselines/reference/protectedAccessThroughContextualThis.symbols new file mode 100644 index 0000000000000..cd76db707245c --- /dev/null +++ b/tests/baselines/reference/protectedAccessThroughContextualThis.symbols @@ -0,0 +1,77 @@ +//// [tests/cases/compiler/protectedAccessThroughContextualThis.ts] //// + +=== protectedAccessThroughContextualThis.ts === +class Foo { +>Foo : Symbol(Foo, Decl(protectedAccessThroughContextualThis.ts, 0, 0)) + + protected protec = 'bar'; +>protec : Symbol(Foo.protec, Decl(protectedAccessThroughContextualThis.ts, 0, 11)) + + private privat = ''; +>privat : Symbol(Foo.privat, Decl(protectedAccessThroughContextualThis.ts, 1, 27)) + + copy!: string +>copy : Symbol(Foo.copy, Decl(protectedAccessThroughContextualThis.ts, 2, 22)) + + constructor() { + bindCopy.call(this) +>bindCopy.call : Symbol(CallableFunction.call, Decl(lib.es5.d.ts, --, --)) +>bindCopy : Symbol(bindCopy, Decl(protectedAccessThroughContextualThis.ts, 8, 1)) +>call : Symbol(CallableFunction.call, Decl(lib.es5.d.ts, --, --)) +>this : Symbol(Foo, Decl(protectedAccessThroughContextualThis.ts, 0, 0)) + + bindCopy2.call(this) +>bindCopy2.call : Symbol(CallableFunction.call, Decl(lib.es5.d.ts, --, --)) +>bindCopy2 : Symbol(bindCopy2, Decl(protectedAccessThroughContextualThis.ts, 17, 5)) +>call : Symbol(CallableFunction.call, Decl(lib.es5.d.ts, --, --)) +>this : Symbol(Foo, Decl(protectedAccessThroughContextualThis.ts, 0, 0)) + } +} + +function bindCopy(this: Foo) { +>bindCopy : Symbol(bindCopy, Decl(protectedAccessThroughContextualThis.ts, 8, 1)) +>this : Symbol(this, Decl(protectedAccessThroughContextualThis.ts, 10, 18)) +>Foo : Symbol(Foo, Decl(protectedAccessThroughContextualThis.ts, 0, 0)) + + this.copy = this.protec; // Should OK +>this.copy : Symbol(Foo.copy, Decl(protectedAccessThroughContextualThis.ts, 2, 22)) +>this : Symbol(this, Decl(protectedAccessThroughContextualThis.ts, 10, 18)) +>copy : Symbol(Foo.copy, Decl(protectedAccessThroughContextualThis.ts, 2, 22)) +>this.protec : Symbol(Foo.protec, Decl(protectedAccessThroughContextualThis.ts, 0, 11)) +>this : Symbol(this, Decl(protectedAccessThroughContextualThis.ts, 10, 18)) +>protec : Symbol(Foo.protec, Decl(protectedAccessThroughContextualThis.ts, 0, 11)) + + console.log(this.privat); // Should error +>console.log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --)) +>console : Symbol(console, Decl(lib.dom.d.ts, --, --)) +>log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --)) +>this.privat : Symbol(Foo.privat, Decl(protectedAccessThroughContextualThis.ts, 1, 27)) +>this : Symbol(this, Decl(protectedAccessThroughContextualThis.ts, 10, 18)) +>privat : Symbol(Foo.privat, Decl(protectedAccessThroughContextualThis.ts, 1, 27)) +} + +type BindingFunction = (this: Foo) => void; +>BindingFunction : Symbol(BindingFunction, Decl(protectedAccessThroughContextualThis.ts, 13, 1)) +>this : Symbol(this, Decl(protectedAccessThroughContextualThis.ts, 15, 24)) +>Foo : Symbol(Foo, Decl(protectedAccessThroughContextualThis.ts, 0, 0)) + +const bindCopy2: BindingFunction = function () { +>bindCopy2 : Symbol(bindCopy2, Decl(protectedAccessThroughContextualThis.ts, 17, 5)) +>BindingFunction : Symbol(BindingFunction, Decl(protectedAccessThroughContextualThis.ts, 13, 1)) + + this.copy = this.protec; // Should OK +>this.copy : Symbol(Foo.copy, Decl(protectedAccessThroughContextualThis.ts, 2, 22)) +>this : Symbol(this, Decl(protectedAccessThroughContextualThis.ts, 15, 24)) +>copy : Symbol(Foo.copy, Decl(protectedAccessThroughContextualThis.ts, 2, 22)) +>this.protec : Symbol(Foo.protec, Decl(protectedAccessThroughContextualThis.ts, 0, 11)) +>this : Symbol(this, Decl(protectedAccessThroughContextualThis.ts, 15, 24)) +>protec : Symbol(Foo.protec, Decl(protectedAccessThroughContextualThis.ts, 0, 11)) + + console.log(this.privat); // Should error +>console.log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --)) +>console : Symbol(console, Decl(lib.dom.d.ts, --, --)) +>log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --)) +>this.privat : Symbol(Foo.privat, Decl(protectedAccessThroughContextualThis.ts, 1, 27)) +>this : Symbol(this, Decl(protectedAccessThroughContextualThis.ts, 15, 24)) +>privat : Symbol(Foo.privat, Decl(protectedAccessThroughContextualThis.ts, 1, 27)) +} diff --git a/tests/baselines/reference/protectedAccessThroughContextualThis.types b/tests/baselines/reference/protectedAccessThroughContextualThis.types new file mode 100644 index 0000000000000..8c597680032bd --- /dev/null +++ b/tests/baselines/reference/protectedAccessThroughContextualThis.types @@ -0,0 +1,133 @@ +//// [tests/cases/compiler/protectedAccessThroughContextualThis.ts] //// + +=== protectedAccessThroughContextualThis.ts === +class Foo { +>Foo : Foo +> : ^^^ + + protected protec = 'bar'; +>protec : string +> : ^^^^^^ +>'bar' : "bar" +> : ^^^^^ + + private privat = ''; +>privat : string +> : ^^^^^^ +>'' : "" +> : ^^ + + copy!: string +>copy : string +> : ^^^^^^ + + constructor() { + bindCopy.call(this) +>bindCopy.call(this) : void +> : ^^^^ +>bindCopy.call : (this: (this: T, ...args: A) => R, thisArg: T, ...args: A) => R +> : ^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^ ^^^^^ ^^ ^^^^^ +>bindCopy : (this: Foo) => void +> : ^ ^^ ^^^^^^^^^ +>call : (this: (this: T, ...args: A) => R, thisArg: T, ...args: A) => R +> : ^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^ ^^^^^ ^^ ^^^^^ +>this : this +> : ^^^^ + + bindCopy2.call(this) +>bindCopy2.call(this) : void +> : ^^^^ +>bindCopy2.call : (this: (this: T, ...args: A) => R, thisArg: T, ...args: A) => R +> : ^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^ ^^^^^ ^^ ^^^^^ +>bindCopy2 : BindingFunction +> : ^^^^^^^^^^^^^^^ +>call : (this: (this: T, ...args: A) => R, thisArg: T, ...args: A) => R +> : ^ ^^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^ ^^^^^ ^^ ^^^^^ +>this : this +> : ^^^^ + } +} + +function bindCopy(this: Foo) { +>bindCopy : (this: Foo) => void +> : ^ ^^ ^^^^^^^^^ +>this : Foo +> : ^^^ + + this.copy = this.protec; // Should OK +>this.copy = this.protec : string +> : ^^^^^^ +>this.copy : string +> : ^^^^^^ +>this : Foo +> : ^^^ +>copy : string +> : ^^^^^^ +>this.protec : string +> : ^^^^^^ +>this : Foo +> : ^^^ +>protec : string +> : ^^^^^^ + + console.log(this.privat); // Should error +>console.log(this.privat) : void +> : ^^^^ +>console.log : (...data: any[]) => void +> : ^^^^ ^^ ^^^^^ +>console : Console +> : ^^^^^^^ +>log : (...data: any[]) => void +> : ^^^^ ^^ ^^^^^ +>this.privat : string +> : ^^^^^^ +>this : Foo +> : ^^^ +>privat : string +> : ^^^^^^ +} + +type BindingFunction = (this: Foo) => void; +>BindingFunction : BindingFunction +> : ^^^^^^^^^^^^^^^ +>this : Foo +> : ^^^ + +const bindCopy2: BindingFunction = function () { +>bindCopy2 : BindingFunction +> : ^^^^^^^^^^^^^^^ +>function () { this.copy = this.protec; // Should OK console.log(this.privat); // Should error} : (this: Foo) => void +> : ^ ^^ ^^^^^^^^^ + + this.copy = this.protec; // Should OK +>this.copy = this.protec : string +> : ^^^^^^ +>this.copy : string +> : ^^^^^^ +>this : Foo +> : ^^^ +>copy : string +> : ^^^^^^ +>this.protec : string +> : ^^^^^^ +>this : Foo +> : ^^^ +>protec : string +> : ^^^^^^ + + console.log(this.privat); // Should error +>console.log(this.privat) : void +> : ^^^^ +>console.log : (...data: any[]) => void +> : ^^^^ ^^ ^^^^^ +>console : Console +> : ^^^^^^^ +>log : (...data: any[]) => void +> : ^^^^ ^^ ^^^^^ +>this.privat : string +> : ^^^^^^ +>this : Foo +> : ^^^ +>privat : string +> : ^^^^^^ +} diff --git a/tests/cases/compiler/protectedAccessThroughContextualThis.ts b/tests/cases/compiler/protectedAccessThroughContextualThis.ts new file mode 100644 index 0000000000000..0d846627e6d8e --- /dev/null +++ b/tests/cases/compiler/protectedAccessThroughContextualThis.ts @@ -0,0 +1,23 @@ +// @strict: true + +class Foo { + protected protec = 'bar'; + private privat = ''; + copy!: string + constructor() { + bindCopy.call(this) + bindCopy2.call(this) + } +} + +function bindCopy(this: Foo) { + this.copy = this.protec; // Should OK + console.log(this.privat); // Should error +} + +type BindingFunction = (this: Foo) => void; + +const bindCopy2: BindingFunction = function () { + this.copy = this.protec; // Should OK + console.log(this.privat); // Should error +} \ No newline at end of file From a745d1b20501c1c305ab2c338137318a8cd331a9 Mon Sep 17 00:00:00 2001 From: Ron Buckton Date: Mon, 5 Aug 2024 17:32:47 -0400 Subject: [PATCH 08/50] Disambiguate `BuiltinIterator`/`BuiltinIteratorReturn` (#59506) --- src/compiler/checker.ts | 97 +++++++-- src/lib/dom.asynciterable.generated.d.ts | 20 +- src/lib/dom.iterable.d.ts | 58 +++-- src/lib/dom.iterable.generated.d.ts | 166 ++++++++------- src/lib/es2015.generator.d.ts | 2 +- src/lib/es2015.iterable.d.ts | 154 ++++++++------ src/lib/es2018.asyncgenerator.d.ts | 2 +- src/lib/es2018.asynciterable.d.ts | 10 +- src/lib/es2020.bigint.d.ts | 16 +- src/lib/es2020.string.d.ts | 4 +- src/lib/es2020.symbol.wellknown.d.ts | 6 +- src/lib/es2022.intl.d.ts | 6 +- src/lib/esnext.iterator.d.ts | 32 +-- .../webworker.asynciterable.generated.d.ts | 20 +- src/lib/webworker.iterable.generated.d.ts | 76 ++++--- .../reference/ES5For-ofTypeCheck10.errors.txt | 10 +- .../reference/ES5For-ofTypeCheck10.js | 16 +- .../reference/ES5For-ofTypeCheck10.symbols | 14 +- .../reference/ES5For-ofTypeCheck10.types | 16 +- .../reference/YieldStarExpression4_es6.types | 4 +- .../argumentsObjectIterator02_ES6.types | 16 +- tests/baselines/reference/arrayFrom.types | 24 +-- .../reference/builtinIterator.errors.txt | 18 +- tests/baselines/reference/builtinIterator.js | 2 +- .../reference/builtinIterator.symbols | 29 ++- .../baselines/reference/builtinIterator.types | 198 +++++++++--------- ...n(strictbuiltiniteratorreturn=false).types | 180 ++++++++-------- ...rn(strictbuiltiniteratorreturn=true).types | 180 ++++++++-------- .../conditionalTypeDoesntSpinForever.types | 4 +- ...ructuredLateBoundNameHasCorrectTypes.types | 8 +- ....asyncGenerators.classMethods.es2015.types | 4 +- ....asyncGenerators.classMethods.es2018.types | 4 +- ...ter.asyncGenerators.classMethods.es5.types | 4 +- ...nerators.functionDeclarations.es2015.types | 4 +- ...nerators.functionDeclarations.es2018.types | 4 +- ...cGenerators.functionDeclarations.es5.types | 4 +- ...enerators.functionExpressions.es2015.types | 8 +- ...enerators.functionExpressions.es2018.types | 8 +- ...ncGenerators.functionExpressions.es5.types | 8 +- ...nerators.objectLiteralMethods.es2015.types | 12 +- ...nerators.objectLiteralMethods.es2018.types | 12 +- ...cGenerators.objectLiteralMethods.es5.types | 12 +- .../esNextWeakRefs_IterableWeakMap.types | 2 +- .../excessiveStackDepthFlatArray.types | 3 +- .../flatArrayNoExcessiveStackDepth.types | 4 +- tests/baselines/reference/for-of12.types | 12 +- tests/baselines/reference/for-of13.types | 12 +- tests/baselines/reference/for-of14.errors.txt | 10 +- tests/baselines/reference/for-of14.js | 8 +- tests/baselines/reference/for-of14.symbols | 10 +- tests/baselines/reference/for-of14.types | 16 +- tests/baselines/reference/for-of15.errors.txt | 6 +- tests/baselines/reference/for-of15.js | 8 +- tests/baselines/reference/for-of15.symbols | 14 +- tests/baselines/reference/for-of15.types | 16 +- tests/baselines/reference/for-of16.errors.txt | 18 +- tests/baselines/reference/for-of16.js | 12 +- tests/baselines/reference/for-of16.symbols | 16 +- tests/baselines/reference/for-of16.types | 26 +-- tests/baselines/reference/for-of18.js | 8 +- tests/baselines/reference/for-of18.symbols | 14 +- tests/baselines/reference/for-of18.types | 16 +- tests/baselines/reference/for-of25.js | 8 +- tests/baselines/reference/for-of25.symbols | 10 +- tests/baselines/reference/for-of25.types | 16 +- tests/baselines/reference/for-of26.js | 8 +- tests/baselines/reference/for-of26.symbols | 14 +- tests/baselines/reference/for-of26.types | 16 +- tests/baselines/reference/for-of27.js | 8 +- tests/baselines/reference/for-of27.symbols | 10 +- tests/baselines/reference/for-of27.types | 16 +- tests/baselines/reference/for-of28.js | 8 +- tests/baselines/reference/for-of28.symbols | 14 +- tests/baselines/reference/for-of28.types | 16 +- tests/baselines/reference/for-of30.errors.txt | 6 +- tests/baselines/reference/for-of30.js | 8 +- tests/baselines/reference/for-of30.symbols | 16 +- tests/baselines/reference/for-of30.types | 16 +- tests/baselines/reference/for-of31.js | 8 +- tests/baselines/reference/for-of31.symbols | 14 +- tests/baselines/reference/for-of31.types | 16 +- tests/baselines/reference/for-of33.errors.txt | 4 +- tests/baselines/reference/for-of33.js | 8 +- tests/baselines/reference/for-of33.symbols | 10 +- tests/baselines/reference/for-of33.types | 16 +- tests/baselines/reference/for-of34.errors.txt | 4 +- tests/baselines/reference/for-of34.js | 8 +- tests/baselines/reference/for-of34.symbols | 14 +- tests/baselines/reference/for-of34.types | 16 +- tests/baselines/reference/for-of35.errors.txt | 4 +- tests/baselines/reference/for-of35.js | 8 +- tests/baselines/reference/for-of35.symbols | 14 +- tests/baselines/reference/for-of35.types | 16 +- .../generatorReturnTypeInference.types | 4 +- ...eneratorReturnTypeInferenceNonStrict.types | 4 +- .../reference/generatorTypeCheck22.types | 4 +- .../reference/generatorTypeCheck23.types | 4 +- .../reference/generatorTypeCheck24.types | 4 +- .../reference/generatorTypeCheck25.errors.txt | 8 +- .../reference/generatorTypeCheck25.types | 4 +- .../reference/generatorTypeCheck53.types | 4 +- .../reference/generatorTypeCheck54.types | 4 +- ...rtHelpersNoHelpersForAsyncGenerators.types | 4 +- ...indirectGlobalSymbolPartOfObjectType.types | 4 +- ...inferFromGenericFunctionReturnTypes3.types | 3 + ...Next(strictbuiltiniteratorreturn=false).js | 6 +- ...strictbuiltiniteratorreturn=false).symbols | 21 +- ...t(strictbuiltiniteratorreturn=false).types | 82 ++++---- ...rictbuiltiniteratorreturn=true).errors.txt | 14 +- ...TNext(strictbuiltiniteratorreturn=true).js | 6 +- ...(strictbuiltiniteratorreturn=true).symbols | 21 +- ...xt(strictbuiltiniteratorreturn=true).types | 82 ++++---- ...ithAsClauseAndLateBoundProperty.errors.txt | 4 +- ...TypeWithAsClauseAndLateBoundProperty.types | 12 +- ...edTypeWithAsClauseAndLateBoundProperty2.js | 8 +- ...ypeWithAsClauseAndLateBoundProperty2.types | 12 +- ...eLibrary_NoErrorDuplicateLibOptions1.types | 12 +- ...eLibrary_NoErrorDuplicateLibOptions2.types | 12 +- ...dularizeLibrary_TargetES5UsingES6Lib.types | 12 +- ...dularizeLibrary_TargetES6UsingES6Lib.types | 12 +- .../narrowingPastLastAssignment.types | 2 +- ...enthesizedJSDocCastAtReturnStatement.types | 2 +- ....asyncGenerators.classMethods.es2018.types | 4 +- ...nerators.functionDeclarations.es2018.types | 4 +- ...enerators.functionExpressions.es2018.types | 8 +- ...nerators.objectLiteralMethods.es2018.types | 12 +- .../reference/regexMatchAll-esnext.types | 16 +- tests/baselines/reference/regexMatchAll.types | 16 +- .../baselines/reference/stringMatchAll.types | 20 +- .../substitutionTypePassedToExtends.types | 2 +- .../types.asyncGenerators.es2018.1.types | 32 +-- .../types.asyncGenerators.es2018.2.errors.txt | 24 +-- .../types.asyncGenerators.es2018.2.types | 12 +- .../yieldExpressionInnerCommentEmit.types | 4 +- tests/cases/compiler/builtinIterator.ts | 2 +- tests/cases/compiler/iterableTReturnTNext.ts | 6 +- .../es6/for-ofStatements/for-of14.ts | 4 +- .../es6/for-ofStatements/for-of15.ts | 4 +- .../es6/for-ofStatements/for-of16.ts | 6 +- .../es6/for-ofStatements/for-of18.ts | 4 +- .../es6/for-ofStatements/for-of25.ts | 4 +- .../es6/for-ofStatements/for-of26.ts | 4 +- .../es6/for-ofStatements/for-of27.ts | 4 +- .../es6/for-ofStatements/for-of28.ts | 4 +- .../es6/for-ofStatements/for-of30.ts | 4 +- .../es6/for-ofStatements/for-of31.ts | 4 +- .../es6/for-ofStatements/for-of33.ts | 4 +- .../es6/for-ofStatements/for-of34.ts | 4 +- .../es6/for-ofStatements/for-of35.ts | 4 +- .../for-ofStatements/ES5For-ofTypeCheck10.ts | 4 +- 150 files changed, 1407 insertions(+), 1237 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 6233873ab6de1..06346c66ba0ac 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -1181,8 +1181,9 @@ interface IterationTypesResolver { getGlobalIteratorType: (reportErrors: boolean) => GenericType; getGlobalIterableType: (reportErrors: boolean) => GenericType; getGlobalIterableIteratorType: (reportErrors: boolean) => GenericType; - getGlobalBuiltinIteratorType: (reportErrors: boolean) => GenericType; + getGlobalIteratorObjectType: (reportErrors: boolean) => GenericType; getGlobalGeneratorType: (reportErrors: boolean) => GenericType; + getGlobalBuiltinIteratorTypes: () => readonly GenericType[]; resolveIterationType: (type: Type, errorNode: Node | undefined) => Type | undefined; mustHaveANextMethodDiagnostic: DiagnosticMessage; mustBeAMethodDiagnostic: DiagnosticMessage; @@ -2167,8 +2168,9 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { getGlobalIteratorType: getGlobalAsyncIteratorType, getGlobalIterableType: getGlobalAsyncIterableType, getGlobalIterableIteratorType: getGlobalAsyncIterableIteratorType, - getGlobalBuiltinIteratorType: getGlobalBuiltinAsyncIteratorType, + getGlobalIteratorObjectType: getGlobalAsyncIteratorObjectType, getGlobalGeneratorType: getGlobalAsyncGeneratorType, + getGlobalBuiltinIteratorTypes: getGlobalBuiltinAsyncIteratorTypes, resolveIterationType: (type, errorNode) => getAwaitedType(type, errorNode, Diagnostics.Type_of_await_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member), mustHaveANextMethodDiagnostic: Diagnostics.An_async_iterator_must_have_a_next_method, mustBeAMethodDiagnostic: Diagnostics.The_0_property_of_an_async_iterator_must_be_a_method, @@ -2182,8 +2184,9 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { getGlobalIteratorType, getGlobalIterableType, getGlobalIterableIteratorType, - getGlobalBuiltinIteratorType, + getGlobalIteratorObjectType, getGlobalGeneratorType, + getGlobalBuiltinIteratorTypes, resolveIterationType: (type, _errorNode) => type, mustHaveANextMethodDiagnostic: Diagnostics.An_iterator_must_have_a_next_method, mustBeAMethodDiagnostic: Diagnostics.The_0_property_of_an_iterator_must_be_a_method, @@ -2244,14 +2247,16 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { var deferredGlobalIterableType: GenericType | undefined; var deferredGlobalIteratorType: GenericType | undefined; var deferredGlobalIterableIteratorType: GenericType | undefined; - var deferredGlobalBuiltinIteratorType: GenericType | undefined; + var deferredGlobalIteratorObjectType: GenericType | undefined; var deferredGlobalGeneratorType: GenericType | undefined; var deferredGlobalIteratorYieldResultType: GenericType | undefined; var deferredGlobalIteratorReturnResultType: GenericType | undefined; var deferredGlobalAsyncIterableType: GenericType | undefined; var deferredGlobalAsyncIteratorType: GenericType | undefined; var deferredGlobalAsyncIterableIteratorType: GenericType | undefined; - var deferredGlobalBuiltinAsyncIteratorType: GenericType | undefined; + var deferredGlobalBuiltinIteratorTypes: readonly GenericType[] | undefined; + var deferredGlobalBuiltinAsyncIteratorTypes: readonly GenericType[] | undefined; + var deferredGlobalAsyncIteratorObjectType: GenericType | undefined; var deferredGlobalAsyncGeneratorType: GenericType | undefined; var deferredGlobalTemplateStringsArrayType: ObjectType | undefined; var deferredGlobalImportMetaType: ObjectType; @@ -12488,6 +12493,18 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { return removeMissingType(getTypeOfSymbol(symbol), !!(symbol.flags & SymbolFlags.Optional)); } + function isReferenceToSomeType(type: Type, targets: readonly Type[]) { + if (type === undefined || (getObjectFlags(type) & ObjectFlags.Reference) === 0) { + return false; + } + for (const target of targets) { + if ((type as TypeReference).target === target) { + return true; + } + } + return false; + } + function isReferenceToType(type: Type, target: Type) { return type !== undefined && target !== undefined @@ -13001,7 +13018,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { links.instantiations.set(getTypeListId(typeParameters), type); } if (type === intrinsicMarkerType && symbol.escapedName === "BuiltinIteratorReturn") { - type = strictBuiltinIteratorReturn ? undefinedType : anyType; + type = getBuiltinIteratorReturnType(); } } else { @@ -16868,6 +16885,16 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { return symbol || reportErrors ? getTypeOfGlobalSymbol(symbol, arity) : undefined; } + function getGlobalBuiltinTypes(typeNames: readonly string[], arity: 0): ObjectType[]; + function getGlobalBuiltinTypes(typeNames: readonly string[], arity: number): GenericType[]; + function getGlobalBuiltinTypes(typeNames: readonly string[], arity: number) { + let types: Type[] | undefined; + for (const typeName of typeNames) { + types = append(types, getGlobalType(typeName as __String, arity, /*reportErrors*/ false)); + } + return types ?? emptyArray; + } + function getGlobalTypedPropertyDescriptorType() { // We always report an error, so store a result in the event we could not resolve the symbol to prevent reporting it multiple times return deferredGlobalTypedPropertyDescriptorType ||= getGlobalType("TypedPropertyDescriptor" as __String, /*arity*/ 1, /*reportErrors*/ true) || emptyGenericType; @@ -16949,8 +16976,13 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { return (deferredGlobalAsyncIterableIteratorType ||= getGlobalType("AsyncIterableIterator" as __String, /*arity*/ 3, reportErrors)) || emptyGenericType; } - function getGlobalBuiltinAsyncIteratorType(reportErrors: boolean) { - return (deferredGlobalBuiltinAsyncIteratorType ||= getGlobalType("BuiltinAsyncIterator" as __String, /*arity*/ 3, reportErrors)) || emptyGenericType; + function getGlobalBuiltinAsyncIteratorTypes() { + // NOTE: This list does not include all built-in async iterator types, only those that are likely to be encountered frequently. + return deferredGlobalBuiltinAsyncIteratorTypes ??= getGlobalBuiltinTypes(["ReadableStreamAsyncIterator"], 1); + } + + function getGlobalAsyncIteratorObjectType(reportErrors: boolean) { + return (deferredGlobalAsyncIteratorObjectType ||= getGlobalType("AsyncIteratorObject" as __String, /*arity*/ 3, reportErrors)) || emptyGenericType; } function getGlobalAsyncGeneratorType(reportErrors: boolean) { @@ -16969,8 +17001,17 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { return (deferredGlobalIterableIteratorType ||= getGlobalType("IterableIterator" as __String, /*arity*/ 3, reportErrors)) || emptyGenericType; } - function getGlobalBuiltinIteratorType(reportErrors: boolean) { - return (deferredGlobalBuiltinIteratorType ||= getGlobalType("BuiltinIterator" as __String, /*arity*/ 3, reportErrors)) || emptyGenericType; + function getBuiltinIteratorReturnType() { + return strictBuiltinIteratorReturn ? undefinedType : anyType; + } + + function getGlobalBuiltinIteratorTypes() { + // NOTE: This list does not include all built-in iterator types, only those that are likely to be encountered frequently. + return deferredGlobalBuiltinIteratorTypes ??= getGlobalBuiltinTypes(["ArrayIterator", "MapIterator", "SetIterator", "StringIterator"], 1); + } + + function getGlobalIteratorObjectType(reportErrors: boolean) { + return (deferredGlobalIteratorObjectType ||= getGlobalType("IteratorObject" as __String, /*arity*/ 3, reportErrors)) || emptyGenericType; } function getGlobalGeneratorType(reportErrors: boolean) { @@ -44951,18 +44992,32 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { // As an optimization, if the type is an instantiation of the following global type, then // just grab its related type arguments: // - `Iterable` or `AsyncIterable` - // - `BuiltinIterator` or `BuiltinAsyncIterator` + // - `IteratorObject` or `AsyncIteratorObject` // - `IterableIterator` or `AsyncIterableIterator` // - `Generator` or `AsyncGenerator` if ( isReferenceToType(type, resolver.getGlobalIterableType(/*reportErrors*/ false)) || - isReferenceToType(type, resolver.getGlobalBuiltinIteratorType(/*reportErrors*/ false)) || + isReferenceToType(type, resolver.getGlobalIteratorObjectType(/*reportErrors*/ false)) || isReferenceToType(type, resolver.getGlobalIterableIteratorType(/*reportErrors*/ false)) || isReferenceToType(type, resolver.getGlobalGeneratorType(/*reportErrors*/ false)) ) { const [yieldType, returnType, nextType] = getTypeArguments(type as GenericType); return setCachedIterationTypes(type, resolver.iterableCacheKey, createIterationTypes(resolver.resolveIterationType(yieldType, /*errorNode*/ undefined) || yieldType, resolver.resolveIterationType(returnType, /*errorNode*/ undefined) || returnType, nextType)); } + + // As an optimization, if the type is an instantiation of one of the following global types, then + // just grab the related type argument: + // - `ArrayIterator` + // - `MapIterator` + // - `SetIterator` + // - `StringIterator` + // - `ReadableStreamAsyncIterator` + if (isReferenceToSomeType(type, resolver.getGlobalBuiltinIteratorTypes())) { + const [yieldType] = getTypeArguments(type as GenericType); + const returnType = getBuiltinIteratorReturnType(); + const nextType = unknownType; + return setCachedIterationTypes(type, resolver.iterableCacheKey, createIterationTypes(resolver.resolveIterationType(yieldType, /*errorNode*/ undefined) || yieldType, resolver.resolveIterationType(returnType, /*errorNode*/ undefined) || returnType, nextType)); + } } function getPropertyNameForKnownSymbolName(symbolName: string): __String { @@ -45079,18 +45134,32 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { // As an optimization, if the type is an instantiation of one of the following global types, // then just grab its related type arguments: // - `IterableIterator` or `AsyncIterableIterator` - // - `BuiltinIterator` or `BuiltinAsyncIterator` + // - `IteratorObject` or `AsyncIteratorObject` // - `Iterator` or `AsyncIterator` // - `Generator` or `AsyncGenerator` if ( - isReferenceToType(type, resolver.getGlobalBuiltinIteratorType(/*reportErrors*/ false)) || isReferenceToType(type, resolver.getGlobalIterableIteratorType(/*reportErrors*/ false)) || isReferenceToType(type, resolver.getGlobalIteratorType(/*reportErrors*/ false)) || + isReferenceToType(type, resolver.getGlobalIteratorObjectType(/*reportErrors*/ false)) || isReferenceToType(type, resolver.getGlobalGeneratorType(/*reportErrors*/ false)) ) { const [yieldType, returnType, nextType] = getTypeArguments(type as GenericType); return setCachedIterationTypes(type, resolver.iteratorCacheKey, createIterationTypes(yieldType, returnType, nextType)); } + + // As an optimization, if the type is an instantiation of one of the following global types, then + // just grab the related type argument: + // - `ArrayIterator` + // - `MapIterator` + // - `SetIterator` + // - `StringIterator` + // - `ReadableStreamAsyncIterator` + if (isReferenceToSomeType(type, resolver.getGlobalBuiltinIteratorTypes())) { + const [yieldType] = getTypeArguments(type as GenericType); + const returnType = getBuiltinIteratorReturnType(); + const nextType = unknownType; + return setCachedIterationTypes(type, resolver.iteratorCacheKey, createIterationTypes(yieldType, returnType, nextType)); + } } function isIteratorResult(type: Type, kind: IterationTypeKind.Yield | IterationTypeKind.Return) { diff --git a/src/lib/dom.asynciterable.generated.d.ts b/src/lib/dom.asynciterable.generated.d.ts index f9b5ee37473ac..9668532471f0e 100644 --- a/src/lib/dom.asynciterable.generated.d.ts +++ b/src/lib/dom.asynciterable.generated.d.ts @@ -2,14 +2,22 @@ /// Window Async Iterable APIs ///////////////////////////// +interface FileSystemDirectoryHandleAsyncIterator extends AsyncIteratorObject { + [Symbol.asyncIterator](): FileSystemDirectoryHandleAsyncIterator; +} + interface FileSystemDirectoryHandle { - [Symbol.asyncIterator](): BuiltinAsyncIterator<[string, FileSystemHandle], BuiltinIteratorReturn>; - entries(): BuiltinAsyncIterator<[string, FileSystemHandle], BuiltinIteratorReturn>; - keys(): BuiltinAsyncIterator; - values(): BuiltinAsyncIterator; + [Symbol.asyncIterator](): FileSystemDirectoryHandleAsyncIterator<[string, FileSystemHandle]>; + entries(): FileSystemDirectoryHandleAsyncIterator<[string, FileSystemHandle]>; + keys(): FileSystemDirectoryHandleAsyncIterator; + values(): FileSystemDirectoryHandleAsyncIterator; +} + +interface ReadableStreamAsyncIterator extends AsyncIteratorObject { + [Symbol.asyncIterator](): ReadableStreamAsyncIterator; } interface ReadableStream { - [Symbol.asyncIterator](options?: ReadableStreamIteratorOptions): BuiltinAsyncIterator; - values(options?: ReadableStreamIteratorOptions): BuiltinAsyncIterator; + [Symbol.asyncIterator](options?: ReadableStreamIteratorOptions): ReadableStreamAsyncIterator; + values(options?: ReadableStreamIteratorOptions): ReadableStreamAsyncIterator; } diff --git a/src/lib/dom.iterable.d.ts b/src/lib/dom.iterable.d.ts index da56ceae7a647..d6d9975ddbde9 100644 --- a/src/lib/dom.iterable.d.ts +++ b/src/lib/dom.iterable.d.ts @@ -1,30 +1,34 @@ /// interface DOMTokenList { - [Symbol.iterator](): BuiltinIterator; + [Symbol.iterator](): ArrayIterator; +} + +interface HeadersIterator extends IteratorObject { + [Symbol.iterator](): HeadersIterator; } interface Headers { - [Symbol.iterator](): BuiltinIterator<[string, string], BuiltinIteratorReturn>; + [Symbol.iterator](): HeadersIterator<[string, string]>; /** * Returns an iterator allowing to go through all key/value pairs contained in this object. */ - entries(): BuiltinIterator<[string, string], BuiltinIteratorReturn>; + entries(): HeadersIterator<[string, string]>; /** * Returns an iterator allowing to go through all keys f the key/value pairs contained in this object. */ - keys(): BuiltinIterator; + keys(): HeadersIterator; /** * Returns an iterator allowing to go through all values of the key/value pairs contained in this object. */ - values(): BuiltinIterator; + values(): HeadersIterator; } interface NodeList { /** * Returns an array of key, value pairs for every entry in the list */ - entries(): BuiltinIterator<[number, Node], BuiltinIteratorReturn>; + entries(): ArrayIterator<[number, Node]>; /** * Performs the specified action for each node in an list. * @param callbackfn A function that accepts up to three arguments. forEach calls the callbackfn function one time for each element in the list. @@ -34,21 +38,21 @@ interface NodeList { /** * Returns an list of keys in the list */ - keys(): BuiltinIterator; + keys(): ArrayIterator; /** * Returns an list of values in the list */ - values(): BuiltinIterator; + values(): ArrayIterator; - [Symbol.iterator](): BuiltinIterator; + [Symbol.iterator](): ArrayIterator; } interface NodeListOf { /** * Returns an array of key, value pairs for every entry in the list */ - entries(): BuiltinIterator<[number, TNode], BuiltinIteratorReturn>; + entries(): ArrayIterator<[number, TNode]>; /** * Performs the specified action for each node in an list. @@ -59,55 +63,63 @@ interface NodeListOf { /** * Returns an list of keys in the list */ - keys(): BuiltinIterator; + keys(): ArrayIterator; /** * Returns an list of values in the list */ - values(): BuiltinIterator; + values(): ArrayIterator; - [Symbol.iterator](): BuiltinIterator; + [Symbol.iterator](): ArrayIterator; } interface HTMLCollectionBase { - [Symbol.iterator](): BuiltinIterator; + [Symbol.iterator](): ArrayIterator; } interface HTMLCollectionOf { - [Symbol.iterator](): BuiltinIterator; + [Symbol.iterator](): ArrayIterator; +} + +interface FormDataIterator extends IteratorObject { + [Symbol.iterator](): FormDataIterator; } interface FormData { /** * Returns an array of key, value pairs for every entry in the list */ - entries(): BuiltinIterator<[string, string | File], BuiltinIteratorReturn>; + entries(): FormDataIterator<[string, string | File]>; /** * Returns a list of keys in the list */ - keys(): BuiltinIterator; + keys(): FormDataIterator; /** * Returns a list of values in the list */ - values(): BuiltinIterator; + values(): FormDataIterator; + + [Symbol.iterator](): FormDataIterator; +} - [Symbol.iterator](): BuiltinIterator; +interface URLSearchParamsIterator extends IteratorObject { + [Symbol.iterator](): URLSearchParamsIterator; } interface URLSearchParams { /** * Returns an array of key, value pairs for every entry in the search params */ - entries(): BuiltinIterator<[string, string], BuiltinIteratorReturn>; + entries(): URLSearchParamsIterator<[string, string]>; /** * Returns a list of keys in the search params */ - keys(): BuiltinIterator; + keys(): URLSearchParamsIterator; /** * Returns a list of values in the search params */ - values(): BuiltinIterator; + values(): URLSearchParamsIterator; /** * iterate over key/value pairs */ - [Symbol.iterator](): BuiltinIterator<[string, string], BuiltinIteratorReturn>; + [Symbol.iterator](): URLSearchParamsIterator<[string, string]>; } diff --git a/src/lib/dom.iterable.generated.d.ts b/src/lib/dom.iterable.generated.d.ts index f23e1534c4638..70c0039ce0d35 100644 --- a/src/lib/dom.iterable.generated.d.ts +++ b/src/lib/dom.iterable.generated.d.ts @@ -23,36 +23,36 @@ interface BaseAudioContext { } interface CSSKeyframesRule { - [Symbol.iterator](): BuiltinIterator; + [Symbol.iterator](): ArrayIterator; } interface CSSNumericArray { - [Symbol.iterator](): BuiltinIterator; - entries(): BuiltinIterator<[number, CSSNumericValue], BuiltinIteratorReturn>; - keys(): BuiltinIterator; - values(): BuiltinIterator; + [Symbol.iterator](): ArrayIterator; + entries(): ArrayIterator<[number, CSSNumericValue]>; + keys(): ArrayIterator; + values(): ArrayIterator; } interface CSSRuleList { - [Symbol.iterator](): BuiltinIterator; + [Symbol.iterator](): ArrayIterator; } interface CSSStyleDeclaration { - [Symbol.iterator](): BuiltinIterator; + [Symbol.iterator](): ArrayIterator; } interface CSSTransformValue { - [Symbol.iterator](): BuiltinIterator; - entries(): BuiltinIterator<[number, CSSTransformComponent], BuiltinIteratorReturn>; - keys(): BuiltinIterator; - values(): BuiltinIterator; + [Symbol.iterator](): ArrayIterator; + entries(): ArrayIterator<[number, CSSTransformComponent]>; + keys(): ArrayIterator; + values(): ArrayIterator; } interface CSSUnparsedValue { - [Symbol.iterator](): BuiltinIterator; - entries(): BuiltinIterator<[number, CSSUnparsedSegment], BuiltinIteratorReturn>; - keys(): BuiltinIterator; - values(): BuiltinIterator; + [Symbol.iterator](): ArrayIterator; + entries(): ArrayIterator<[number, CSSUnparsedSegment]>; + keys(): ArrayIterator; + values(): ArrayIterator; } interface Cache { @@ -74,72 +74,80 @@ interface CustomStateSet extends Set { } interface DOMRectList { - [Symbol.iterator](): BuiltinIterator; + [Symbol.iterator](): ArrayIterator; } interface DOMStringList { - [Symbol.iterator](): BuiltinIterator; + [Symbol.iterator](): ArrayIterator; } interface DOMTokenList { - [Symbol.iterator](): BuiltinIterator; - entries(): BuiltinIterator<[number, string], BuiltinIteratorReturn>; - keys(): BuiltinIterator; - values(): BuiltinIterator; + [Symbol.iterator](): ArrayIterator; + entries(): ArrayIterator<[number, string]>; + keys(): ArrayIterator; + values(): ArrayIterator; } interface DataTransferItemList { - [Symbol.iterator](): BuiltinIterator; + [Symbol.iterator](): ArrayIterator; } interface EventCounts extends ReadonlyMap { } interface FileList { - [Symbol.iterator](): BuiltinIterator; + [Symbol.iterator](): ArrayIterator; } interface FontFaceSet extends Set { } +interface FormDataIterator extends IteratorObject { + [Symbol.iterator](): FormDataIterator; +} + interface FormData { - [Symbol.iterator](): BuiltinIterator<[string, FormDataEntryValue], BuiltinIteratorReturn>; + [Symbol.iterator](): FormDataIterator<[string, FormDataEntryValue]>; /** Returns an array of key, value pairs for every entry in the list. */ - entries(): BuiltinIterator<[string, FormDataEntryValue], BuiltinIteratorReturn>; + entries(): FormDataIterator<[string, FormDataEntryValue]>; /** Returns a list of keys in the list. */ - keys(): BuiltinIterator; + keys(): FormDataIterator; /** Returns a list of values in the list. */ - values(): BuiltinIterator; + values(): FormDataIterator; } interface HTMLAllCollection { - [Symbol.iterator](): BuiltinIterator; + [Symbol.iterator](): ArrayIterator; } interface HTMLCollectionBase { - [Symbol.iterator](): BuiltinIterator; + [Symbol.iterator](): ArrayIterator; } interface HTMLCollectionOf { - [Symbol.iterator](): BuiltinIterator; + [Symbol.iterator](): ArrayIterator; } interface HTMLFormElement { - [Symbol.iterator](): BuiltinIterator; + [Symbol.iterator](): ArrayIterator; } interface HTMLSelectElement { - [Symbol.iterator](): BuiltinIterator; + [Symbol.iterator](): ArrayIterator; +} + +interface HeadersIterator extends IteratorObject { + [Symbol.iterator](): HeadersIterator; } interface Headers { - [Symbol.iterator](): BuiltinIterator<[string, string], BuiltinIteratorReturn>; + [Symbol.iterator](): HeadersIterator<[string, string]>; /** Returns an iterator allowing to go through all key/value pairs contained in this object. */ - entries(): BuiltinIterator<[string, string], BuiltinIteratorReturn>; + entries(): HeadersIterator<[string, string]>; /** Returns an iterator allowing to go through all keys of the key/value pairs contained in this object. */ - keys(): BuiltinIterator; + keys(): HeadersIterator; /** Returns an iterator allowing to go through all values of the key/value pairs contained in this object. */ - values(): BuiltinIterator; + values(): HeadersIterator; } interface Highlight extends Set { @@ -179,15 +187,19 @@ interface MIDIOutput { interface MIDIOutputMap extends ReadonlyMap { } +interface MediaKeyStatusMapIterator extends IteratorObject { + [Symbol.iterator](): MediaKeyStatusMapIterator; +} + interface MediaKeyStatusMap { - [Symbol.iterator](): BuiltinIterator<[BufferSource, MediaKeyStatus], BuiltinIteratorReturn>; - entries(): BuiltinIterator<[BufferSource, MediaKeyStatus], BuiltinIteratorReturn>; - keys(): BuiltinIterator; - values(): BuiltinIterator; + [Symbol.iterator](): MediaKeyStatusMapIterator<[BufferSource, MediaKeyStatus]>; + entries(): MediaKeyStatusMapIterator<[BufferSource, MediaKeyStatus]>; + keys(): MediaKeyStatusMapIterator; + values(): MediaKeyStatusMapIterator; } interface MediaList { - [Symbol.iterator](): BuiltinIterator; + [Symbol.iterator](): ArrayIterator; } interface MessageEvent { @@ -196,11 +208,11 @@ interface MessageEvent { } interface MimeTypeArray { - [Symbol.iterator](): BuiltinIterator; + [Symbol.iterator](): ArrayIterator; } interface NamedNodeMap { - [Symbol.iterator](): BuiltinIterator; + [Symbol.iterator](): ArrayIterator; } interface Navigator { @@ -215,31 +227,31 @@ interface Navigator { } interface NodeList { - [Symbol.iterator](): BuiltinIterator; + [Symbol.iterator](): ArrayIterator; /** Returns an array of key, value pairs for every entry in the list. */ - entries(): BuiltinIterator<[number, Node], BuiltinIteratorReturn>; + entries(): ArrayIterator<[number, Node]>; /** Returns an list of keys in the list. */ - keys(): BuiltinIterator; + keys(): ArrayIterator; /** Returns an list of values in the list. */ - values(): BuiltinIterator; + values(): ArrayIterator; } interface NodeListOf { - [Symbol.iterator](): BuiltinIterator; + [Symbol.iterator](): ArrayIterator; /** Returns an array of key, value pairs for every entry in the list. */ - entries(): BuiltinIterator<[number, TNode], BuiltinIteratorReturn>; + entries(): ArrayIterator<[number, TNode]>; /** Returns an list of keys in the list. */ - keys(): BuiltinIterator; + keys(): ArrayIterator; /** Returns an list of values in the list. */ - values(): BuiltinIterator; + values(): ArrayIterator; } interface Plugin { - [Symbol.iterator](): BuiltinIterator; + [Symbol.iterator](): ArrayIterator; } interface PluginArray { - [Symbol.iterator](): BuiltinIterator; + [Symbol.iterator](): ArrayIterator; } interface RTCRtpTransceiver { @@ -251,46 +263,50 @@ interface RTCStatsReport extends ReadonlyMap { } interface SVGLengthList { - [Symbol.iterator](): BuiltinIterator; + [Symbol.iterator](): ArrayIterator; } interface SVGNumberList { - [Symbol.iterator](): BuiltinIterator; + [Symbol.iterator](): ArrayIterator; } interface SVGPointList { - [Symbol.iterator](): BuiltinIterator; + [Symbol.iterator](): ArrayIterator; } interface SVGStringList { - [Symbol.iterator](): BuiltinIterator; + [Symbol.iterator](): ArrayIterator; } interface SVGTransformList { - [Symbol.iterator](): BuiltinIterator; + [Symbol.iterator](): ArrayIterator; } interface SourceBufferList { - [Symbol.iterator](): BuiltinIterator; + [Symbol.iterator](): ArrayIterator; } interface SpeechRecognitionResult { - [Symbol.iterator](): BuiltinIterator; + [Symbol.iterator](): ArrayIterator; } interface SpeechRecognitionResultList { - [Symbol.iterator](): BuiltinIterator; + [Symbol.iterator](): ArrayIterator; +} + +interface StylePropertyMapReadOnlyIterator extends IteratorObject { + [Symbol.iterator](): StylePropertyMapReadOnlyIterator; } interface StylePropertyMapReadOnly { - [Symbol.iterator](): BuiltinIterator<[string, Iterable], BuiltinIteratorReturn>; - entries(): BuiltinIterator<[string, Iterable], BuiltinIteratorReturn>; - keys(): BuiltinIterator; - values(): BuiltinIterator, BuiltinIteratorReturn>; + [Symbol.iterator](): StylePropertyMapReadOnlyIterator<[string, Iterable]>; + entries(): StylePropertyMapReadOnlyIterator<[string, Iterable]>; + keys(): StylePropertyMapReadOnlyIterator; + values(): StylePropertyMapReadOnlyIterator>; } interface StyleSheetList { - [Symbol.iterator](): BuiltinIterator; + [Symbol.iterator](): ArrayIterator; } interface SubtleCrypto { @@ -309,25 +325,29 @@ interface SubtleCrypto { } interface TextTrackCueList { - [Symbol.iterator](): BuiltinIterator; + [Symbol.iterator](): ArrayIterator; } interface TextTrackList { - [Symbol.iterator](): BuiltinIterator; + [Symbol.iterator](): ArrayIterator; } interface TouchList { - [Symbol.iterator](): BuiltinIterator; + [Symbol.iterator](): ArrayIterator; +} + +interface URLSearchParamsIterator extends IteratorObject { + [Symbol.iterator](): URLSearchParamsIterator; } interface URLSearchParams { - [Symbol.iterator](): BuiltinIterator<[string, string], BuiltinIteratorReturn>; + [Symbol.iterator](): URLSearchParamsIterator<[string, string]>; /** Returns an array of key, value pairs for every entry in the search params. */ - entries(): BuiltinIterator<[string, string], BuiltinIteratorReturn>; + entries(): URLSearchParamsIterator<[string, string]>; /** Returns a list of keys in the search params. */ - keys(): BuiltinIterator; + keys(): URLSearchParamsIterator; /** Returns a list of values in the search params. */ - values(): BuiltinIterator; + values(): URLSearchParamsIterator; } interface WEBGL_draw_buffers { diff --git a/src/lib/es2015.generator.d.ts b/src/lib/es2015.generator.d.ts index 2397d79dddbd3..435806e925f1e 100644 --- a/src/lib/es2015.generator.d.ts +++ b/src/lib/es2015.generator.d.ts @@ -1,6 +1,6 @@ /// -interface Generator extends BuiltinIterator { +interface Generator extends IteratorObject { // NOTE: 'next' is defined using a tuple to ensure we report the correct assignability errors in all places. next(...[value]: [] | [TNext]): IteratorResult; return(value: TReturn): IteratorResult; diff --git a/src/lib/es2015.iterable.d.ts b/src/lib/es2015.iterable.d.ts index 00a0ff820ca09..50e2277c533e1 100644 --- a/src/lib/es2015.iterable.d.ts +++ b/src/lib/es2015.iterable.d.ts @@ -31,34 +31,48 @@ interface Iterable { [Symbol.iterator](): Iterator; } +/** + * Describes a user-defined {@link Iterator} that is also iterable. + */ interface IterableIterator extends Iterator { [Symbol.iterator](): IterableIterator; } -interface BuiltinIterator extends Iterator { - [Symbol.iterator](): BuiltinIterator; +/** + * Describes an {@link Iterator} produced by the runtime that inherits from the intrinsic `Iterator.prototype`. + */ +interface IteratorObject extends Iterator { + [Symbol.iterator](): IteratorObject; } +/** + * Defines the `TReturn` type used for built-in iterators produced by `Array`, `Map`, `Set`, and others. + * This is `undefined` when `strictBuiltInIteratorReturn` is `true`; otherwise, this is `any`. + */ type BuiltinIteratorReturn = intrinsic; +interface ArrayIterator extends IteratorObject { + [Symbol.iterator](): ArrayIterator; +} + interface Array { /** Iterator */ - [Symbol.iterator](): BuiltinIterator; + [Symbol.iterator](): ArrayIterator; /** * Returns an iterable of key, value pairs for every entry in the array */ - entries(): BuiltinIterator<[number, T], BuiltinIteratorReturn>; + entries(): ArrayIterator<[number, T]>; /** * Returns an iterable of keys in the array */ - keys(): BuiltinIterator; + keys(): ArrayIterator; /** * Returns an iterable of values in the array */ - values(): BuiltinIterator; + values(): ArrayIterator; } interface ArrayConstructor { @@ -79,67 +93,71 @@ interface ArrayConstructor { interface ReadonlyArray { /** Iterator of values in the array. */ - [Symbol.iterator](): BuiltinIterator; + [Symbol.iterator](): ArrayIterator; /** * Returns an iterable of key, value pairs for every entry in the array */ - entries(): BuiltinIterator<[number, T], BuiltinIteratorReturn>; + entries(): ArrayIterator<[number, T]>; /** * Returns an iterable of keys in the array */ - keys(): BuiltinIterator; + keys(): ArrayIterator; /** * Returns an iterable of values in the array */ - values(): BuiltinIterator; + values(): ArrayIterator; } interface IArguments { /** Iterator */ - [Symbol.iterator](): BuiltinIterator; + [Symbol.iterator](): ArrayIterator; +} + +interface MapIterator extends IteratorObject { + [Symbol.iterator](): MapIterator; } interface Map { /** Returns an iterable of entries in the map. */ - [Symbol.iterator](): BuiltinIterator<[K, V], BuiltinIteratorReturn>; + [Symbol.iterator](): MapIterator<[K, V]>; /** * Returns an iterable of key, value pairs for every entry in the map. */ - entries(): BuiltinIterator<[K, V], BuiltinIteratorReturn>; + entries(): MapIterator<[K, V]>; /** * Returns an iterable of keys in the map */ - keys(): BuiltinIterator; + keys(): MapIterator; /** * Returns an iterable of values in the map */ - values(): BuiltinIterator; + values(): MapIterator; } interface ReadonlyMap { /** Returns an iterable of entries in the map. */ - [Symbol.iterator](): BuiltinIterator<[K, V], BuiltinIteratorReturn>; + [Symbol.iterator](): MapIterator<[K, V]>; /** * Returns an iterable of key, value pairs for every entry in the map. */ - entries(): BuiltinIterator<[K, V], BuiltinIteratorReturn>; + entries(): MapIterator<[K, V]>; /** * Returns an iterable of keys in the map */ - keys(): BuiltinIterator; + keys(): MapIterator; /** * Returns an iterable of values in the map */ - values(): BuiltinIterator; + values(): MapIterator; } interface MapConstructor { @@ -153,42 +171,46 @@ interface WeakMapConstructor { new (iterable: Iterable): WeakMap; } +interface SetIterator extends IteratorObject { + [Symbol.iterator](): SetIterator; +} + interface Set { /** Iterates over values in the set. */ - [Symbol.iterator](): BuiltinIterator; + [Symbol.iterator](): SetIterator; /** * Returns an iterable of [v,v] pairs for every value `v` in the set. */ - entries(): BuiltinIterator<[T, T], BuiltinIteratorReturn>; + entries(): SetIterator<[T, T]>; /** * Despite its name, returns an iterable of the values in the set. */ - keys(): BuiltinIterator; + keys(): SetIterator; /** * Returns an iterable of values in the set. */ - values(): BuiltinIterator; + values(): SetIterator; } interface ReadonlySet { /** Iterates over values in the set. */ - [Symbol.iterator](): BuiltinIterator; + [Symbol.iterator](): SetIterator; /** * Returns an iterable of [v,v] pairs for every value `v` in the set. */ - entries(): BuiltinIterator<[T, T], BuiltinIteratorReturn>; + entries(): SetIterator<[T, T]>; /** * Despite its name, returns an iterable of the values in the set. */ - keys(): BuiltinIterator; + keys(): SetIterator; /** * Returns an iterable of values in the set. */ - values(): BuiltinIterator; + values(): SetIterator; } interface SetConstructor { @@ -221,25 +243,29 @@ interface PromiseConstructor { race(values: Iterable>): Promise>; } +interface StringIterator extends IteratorObject { + [Symbol.iterator](): StringIterator; +} + interface String { /** Iterator */ - [Symbol.iterator](): BuiltinIterator; + [Symbol.iterator](): StringIterator; } interface Int8Array { - [Symbol.iterator](): BuiltinIterator; + [Symbol.iterator](): ArrayIterator; /** * Returns an array of key, value pairs for every entry in the array */ - entries(): BuiltinIterator<[number, number], BuiltinIteratorReturn>; + entries(): ArrayIterator<[number, number]>; /** * Returns an list of keys in the array */ - keys(): BuiltinIterator; + keys(): ArrayIterator; /** * Returns an list of values in the array */ - values(): BuiltinIterator; + values(): ArrayIterator; } interface Int8ArrayConstructor { @@ -255,19 +281,19 @@ interface Int8ArrayConstructor { } interface Uint8Array { - [Symbol.iterator](): BuiltinIterator; + [Symbol.iterator](): ArrayIterator; /** * Returns an array of key, value pairs for every entry in the array */ - entries(): BuiltinIterator<[number, number], BuiltinIteratorReturn>; + entries(): ArrayIterator<[number, number]>; /** * Returns an list of keys in the array */ - keys(): BuiltinIterator; + keys(): ArrayIterator; /** * Returns an list of values in the array */ - values(): BuiltinIterator; + values(): ArrayIterator; } interface Uint8ArrayConstructor { @@ -283,21 +309,21 @@ interface Uint8ArrayConstructor { } interface Uint8ClampedArray { - [Symbol.iterator](): BuiltinIterator; + [Symbol.iterator](): ArrayIterator; /** * Returns an array of key, value pairs for every entry in the array */ - entries(): BuiltinIterator<[number, number], BuiltinIteratorReturn>; + entries(): ArrayIterator<[number, number]>; /** * Returns an list of keys in the array */ - keys(): BuiltinIterator; + keys(): ArrayIterator; /** * Returns an list of values in the array */ - values(): BuiltinIterator; + values(): ArrayIterator; } interface Uint8ClampedArrayConstructor { @@ -313,21 +339,21 @@ interface Uint8ClampedArrayConstructor { } interface Int16Array { - [Symbol.iterator](): BuiltinIterator; + [Symbol.iterator](): ArrayIterator; /** * Returns an array of key, value pairs for every entry in the array */ - entries(): BuiltinIterator<[number, number], BuiltinIteratorReturn>; + entries(): ArrayIterator<[number, number]>; /** * Returns an list of keys in the array */ - keys(): BuiltinIterator; + keys(): ArrayIterator; /** * Returns an list of values in the array */ - values(): BuiltinIterator; + values(): ArrayIterator; } interface Int16ArrayConstructor { @@ -343,19 +369,19 @@ interface Int16ArrayConstructor { } interface Uint16Array { - [Symbol.iterator](): BuiltinIterator; + [Symbol.iterator](): ArrayIterator; /** * Returns an array of key, value pairs for every entry in the array */ - entries(): BuiltinIterator<[number, number], BuiltinIteratorReturn>; + entries(): ArrayIterator<[number, number]>; /** * Returns an list of keys in the array */ - keys(): BuiltinIterator; + keys(): ArrayIterator; /** * Returns an list of values in the array */ - values(): BuiltinIterator; + values(): ArrayIterator; } interface Uint16ArrayConstructor { @@ -371,19 +397,19 @@ interface Uint16ArrayConstructor { } interface Int32Array { - [Symbol.iterator](): BuiltinIterator; + [Symbol.iterator](): ArrayIterator; /** * Returns an array of key, value pairs for every entry in the array */ - entries(): BuiltinIterator<[number, number], BuiltinIteratorReturn>; + entries(): ArrayIterator<[number, number]>; /** * Returns an list of keys in the array */ - keys(): BuiltinIterator; + keys(): ArrayIterator; /** * Returns an list of values in the array */ - values(): BuiltinIterator; + values(): ArrayIterator; } interface Int32ArrayConstructor { @@ -399,19 +425,19 @@ interface Int32ArrayConstructor { } interface Uint32Array { - [Symbol.iterator](): BuiltinIterator; + [Symbol.iterator](): ArrayIterator; /** * Returns an array of key, value pairs for every entry in the array */ - entries(): BuiltinIterator<[number, number], BuiltinIteratorReturn>; + entries(): ArrayIterator<[number, number]>; /** * Returns an list of keys in the array */ - keys(): BuiltinIterator; + keys(): ArrayIterator; /** * Returns an list of values in the array */ - values(): BuiltinIterator; + values(): ArrayIterator; } interface Uint32ArrayConstructor { @@ -427,19 +453,19 @@ interface Uint32ArrayConstructor { } interface Float32Array { - [Symbol.iterator](): BuiltinIterator; + [Symbol.iterator](): ArrayIterator; /** * Returns an array of key, value pairs for every entry in the array */ - entries(): BuiltinIterator<[number, number], BuiltinIteratorReturn>; + entries(): ArrayIterator<[number, number]>; /** * Returns an list of keys in the array */ - keys(): BuiltinIterator; + keys(): ArrayIterator; /** * Returns an list of values in the array */ - values(): BuiltinIterator; + values(): ArrayIterator; } interface Float32ArrayConstructor { @@ -455,19 +481,19 @@ interface Float32ArrayConstructor { } interface Float64Array { - [Symbol.iterator](): BuiltinIterator; + [Symbol.iterator](): ArrayIterator; /** * Returns an array of key, value pairs for every entry in the array */ - entries(): BuiltinIterator<[number, number], BuiltinIteratorReturn>; + entries(): ArrayIterator<[number, number]>; /** * Returns an list of keys in the array */ - keys(): BuiltinIterator; + keys(): ArrayIterator; /** * Returns an list of values in the array */ - values(): BuiltinIterator; + values(): ArrayIterator; } interface Float64ArrayConstructor { diff --git a/src/lib/es2018.asyncgenerator.d.ts b/src/lib/es2018.asyncgenerator.d.ts index e5397a9e7afe2..543cf3a0798f6 100644 --- a/src/lib/es2018.asyncgenerator.d.ts +++ b/src/lib/es2018.asyncgenerator.d.ts @@ -1,6 +1,6 @@ /// -interface AsyncGenerator extends BuiltinAsyncIterator { +interface AsyncGenerator extends AsyncIteratorObject { // NOTE: 'next' is defined using a tuple to ensure we report the correct assignability errors in all places. next(...[value]: [] | [TNext]): Promise>; return(value: TReturn | PromiseLike): Promise>; diff --git a/src/lib/es2018.asynciterable.d.ts b/src/lib/es2018.asynciterable.d.ts index d5a587aef2767..9db5d98290adb 100644 --- a/src/lib/es2018.asynciterable.d.ts +++ b/src/lib/es2018.asynciterable.d.ts @@ -20,10 +20,16 @@ interface AsyncIterable { [Symbol.asyncIterator](): AsyncIterator; } +/** + * Describes a user-defined {@link AsyncIterator} that is also async iterable. + */ interface AsyncIterableIterator extends AsyncIterator { [Symbol.asyncIterator](): AsyncIterableIterator; } -interface BuiltinAsyncIterator extends AsyncIterator { - [Symbol.asyncIterator](): BuiltinAsyncIterator; +/** + * Describes an {@link AsyncIterator} produced by the runtime that inherits from the intrinsic `AsyncIterator.prototype`. + */ +interface AsyncIteratorObject extends AsyncIterator { + [Symbol.asyncIterator](): AsyncIteratorObject; } diff --git a/src/lib/es2020.bigint.d.ts b/src/lib/es2020.bigint.d.ts index c6ee094a332dc..95d2ff245897c 100644 --- a/src/lib/es2020.bigint.d.ts +++ b/src/lib/es2020.bigint.d.ts @@ -153,7 +153,7 @@ interface BigInt64Array { copyWithin(target: number, start: number, end?: number): this; /** Yields index, value pairs for every entry in the array. */ - entries(): BuiltinIterator<[number, bigint], BuiltinIteratorReturn>; + entries(): ArrayIterator<[number, bigint]>; /** * Determines whether all the members of an array satisfy the specified test. @@ -238,7 +238,7 @@ interface BigInt64Array { join(separator?: string): string; /** Yields each index in the array. */ - keys(): BuiltinIterator; + keys(): ArrayIterator; /** * Returns the index of the last occurrence of a value in an array. @@ -360,9 +360,9 @@ interface BigInt64Array { valueOf(): BigInt64Array; /** Yields each value in the array. */ - values(): BuiltinIterator; + values(): ArrayIterator; - [Symbol.iterator](): BuiltinIterator; + [Symbol.iterator](): ArrayIterator; readonly [Symbol.toStringTag]: "BigInt64Array"; @@ -425,7 +425,7 @@ interface BigUint64Array { copyWithin(target: number, start: number, end?: number): this; /** Yields index, value pairs for every entry in the array. */ - entries(): BuiltinIterator<[number, bigint], BuiltinIteratorReturn>; + entries(): ArrayIterator<[number, bigint]>; /** * Determines whether all the members of an array satisfy the specified test. @@ -510,7 +510,7 @@ interface BigUint64Array { join(separator?: string): string; /** Yields each index in the array. */ - keys(): BuiltinIterator; + keys(): ArrayIterator; /** * Returns the index of the last occurrence of a value in an array. @@ -632,9 +632,9 @@ interface BigUint64Array { valueOf(): BigUint64Array; /** Yields each value in the array. */ - values(): BuiltinIterator; + values(): ArrayIterator; - [Symbol.iterator](): BuiltinIterator; + [Symbol.iterator](): ArrayIterator; readonly [Symbol.toStringTag]: "BigUint64Array"; diff --git a/src/lib/es2020.string.d.ts b/src/lib/es2020.string.d.ts index 4d23b7f31941a..19c8f5ebb7dc5 100644 --- a/src/lib/es2020.string.d.ts +++ b/src/lib/es2020.string.d.ts @@ -1,4 +1,4 @@ -/// +/// interface String { /** @@ -6,7 +6,7 @@ interface String { * containing the results of that search. * @param regexp A variable name or string literal containing the regular expression pattern and flags. */ - matchAll(regexp: RegExp): BuiltinIterator; + matchAll(regexp: RegExp): RegExpStringIterator; /** Converts all alphabetic characters to lowercase, taking into account the host environment's current locale. */ toLocaleLowerCase(locales?: Intl.LocalesArgument): string; diff --git a/src/lib/es2020.symbol.wellknown.d.ts b/src/lib/es2020.symbol.wellknown.d.ts index 07aab68a09265..cdf0349f9b420 100644 --- a/src/lib/es2020.symbol.wellknown.d.ts +++ b/src/lib/es2020.symbol.wellknown.d.ts @@ -9,11 +9,15 @@ interface SymbolConstructor { readonly matchAll: unique symbol; } +interface RegExpStringIterator extends IteratorObject { + [Symbol.iterator](): RegExpStringIterator; +} + interface RegExp { /** * Matches a string with this regular expression, and returns an iterable of matches * containing the results of that search. * @param string A string to search within. */ - [Symbol.matchAll](str: string): BuiltinIterator; + [Symbol.matchAll](str: string): RegExpStringIterator; } diff --git a/src/lib/es2022.intl.d.ts b/src/lib/es2022.intl.d.ts index 115e15a528249..e3b1d1d1a8cb3 100644 --- a/src/lib/es2022.intl.d.ts +++ b/src/lib/es2022.intl.d.ts @@ -28,6 +28,10 @@ declare namespace Intl { granularity: "grapheme" | "word" | "sentence"; } + interface SegmentIterator extends IteratorObject { + [Symbol.iterator](): SegmentIterator; + } + interface Segments { /** * Returns an object describing the segment in the original string that includes the code unit at a specified index. @@ -37,7 +41,7 @@ declare namespace Intl { containing(codeUnitIndex?: number): SegmentData; /** Returns an iterator to iterate over the segments. */ - [Symbol.iterator](): BuiltinIterator; + [Symbol.iterator](): SegmentIterator; } interface SegmentData { diff --git a/src/lib/esnext.iterator.d.ts b/src/lib/esnext.iterator.d.ts index 6a8a85eea873e..fe929f59c2206 100644 --- a/src/lib/esnext.iterator.d.ts +++ b/src/lib/esnext.iterator.d.ts @@ -7,59 +7,59 @@ export {}; // Abstract type that allows us to mark `next` as `abstract` -declare abstract class Iterator { // eslint-disable-line @typescript-eslint/no-unsafe-declaration-merging - abstract next(value?: unknown): IteratorResult; +declare abstract class Iterator { // eslint-disable-line @typescript-eslint/no-unsafe-declaration-merging + abstract next(value?: TNext): IteratorResult; } -// Merge all members of `BuiltinIterator` into `Iterator` -interface Iterator extends globalThis.BuiltinIterator {} +// Merge all members of `IteratorObject` into `Iterator` +interface Iterator extends globalThis.IteratorObject {} // Capture the `Iterator` constructor in a type we can use in the `extends` clause of `IteratorConstructor`. -type BuiltinIteratorConstructor = typeof Iterator; +type IteratorObjectConstructor = typeof Iterator; declare global { - // Global `BuiltinIterator` interface that can be augmented by polyfills - interface BuiltinIterator { + // Global `IteratorObject` interface that can be augmented by polyfills + interface IteratorObject { /** * Returns this iterator. */ - [Symbol.iterator](): BuiltinIterator; + [Symbol.iterator](): IteratorObject; /** * Creates an iterator whose values are the result of applying the callback to the values from this iterator. * @param callbackfn A function that accepts up to two arguments to be used to transform values from the underlying iterator. */ - map(callbackfn: (value: T, index: number) => U): BuiltinIterator; + map(callbackfn: (value: T, index: number) => U): IteratorObject; /** * Creates an iterator whose values are those from this iterator for which the provided predicate returns true. * @param predicate A function that accepts up to two arguments to be used to test values from the underlying iterator. */ - filter(predicate: (value: T, index: number) => value is S): BuiltinIterator; + filter(predicate: (value: T, index: number) => value is S): IteratorObject; /** * Creates an iterator whose values are those from this iterator for which the provided predicate returns true. * @param predicate A function that accepts up to two arguments to be used to test values from the underlying iterator. */ - filter(predicate: (value: T, index: number) => unknown): BuiltinIterator; + filter(predicate: (value: T, index: number) => unknown): IteratorObject; /** * Creates an iterator whose values are the values from this iterator, stopping once the provided limit is reached. * @param limit The maximum number of values to yield. */ - take(limit: number): BuiltinIterator; + take(limit: number): IteratorObject; /** * Creates an iterator whose values are the values from this iterator after skipping the provided count. * @param count The number of values to drop. */ - drop(count: number): BuiltinIterator; + drop(count: number): IteratorObject; /** * Creates an iterator whose values are the result of applying the callback to the values from this iterator and then flattening the resulting iterators or iterables. * @param callback A function that accepts up to two arguments to be used to transform values from the underlying iterator into new iterators or iterables to be flattened into the result. */ - flatMap(callback: (value: T, index: number) => Iterator | Iterable): BuiltinIterator; + flatMap(callback: (value: T, index: number) => Iterator | Iterable): IteratorObject; /** * Calls the specified callback function for all the elements in this iterator. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. @@ -117,13 +117,13 @@ declare global { } // Global `IteratorConstructor` interface that can be augmented by polyfills - interface IteratorConstructor extends BuiltinIteratorConstructor { + interface IteratorConstructor extends IteratorObjectConstructor { /** * Creates a native iterator from an iterator or iterable object. * Returns its input if the input already inherits from the built-in Iterator class. * @param value An iterator or iterable object to convert a native iterator. */ - from(value: Iterator | Iterable): BuiltinIterator; + from(value: Iterator | Iterable): IteratorObject; } var Iterator: IteratorConstructor; diff --git a/src/lib/webworker.asynciterable.generated.d.ts b/src/lib/webworker.asynciterable.generated.d.ts index cd2b63eb5d790..d446d4f089b3e 100644 --- a/src/lib/webworker.asynciterable.generated.d.ts +++ b/src/lib/webworker.asynciterable.generated.d.ts @@ -2,14 +2,22 @@ /// Worker Async Iterable APIs ///////////////////////////// +interface FileSystemDirectoryHandleAsyncIterator extends AsyncIteratorObject { + [Symbol.asyncIterator](): FileSystemDirectoryHandleAsyncIterator; +} + interface FileSystemDirectoryHandle { - [Symbol.asyncIterator](): BuiltinAsyncIterator<[string, FileSystemHandle], BuiltinIteratorReturn>; - entries(): BuiltinAsyncIterator<[string, FileSystemHandle], BuiltinIteratorReturn>; - keys(): BuiltinAsyncIterator; - values(): BuiltinAsyncIterator; + [Symbol.asyncIterator](): FileSystemDirectoryHandleAsyncIterator<[string, FileSystemHandle]>; + entries(): FileSystemDirectoryHandleAsyncIterator<[string, FileSystemHandle]>; + keys(): FileSystemDirectoryHandleAsyncIterator; + values(): FileSystemDirectoryHandleAsyncIterator; +} + +interface ReadableStreamAsyncIterator extends AsyncIteratorObject { + [Symbol.asyncIterator](): ReadableStreamAsyncIterator; } interface ReadableStream { - [Symbol.asyncIterator](options?: ReadableStreamIteratorOptions): BuiltinAsyncIterator; - values(options?: ReadableStreamIteratorOptions): BuiltinAsyncIterator; + [Symbol.asyncIterator](options?: ReadableStreamIteratorOptions): ReadableStreamAsyncIterator; + values(options?: ReadableStreamIteratorOptions): ReadableStreamAsyncIterator; } diff --git a/src/lib/webworker.iterable.generated.d.ts b/src/lib/webworker.iterable.generated.d.ts index 46628a75b82e1..ad811e2b8b19f 100644 --- a/src/lib/webworker.iterable.generated.d.ts +++ b/src/lib/webworker.iterable.generated.d.ts @@ -8,24 +8,24 @@ interface AbortSignal { } interface CSSNumericArray { - [Symbol.iterator](): BuiltinIterator; - entries(): BuiltinIterator<[number, CSSNumericValue], BuiltinIteratorReturn>; - keys(): BuiltinIterator; - values(): BuiltinIterator; + [Symbol.iterator](): ArrayIterator; + entries(): ArrayIterator<[number, CSSNumericValue]>; + keys(): ArrayIterator; + values(): ArrayIterator; } interface CSSTransformValue { - [Symbol.iterator](): BuiltinIterator; - entries(): BuiltinIterator<[number, CSSTransformComponent], BuiltinIteratorReturn>; - keys(): BuiltinIterator; - values(): BuiltinIterator; + [Symbol.iterator](): ArrayIterator; + entries(): ArrayIterator<[number, CSSTransformComponent]>; + keys(): ArrayIterator; + values(): ArrayIterator; } interface CSSUnparsedValue { - [Symbol.iterator](): BuiltinIterator; - entries(): BuiltinIterator<[number, CSSUnparsedSegment], BuiltinIteratorReturn>; - keys(): BuiltinIterator; - values(): BuiltinIterator; + [Symbol.iterator](): ArrayIterator; + entries(): ArrayIterator<[number, CSSUnparsedSegment]>; + keys(): ArrayIterator; + values(): ArrayIterator; } interface Cache { @@ -44,34 +44,42 @@ interface CanvasPathDrawingStyles { } interface DOMStringList { - [Symbol.iterator](): BuiltinIterator; + [Symbol.iterator](): ArrayIterator; } interface FileList { - [Symbol.iterator](): BuiltinIterator; + [Symbol.iterator](): ArrayIterator; } interface FontFaceSet extends Set { } +interface FormDataIterator extends IteratorObject { + [Symbol.iterator](): FormDataIterator; +} + interface FormData { - [Symbol.iterator](): BuiltinIterator<[string, FormDataEntryValue], BuiltinIteratorReturn>; + [Symbol.iterator](): FormDataIterator<[string, FormDataEntryValue]>; /** Returns an array of key, value pairs for every entry in the list. */ - entries(): BuiltinIterator<[string, FormDataEntryValue], BuiltinIteratorReturn>; + entries(): FormDataIterator<[string, FormDataEntryValue]>; /** Returns a list of keys in the list. */ - keys(): BuiltinIterator; + keys(): FormDataIterator; /** Returns a list of values in the list. */ - values(): BuiltinIterator; + values(): FormDataIterator; +} + +interface HeadersIterator extends IteratorObject { + [Symbol.iterator](): HeadersIterator; } interface Headers { - [Symbol.iterator](): BuiltinIterator<[string, string], BuiltinIteratorReturn>; + [Symbol.iterator](): HeadersIterator<[string, string]>; /** Returns an iterator allowing to go through all key/value pairs contained in this object. */ - entries(): BuiltinIterator<[string, string], BuiltinIteratorReturn>; + entries(): HeadersIterator<[string, string]>; /** Returns an iterator allowing to go through all keys of the key/value pairs contained in this object. */ - keys(): BuiltinIterator; + keys(): HeadersIterator; /** Returns an iterator allowing to go through all values of the key/value pairs contained in this object. */ - values(): BuiltinIterator; + values(): HeadersIterator; } interface IDBDatabase { @@ -99,11 +107,15 @@ interface MessageEvent { initMessageEvent(type: string, bubbles?: boolean, cancelable?: boolean, data?: any, origin?: string, lastEventId?: string, source?: MessageEventSource | null, ports?: Iterable): void; } +interface StylePropertyMapReadOnlyIterator extends IteratorObject { + [Symbol.iterator](): StylePropertyMapReadOnlyIterator; +} + interface StylePropertyMapReadOnly { - [Symbol.iterator](): BuiltinIterator<[string, Iterable], BuiltinIteratorReturn>; - entries(): BuiltinIterator<[string, Iterable], BuiltinIteratorReturn>; - keys(): BuiltinIterator; - values(): BuiltinIterator, BuiltinIteratorReturn>; + [Symbol.iterator](): StylePropertyMapReadOnlyIterator<[string, Iterable]>; + entries(): StylePropertyMapReadOnlyIterator<[string, Iterable]>; + keys(): StylePropertyMapReadOnlyIterator; + values(): StylePropertyMapReadOnlyIterator>; } interface SubtleCrypto { @@ -121,14 +133,18 @@ interface SubtleCrypto { unwrapKey(format: KeyFormat, wrappedKey: BufferSource, unwrappingKey: CryptoKey, unwrapAlgorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesGcmParams, unwrappedKeyAlgorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | AesKeyAlgorithm, extractable: boolean, keyUsages: Iterable): Promise; } +interface URLSearchParamsIterator extends IteratorObject { + [Symbol.iterator](): URLSearchParamsIterator; +} + interface URLSearchParams { - [Symbol.iterator](): BuiltinIterator<[string, string], BuiltinIteratorReturn>; + [Symbol.iterator](): URLSearchParamsIterator<[string, string]>; /** Returns an array of key, value pairs for every entry in the search params. */ - entries(): BuiltinIterator<[string, string], BuiltinIteratorReturn>; + entries(): URLSearchParamsIterator<[string, string]>; /** Returns a list of keys in the search params. */ - keys(): BuiltinIterator; + keys(): URLSearchParamsIterator; /** Returns a list of values in the search params. */ - values(): BuiltinIterator; + values(): URLSearchParamsIterator; } interface WEBGL_draw_buffers { diff --git a/tests/baselines/reference/ES5For-ofTypeCheck10.errors.txt b/tests/baselines/reference/ES5For-ofTypeCheck10.errors.txt index bc8d50891705d..5dbe9fe2b5312 100644 --- a/tests/baselines/reference/ES5For-ofTypeCheck10.errors.txt +++ b/tests/baselines/reference/ES5For-ofTypeCheck10.errors.txt @@ -1,10 +1,10 @@ ES5For-ofTypeCheck10.ts(9,6): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. -ES5For-ofTypeCheck10.ts(14,15): error TS2495: Type 'StringIterator' is not an array type or a string type. +ES5For-ofTypeCheck10.ts(14,15): error TS2495: Type 'MyStringIterator' is not an array type or a string type. ==== ES5For-ofTypeCheck10.ts (2 errors) ==== // In ES3/5, you cannot for...of over an arbitrary iterable. - class StringIterator { + class MyStringIterator { next() { return { done: true, @@ -18,6 +18,6 @@ ES5For-ofTypeCheck10.ts(14,15): error TS2495: Type 'StringIterator' is not an ar } } - for (var v of new StringIterator) { } - ~~~~~~~~~~~~~~~~~~ -!!! error TS2495: Type 'StringIterator' is not an array type or a string type. \ No newline at end of file + for (var v of new MyStringIterator) { } + ~~~~~~~~~~~~~~~~~~~~ +!!! error TS2495: Type 'MyStringIterator' is not an array type or a string type. \ No newline at end of file diff --git a/tests/baselines/reference/ES5For-ofTypeCheck10.js b/tests/baselines/reference/ES5For-ofTypeCheck10.js index efe4b27967d11..2537d78d12f63 100644 --- a/tests/baselines/reference/ES5For-ofTypeCheck10.js +++ b/tests/baselines/reference/ES5For-ofTypeCheck10.js @@ -2,7 +2,7 @@ //// [ES5For-ofTypeCheck10.ts] // In ES3/5, you cannot for...of over an arbitrary iterable. -class StringIterator { +class MyStringIterator { next() { return { done: true, @@ -14,24 +14,24 @@ class StringIterator { } } -for (var v of new StringIterator) { } +for (var v of new MyStringIterator) { } //// [ES5For-ofTypeCheck10.js] // In ES3/5, you cannot for...of over an arbitrary iterable. -var StringIterator = /** @class */ (function () { - function StringIterator() { +var MyStringIterator = /** @class */ (function () { + function MyStringIterator() { } - StringIterator.prototype.next = function () { + MyStringIterator.prototype.next = function () { return { done: true, value: "" }; }; - StringIterator.prototype[Symbol.iterator] = function () { + MyStringIterator.prototype[Symbol.iterator] = function () { return this; }; - return StringIterator; + return MyStringIterator; }()); -for (var _i = 0, _a = new StringIterator; _i < _a.length; _i++) { +for (var _i = 0, _a = new MyStringIterator; _i < _a.length; _i++) { var v = _a[_i]; } diff --git a/tests/baselines/reference/ES5For-ofTypeCheck10.symbols b/tests/baselines/reference/ES5For-ofTypeCheck10.symbols index d6764447cfbeb..f301fbbf6a7b6 100644 --- a/tests/baselines/reference/ES5For-ofTypeCheck10.symbols +++ b/tests/baselines/reference/ES5For-ofTypeCheck10.symbols @@ -2,11 +2,11 @@ === ES5For-ofTypeCheck10.ts === // In ES3/5, you cannot for...of over an arbitrary iterable. -class StringIterator { ->StringIterator : Symbol(StringIterator, Decl(ES5For-ofTypeCheck10.ts, 0, 0)) +class MyStringIterator { +>MyStringIterator : Symbol(MyStringIterator, Decl(ES5For-ofTypeCheck10.ts, 0, 0)) next() { ->next : Symbol(StringIterator.next, Decl(ES5For-ofTypeCheck10.ts, 1, 22)) +>next : Symbol(MyStringIterator.next, Decl(ES5For-ofTypeCheck10.ts, 1, 24)) return { done: true, @@ -18,14 +18,14 @@ class StringIterator { }; } [Symbol.iterator]() { ->[Symbol.iterator] : Symbol(StringIterator[Symbol.iterator], Decl(ES5For-ofTypeCheck10.ts, 7, 5)) +>[Symbol.iterator] : Symbol(MyStringIterator[Symbol.iterator], Decl(ES5For-ofTypeCheck10.ts, 7, 5)) return this; ->this : Symbol(StringIterator, Decl(ES5For-ofTypeCheck10.ts, 0, 0)) +>this : Symbol(MyStringIterator, Decl(ES5For-ofTypeCheck10.ts, 0, 0)) } } -for (var v of new StringIterator) { } +for (var v of new MyStringIterator) { } >v : Symbol(v, Decl(ES5For-ofTypeCheck10.ts, 13, 8)) ->StringIterator : Symbol(StringIterator, Decl(ES5For-ofTypeCheck10.ts, 0, 0)) +>MyStringIterator : Symbol(MyStringIterator, Decl(ES5For-ofTypeCheck10.ts, 0, 0)) diff --git a/tests/baselines/reference/ES5For-ofTypeCheck10.types b/tests/baselines/reference/ES5For-ofTypeCheck10.types index 65d626c82eec8..5cb80fe9f9782 100644 --- a/tests/baselines/reference/ES5For-ofTypeCheck10.types +++ b/tests/baselines/reference/ES5For-ofTypeCheck10.types @@ -2,9 +2,9 @@ === ES5For-ofTypeCheck10.ts === // In ES3/5, you cannot for...of over an arbitrary iterable. -class StringIterator { ->StringIterator : StringIterator -> : ^^^^^^^^^^^^^^ +class MyStringIterator { +>MyStringIterator : MyStringIterator +> : ^^^^^^^^^^^^^^^^ next() { >next : () => { done: boolean; value: string; } @@ -44,11 +44,11 @@ class StringIterator { } } -for (var v of new StringIterator) { } +for (var v of new MyStringIterator) { } >v : any > : ^^^ ->new StringIterator : StringIterator -> : ^^^^^^^^^^^^^^ ->StringIterator : typeof StringIterator -> : ^^^^^^^^^^^^^^^^^^^^^ +>new MyStringIterator : MyStringIterator +> : ^^^^^^^^^^^^^^^^ +>MyStringIterator : typeof MyStringIterator +> : ^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/baselines/reference/YieldStarExpression4_es6.types b/tests/baselines/reference/YieldStarExpression4_es6.types index c2c8b54fde262..186939d83832f 100644 --- a/tests/baselines/reference/YieldStarExpression4_es6.types +++ b/tests/baselines/reference/YieldStarExpression4_es6.types @@ -2,8 +2,8 @@ === YieldStarExpression4_es6.ts === function *g() { ->g : () => Generator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>g : () => Generator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ yield * []; >yield * [] : any diff --git a/tests/baselines/reference/argumentsObjectIterator02_ES6.types b/tests/baselines/reference/argumentsObjectIterator02_ES6.types index c192ab9617b08..f77b4259cf9cd 100644 --- a/tests/baselines/reference/argumentsObjectIterator02_ES6.types +++ b/tests/baselines/reference/argumentsObjectIterator02_ES6.types @@ -12,10 +12,10 @@ function doubleAndReturnAsArray(x: number, y: number, z: number): [number, numbe > : ^^^^^^ let blah = arguments[Symbol.iterator]; ->blah : () => BuiltinIterator -> : ^^^^^^ ->arguments[Symbol.iterator] : () => BuiltinIterator -> : ^^^^^^ +>blah : () => ArrayIterator +> : ^^^^^^ +>arguments[Symbol.iterator] : () => ArrayIterator +> : ^^^^^^ >arguments : IArguments > : ^^^^^^^^^^ >Symbol.iterator : unique symbol @@ -33,10 +33,10 @@ function doubleAndReturnAsArray(x: number, y: number, z: number): [number, numbe for (let arg of blah()) { >arg : any ->blah() : BuiltinIterator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->blah : () => BuiltinIterator -> : ^^^^^^ +>blah() : ArrayIterator +> : ^^^^^^^^^^^^^^^^^^ +>blah : () => ArrayIterator +> : ^^^^^^ result.push(arg + arg); >result.push(arg + arg) : number diff --git a/tests/baselines/reference/arrayFrom.types b/tests/baselines/reference/arrayFrom.types index 8829708cedd67..4350bcd3047e3 100644 --- a/tests/baselines/reference/arrayFrom.types +++ b/tests/baselines/reference/arrayFrom.types @@ -83,14 +83,14 @@ const result2: A[] = Array.from(inputA.values()); > : ^^^^^^^^^^^^^^^^ >from : { (arrayLike: ArrayLike): T[]; (arrayLike: ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; (iterable: Iterable | ArrayLike): T[]; (iterable: Iterable | ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; } > : ^^^ ^^ ^^ ^^^ ^^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^^ ^^^ ^^^ ^^ ^^ ^^^ ^^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^^ ^^^ ^^^ ->inputA.values() : BuiltinIterator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->inputA.values : () => BuiltinIterator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>inputA.values() : ArrayIterator +> : ^^^^^^^^^^^^^^^^ +>inputA.values : () => ArrayIterator +> : ^^^^^^^^^^^^^^^^^^^^^^ >inputA : A[] > : ^^^ ->values : () => BuiltinIterator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>values : () => ArrayIterator +> : ^^^^^^^^^^^^^^^^^^^^^^ const result3: B[] = Array.from(inputA.values()); // expect error >result3 : B[] @@ -103,14 +103,14 @@ const result3: B[] = Array.from(inputA.values()); // expect error > : ^^^^^^^^^^^^^^^^ >from : { (arrayLike: ArrayLike): T[]; (arrayLike: ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; (iterable: Iterable | ArrayLike): T[]; (iterable: Iterable | ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; } > : ^^^ ^^ ^^ ^^^ ^^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^^ ^^^ ^^^ ^^ ^^ ^^^ ^^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^^ ^^^ ^^^ ->inputA.values() : BuiltinIterator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->inputA.values : () => BuiltinIterator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>inputA.values() : ArrayIterator +> : ^^^^^^^^^^^^^^^^ +>inputA.values : () => ArrayIterator +> : ^^^^^^^^^^^^^^^^^^^^^^ >inputA : A[] > : ^^^ ->values : () => BuiltinIterator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>values : () => ArrayIterator +> : ^^^^^^^^^^^^^^^^^^^^^^ const result4: A[] = Array.from(inputB, ({ b }): A => ({ a: b })); >result4 : A[] diff --git a/tests/baselines/reference/builtinIterator.errors.txt b/tests/baselines/reference/builtinIterator.errors.txt index 26749ea24a683..c4fc043ee366e 100644 --- a/tests/baselines/reference/builtinIterator.errors.txt +++ b/tests/baselines/reference/builtinIterator.errors.txt @@ -1,19 +1,19 @@ builtinIterator.ts(38,1): error TS2511: Cannot create an instance of an abstract class. -builtinIterator.ts(40,7): error TS2515: Non-abstract class 'C' does not implement inherited abstract member next from class 'Iterator'. -builtinIterator.ts(44,3): error TS2416: Property 'next' in type 'BadIterator1' is not assignable to the same property in base type 'Iterator'. +builtinIterator.ts(40,7): error TS2515: Non-abstract class 'C' does not implement inherited abstract member next from class 'Iterator'. +builtinIterator.ts(44,3): error TS2416: Property 'next' in type 'BadIterator1' is not assignable to the same property in base type 'Iterator'. Type '() => { readonly done: false; readonly value: 0; } | { readonly done: true; readonly value: "a string"; }' is not assignable to type '(value?: unknown) => IteratorResult'. Type '{ readonly done: false; readonly value: 0; } | { readonly done: true; readonly value: "a string"; }' is not assignable to type 'IteratorResult'. Type '{ readonly done: true; readonly value: "a string"; }' is not assignable to type 'IteratorResult'. Type '{ readonly done: true; readonly value: "a string"; }' is not assignable to type 'IteratorReturnResult'. Types of property 'value' are incompatible. Type '"a string"' is not assignable to type 'undefined'. -builtinIterator.ts(54,3): error TS2416: Property 'next' in type 'BadIterator2' is not assignable to the same property in base type 'Iterator'. +builtinIterator.ts(54,3): error TS2416: Property 'next' in type 'BadIterator2' is not assignable to the same property in base type 'Iterator'. Type '() => { done: boolean; value: number; }' is not assignable to type '(value?: unknown) => IteratorResult'. Type '{ done: boolean; value: number; }' is not assignable to type 'IteratorResult'. Type '{ done: boolean; value: number; }' is not assignable to type 'IteratorYieldResult'. Types of property 'done' are incompatible. Type 'boolean' is not assignable to type 'false'. -builtinIterator.ts(60,3): error TS2416: Property 'next' in type 'BadIterator3' is not assignable to the same property in base type 'Iterator'. +builtinIterator.ts(60,3): error TS2416: Property 'next' in type 'BadIterator3' is not assignable to the same property in base type 'Iterator'. Type '() => { done: boolean; value: number; } | { done: boolean; value: string; }' is not assignable to type '(value?: unknown) => IteratorResult'. Type '{ done: boolean; value: number; } | { done: boolean; value: string; }' is not assignable to type 'IteratorResult'. Type '{ done: boolean; value: number; }' is not assignable to type 'IteratorResult'. @@ -84,13 +84,13 @@ builtinIterator.ts(73,35): error TS2322: Type 'Generator {} ~ -!!! error TS2515: Non-abstract class 'C' does not implement inherited abstract member next from class 'Iterator'. +!!! error TS2515: Non-abstract class 'C' does not implement inherited abstract member next from class 'Iterator'. // it's unfortunate that these are an error class BadIterator1 extends Iterator { next() { ~~~~ -!!! error TS2416: Property 'next' in type 'BadIterator1' is not assignable to the same property in base type 'Iterator'. +!!! error TS2416: Property 'next' in type 'BadIterator1' is not assignable to the same property in base type 'Iterator'. !!! error TS2416: Type '() => { readonly done: false; readonly value: 0; } | { readonly done: true; readonly value: "a string"; }' is not assignable to type '(value?: unknown) => IteratorResult'. !!! error TS2416: Type '{ readonly done: false; readonly value: 0; } | { readonly done: true; readonly value: "a string"; }' is not assignable to type 'IteratorResult'. !!! error TS2416: Type '{ readonly done: true; readonly value: "a string"; }' is not assignable to type 'IteratorResult'. @@ -108,7 +108,7 @@ builtinIterator.ts(73,35): error TS2322: Type 'Generator { next() { ~~~~ -!!! error TS2416: Property 'next' in type 'BadIterator2' is not assignable to the same property in base type 'Iterator'. +!!! error TS2416: Property 'next' in type 'BadIterator2' is not assignable to the same property in base type 'Iterator'. !!! error TS2416: Type '() => { done: boolean; value: number; }' is not assignable to type '(value?: unknown) => IteratorResult'. !!! error TS2416: Type '{ done: boolean; value: number; }' is not assignable to type 'IteratorResult'. !!! error TS2416: Type '{ done: boolean; value: number; }' is not assignable to type 'IteratorYieldResult'. @@ -121,7 +121,7 @@ builtinIterator.ts(73,35): error TS2322: Type 'Generator { next() { ~~~~ -!!! error TS2416: Property 'next' in type 'BadIterator3' is not assignable to the same property in base type 'Iterator'. +!!! error TS2416: Property 'next' in type 'BadIterator3' is not assignable to the same property in base type 'Iterator'. !!! error TS2416: Type '() => { done: boolean; value: number; } | { done: boolean; value: string; }' is not assignable to type '(value?: unknown) => IteratorResult'. !!! error TS2416: Type '{ done: boolean; value: number; } | { done: boolean; value: string; }' is not assignable to type 'IteratorResult'. !!! error TS2416: Type '{ done: boolean; value: number; }' is not assignable to type 'IteratorResult'. @@ -149,7 +149,7 @@ builtinIterator.ts(73,35): error TS2322: Type 'Generator; + declare const iter2: IteratorObject; const iter3 = iter2.flatMap(() => g1); ~~ !!! error TS2322: Type 'Generator' is not assignable to type 'Iterator | Iterable'. diff --git a/tests/baselines/reference/builtinIterator.js b/tests/baselines/reference/builtinIterator.js index 192d53b106b25..a22b5baa673ec 100644 --- a/tests/baselines/reference/builtinIterator.js +++ b/tests/baselines/reference/builtinIterator.js @@ -72,7 +72,7 @@ class BadIterator3 extends Iterator { declare const g1: Generator; const iter1 = Iterator.from(g1); -declare const iter2: BuiltinIterator; +declare const iter2: IteratorObject; const iter3 = iter2.flatMap(() => g1); //// [builtinIterator.js] diff --git a/tests/baselines/reference/builtinIterator.symbols b/tests/baselines/reference/builtinIterator.symbols index 4c8795a5a1dfe..00c37ef1982b3 100644 --- a/tests/baselines/reference/builtinIterator.symbols +++ b/tests/baselines/reference/builtinIterator.symbols @@ -9,16 +9,16 @@ const iterator = Iterator.from([0, 1, 2]); const mapped = iterator.map(String); >mapped : Symbol(mapped, Decl(builtinIterator.ts, 2, 5)) ->iterator.map : Symbol(BuiltinIterator.map, Decl(lib.esnext.iterator.d.ts, --, --)) +>iterator.map : Symbol(IteratorObject.map, Decl(lib.esnext.iterator.d.ts, --, --)) >iterator : Symbol(iterator, Decl(builtinIterator.ts, 0, 5)) ->map : Symbol(BuiltinIterator.map, Decl(lib.esnext.iterator.d.ts, --, --)) +>map : Symbol(IteratorObject.map, Decl(lib.esnext.iterator.d.ts, --, --)) >String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --) ... and 7 more) const filtered = iterator.filter(x => x > 0); >filtered : Symbol(filtered, Decl(builtinIterator.ts, 4, 5)) ->iterator.filter : Symbol(BuiltinIterator.filter, Decl(lib.esnext.iterator.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --)) +>iterator.filter : Symbol(IteratorObject.filter, Decl(lib.esnext.iterator.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --)) >iterator : Symbol(iterator, Decl(builtinIterator.ts, 0, 5)) ->filter : Symbol(BuiltinIterator.filter, Decl(lib.esnext.iterator.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --)) +>filter : Symbol(IteratorObject.filter, Decl(lib.esnext.iterator.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --)) >x : Symbol(x, Decl(builtinIterator.ts, 4, 33)) >x : Symbol(x, Decl(builtinIterator.ts, 4, 33)) @@ -32,9 +32,9 @@ function isZero(x: number): x is 0 { } const zero = iterator.filter(isZero); >zero : Symbol(zero, Decl(builtinIterator.ts, 9, 5)) ->iterator.filter : Symbol(BuiltinIterator.filter, Decl(lib.esnext.iterator.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --)) +>iterator.filter : Symbol(IteratorObject.filter, Decl(lib.esnext.iterator.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --)) >iterator : Symbol(iterator, Decl(builtinIterator.ts, 0, 5)) ->filter : Symbol(BuiltinIterator.filter, Decl(lib.esnext.iterator.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --)) +>filter : Symbol(IteratorObject.filter, Decl(lib.esnext.iterator.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --)) >isZero : Symbol(isZero, Decl(builtinIterator.ts, 4, 45)) const iteratorFromBare = Iterator.from({ @@ -69,18 +69,18 @@ function* gen() { const mappedGen = gen().map(x => x === 0 ? "zero" : "other"); >mappedGen : Symbol(mappedGen, Decl(builtinIterator.ts, 25, 5)) ->gen().map : Symbol(BuiltinIterator.map, Decl(lib.esnext.iterator.d.ts, --, --)) +>gen().map : Symbol(IteratorObject.map, Decl(lib.esnext.iterator.d.ts, --, --)) >gen : Symbol(gen, Decl(builtinIterator.ts, 18, 3)) ->map : Symbol(BuiltinIterator.map, Decl(lib.esnext.iterator.d.ts, --, --)) +>map : Symbol(IteratorObject.map, Decl(lib.esnext.iterator.d.ts, --, --)) >x : Symbol(x, Decl(builtinIterator.ts, 25, 28)) >x : Symbol(x, Decl(builtinIterator.ts, 25, 28)) const mappedValues = [0, 1, 2].values().map(x => x === 0 ? "zero" : "other"); >mappedValues : Symbol(mappedValues, Decl(builtinIterator.ts, 27, 5)) ->[0, 1, 2].values().map : Symbol(BuiltinIterator.map, Decl(lib.esnext.iterator.d.ts, --, --)) +>[0, 1, 2].values().map : Symbol(IteratorObject.map, Decl(lib.esnext.iterator.d.ts, --, --)) >[0, 1, 2].values : Symbol(Array.values, Decl(lib.es2015.iterable.d.ts, --, --)) >values : Symbol(Array.values, Decl(lib.es2015.iterable.d.ts, --, --)) ->map : Symbol(BuiltinIterator.map, Decl(lib.esnext.iterator.d.ts, --, --)) +>map : Symbol(IteratorObject.map, Decl(lib.esnext.iterator.d.ts, --, --)) >x : Symbol(x, Decl(builtinIterator.ts, 27, 44)) >x : Symbol(x, Decl(builtinIterator.ts, 27, 44)) @@ -182,15 +182,14 @@ const iter1 = Iterator.from(g1); >from : Symbol(IteratorConstructor.from, Decl(lib.esnext.iterator.d.ts, --, --)) >g1 : Symbol(g1, Decl(builtinIterator.ts, 68, 13)) -declare const iter2: BuiltinIterator; +declare const iter2: IteratorObject; >iter2 : Symbol(iter2, Decl(builtinIterator.ts, 71, 13)) ->BuiltinIterator : Symbol(BuiltinIterator, Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --)) ->BuiltinIteratorReturn : Symbol(BuiltinIteratorReturn, Decl(lib.es2015.iterable.d.ts, --, --)) +>IteratorObject : Symbol(IteratorObject, Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --)) const iter3 = iter2.flatMap(() => g1); >iter3 : Symbol(iter3, Decl(builtinIterator.ts, 72, 5)) ->iter2.flatMap : Symbol(BuiltinIterator.flatMap, Decl(lib.esnext.iterator.d.ts, --, --)) +>iter2.flatMap : Symbol(IteratorObject.flatMap, Decl(lib.esnext.iterator.d.ts, --, --)) >iter2 : Symbol(iter2, Decl(builtinIterator.ts, 71, 13)) ->flatMap : Symbol(BuiltinIterator.flatMap, Decl(lib.esnext.iterator.d.ts, --, --)) +>flatMap : Symbol(IteratorObject.flatMap, Decl(lib.esnext.iterator.d.ts, --, --)) >g1 : Symbol(g1, Decl(builtinIterator.ts, 68, 13)) diff --git a/tests/baselines/reference/builtinIterator.types b/tests/baselines/reference/builtinIterator.types index 7ee1560178e54..75d934cddae8c 100644 --- a/tests/baselines/reference/builtinIterator.types +++ b/tests/baselines/reference/builtinIterator.types @@ -2,16 +2,16 @@ === builtinIterator.ts === const iterator = Iterator.from([0, 1, 2]); ->iterator : BuiltinIterator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->Iterator.from([0, 1, 2]) : BuiltinIterator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->Iterator.from : (value: Iterator | Iterable) => BuiltinIterator -> : ^ ^^ ^^ ^^^^^ +>iterator : IteratorObject +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>Iterator.from([0, 1, 2]) : IteratorObject +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>Iterator.from : (value: Iterator | Iterable) => IteratorObject +> : ^ ^^ ^^ ^^^^^ >Iterator : IteratorConstructor > : ^^^^^^^^^^^^^^^^^^^ ->from : (value: Iterator | Iterable) => BuiltinIterator -> : ^ ^^ ^^ ^^^^^ +>from : (value: Iterator | Iterable) => IteratorObject +> : ^ ^^ ^^ ^^^^^ >[0, 1, 2] : number[] > : ^^^^^^^^ >0 : 0 @@ -22,30 +22,30 @@ const iterator = Iterator.from([0, 1, 2]); > : ^ const mapped = iterator.map(String); ->mapped : BuiltinIterator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->iterator.map(String) : BuiltinIterator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->iterator.map : (callbackfn: (value: number, index: number) => U) => BuiltinIterator -> : ^ ^^ ^^^ ^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->iterator : BuiltinIterator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->map : (callbackfn: (value: number, index: number) => U) => BuiltinIterator -> : ^ ^^ ^^^ ^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>mapped : IteratorObject +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>iterator.map(String) : IteratorObject +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>iterator.map : (callbackfn: (value: number, index: number) => U) => IteratorObject +> : ^ ^^ ^^^ ^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>iterator : IteratorObject +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>map : (callbackfn: (value: number, index: number) => U) => IteratorObject +> : ^ ^^ ^^^ ^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >String : StringConstructor > : ^^^^^^^^^^^^^^^^^ const filtered = iterator.filter(x => x > 0); ->filtered : BuiltinIterator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->iterator.filter(x => x > 0) : BuiltinIterator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->iterator.filter : { (predicate: (value: number, index: number) => value is S): BuiltinIterator; (predicate: (value: number, index: number) => unknown): BuiltinIterator; } -> : ^^^ ^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->iterator : BuiltinIterator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->filter : { (predicate: (value: number, index: number) => value is S): BuiltinIterator; (predicate: (value: number, index: number) => unknown): BuiltinIterator; } -> : ^^^ ^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>filtered : IteratorObject +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>iterator.filter(x => x > 0) : IteratorObject +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>iterator.filter : { (predicate: (value: number, index: number) => value is S): IteratorObject; (predicate: (value: number, index: number) => unknown): IteratorObject; } +> : ^^^ ^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>iterator : IteratorObject +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>filter : { (predicate: (value: number, index: number) => value is S): IteratorObject; (predicate: (value: number, index: number) => unknown): IteratorObject; } +> : ^^^ ^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >x => x > 0 : (x: number) => boolean > : ^ ^^^^^^^^^^^^^^^^^^^^ >x : number @@ -72,30 +72,30 @@ function isZero(x: number): x is 0 { > : ^ } const zero = iterator.filter(isZero); ->zero : BuiltinIterator<0, undefined, any> -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->iterator.filter(isZero) : BuiltinIterator<0, undefined, any> -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->iterator.filter : { (predicate: (value: number, index: number) => value is S): BuiltinIterator; (predicate: (value: number, index: number) => unknown): BuiltinIterator; } -> : ^^^ ^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->iterator : BuiltinIterator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->filter : { (predicate: (value: number, index: number) => value is S): BuiltinIterator; (predicate: (value: number, index: number) => unknown): BuiltinIterator; } -> : ^^^ ^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>zero : IteratorObject<0, undefined, unknown> +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>iterator.filter(isZero) : IteratorObject<0, undefined, unknown> +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>iterator.filter : { (predicate: (value: number, index: number) => value is S): IteratorObject; (predicate: (value: number, index: number) => unknown): IteratorObject; } +> : ^^^ ^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>iterator : IteratorObject +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>filter : { (predicate: (value: number, index: number) => value is S): IteratorObject; (predicate: (value: number, index: number) => unknown): IteratorObject; } +> : ^^^ ^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >isZero : (x: number) => x is 0 > : ^ ^^ ^^^^^ const iteratorFromBare = Iterator.from({ ->iteratorFromBare : BuiltinIterator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->Iterator.from({ next() { return { done: Math.random() < .5, value: "a string", }; },}) : BuiltinIterator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->Iterator.from : (value: Iterator | Iterable) => BuiltinIterator -> : ^ ^^ ^^ ^^^^^ +>iteratorFromBare : IteratorObject +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>Iterator.from({ next() { return { done: Math.random() < .5, value: "a string", }; },}) : IteratorObject +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>Iterator.from : (value: Iterator | Iterable) => IteratorObject +> : ^ ^^ ^^ ^^^^^ >Iterator : IteratorConstructor > : ^^^^^^^^^^^^^^^^^^^ ->from : (value: Iterator | Iterable) => BuiltinIterator -> : ^ ^^ ^^ ^^^^^ +>from : (value: Iterator | Iterable) => IteratorObject +> : ^ ^^ ^^ ^^^^^ >{ next() { return { done: Math.random() < .5, value: "a string", }; },} : { next(): { done: boolean; value: string; }; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -146,18 +146,18 @@ function* gen() { } const mappedGen = gen().map(x => x === 0 ? "zero" : "other"); ->mappedGen : BuiltinIterator<"zero" | "other", undefined, any> -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->gen().map(x => x === 0 ? "zero" : "other") : BuiltinIterator<"zero" | "other", undefined, any> -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->gen().map : (callbackfn: (value: number, index: number) => U) => BuiltinIterator -> : ^ ^^ ^^^ ^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>mappedGen : IteratorObject<"zero" | "other", undefined, unknown> +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>gen().map(x => x === 0 ? "zero" : "other") : IteratorObject<"zero" | "other", undefined, unknown> +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>gen().map : (callbackfn: (value: number, index: number) => U) => IteratorObject +> : ^ ^^ ^^^ ^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >gen() : Generator > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >gen : () => Generator > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->map : (callbackfn: (value: number, index: number) => U) => BuiltinIterator -> : ^ ^^ ^^^ ^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>map : (callbackfn: (value: number, index: number) => U) => IteratorObject +> : ^ ^^ ^^^ ^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >x => x === 0 ? "zero" : "other" : (x: number) => "zero" | "other" > : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >x : number @@ -176,16 +176,16 @@ const mappedGen = gen().map(x => x === 0 ? "zero" : "other"); > : ^^^^^^^ const mappedValues = [0, 1, 2].values().map(x => x === 0 ? "zero" : "other"); ->mappedValues : BuiltinIterator<"zero" | "other", undefined, any> -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->[0, 1, 2].values().map(x => x === 0 ? "zero" : "other") : BuiltinIterator<"zero" | "other", undefined, any> -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->[0, 1, 2].values().map : (callbackfn: (value: number, index: number) => U) => BuiltinIterator -> : ^ ^^ ^^^ ^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->[0, 1, 2].values() : BuiltinIterator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->[0, 1, 2].values : () => BuiltinIterator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>mappedValues : IteratorObject<"zero" | "other", undefined, unknown> +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>[0, 1, 2].values().map(x => x === 0 ? "zero" : "other") : IteratorObject<"zero" | "other", undefined, unknown> +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>[0, 1, 2].values().map : (callbackfn: (value: number, index: number) => U) => IteratorObject +> : ^ ^^ ^^^ ^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>[0, 1, 2].values() : ArrayIterator +> : ^^^^^^^^^^^^^^^^^^^^^ +>[0, 1, 2].values : () => ArrayIterator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ >[0, 1, 2] : number[] > : ^^^^^^^^ >0 : 0 @@ -194,10 +194,10 @@ const mappedValues = [0, 1, 2].values().map(x => x === 0 ? "zero" : "other"); > : ^ >2 : 2 > : ^ ->values : () => BuiltinIterator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->map : (callbackfn: (value: number, index: number) => U) => BuiltinIterator -> : ^ ^^ ^^^ ^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>values : () => ArrayIterator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>map : (callbackfn: (value: number, index: number) => U) => IteratorObject +> : ^ ^^ ^^^ ^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >x => x === 0 ? "zero" : "other" : (x: number) => "zero" | "other" > : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >x : number @@ -219,8 +219,8 @@ const mappedValues = [0, 1, 2].values().map(x => x === 0 ? "zero" : "other"); class GoodIterator extends Iterator { >GoodIterator : GoodIterator > : ^^^^^^^^^^^^ ->Iterator : Iterator -> : ^^^^^^^^^^^^^^^^ +>Iterator : Iterator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ next() { >next : () => { readonly done: false; readonly value: 0; } @@ -252,15 +252,15 @@ new Iterator(); class C extends Iterator {} >C : C > : ^ ->Iterator : Iterator -> : ^^^^^^^^^^^^^^^^ +>Iterator : Iterator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // it's unfortunate that these are an error class BadIterator1 extends Iterator { >BadIterator1 : BadIterator1 > : ^^^^^^^^^^^^ ->Iterator : Iterator -> : ^^^^^^^^^^^^^^^^ +>Iterator : Iterator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ next() { >next : () => { readonly done: false; readonly value: 0; } | { readonly done: true; readonly value: "a string"; } @@ -315,8 +315,8 @@ class BadIterator1 extends Iterator { class BadIterator2 extends Iterator { >BadIterator2 : BadIterator2 > : ^^^^^^^^^^^^ ->Iterator : Iterator -> : ^^^^^^^^^^^^^^^^ +>Iterator : Iterator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ next() { >next : () => { done: boolean; value: number; } @@ -339,8 +339,8 @@ class BadIterator2 extends Iterator { class BadIterator3 extends Iterator { >BadIterator3 : BadIterator3 > : ^^^^^^^^^^^^ ->Iterator : Iterator -> : ^^^^^^^^^^^^^^^^ +>Iterator : Iterator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ next() { >next : () => { done: boolean; value: number; } | { done: boolean; value: string; } @@ -393,34 +393,34 @@ declare const g1: Generator; > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ const iter1 = Iterator.from(g1); ->iter1 : BuiltinIterator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->Iterator.from(g1) : BuiltinIterator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->Iterator.from : (value: Iterator | Iterable) => BuiltinIterator -> : ^ ^^ ^^ ^^^^^ +>iter1 : IteratorObject +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>Iterator.from(g1) : IteratorObject +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>Iterator.from : (value: Iterator | Iterable) => IteratorObject +> : ^ ^^ ^^ ^^^^^ >Iterator : IteratorConstructor > : ^^^^^^^^^^^^^^^^^^^ ->from : (value: Iterator | Iterable) => BuiltinIterator -> : ^ ^^ ^^ ^^^^^ +>from : (value: Iterator | Iterable) => IteratorObject +> : ^ ^^ ^^ ^^^^^ >g1 : Generator > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -declare const iter2: BuiltinIterator; ->iter2 : BuiltinIterator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +declare const iter2: IteratorObject; +>iter2 : IteratorObject +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ const iter3 = iter2.flatMap(() => g1); ->iter3 : BuiltinIterator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->iter2.flatMap(() => g1) : BuiltinIterator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->iter2.flatMap : (callback: (value: string, index: number) => Iterator | Iterable) => BuiltinIterator -> : ^ ^^ ^^^ ^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->iter2 : BuiltinIterator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->flatMap : (callback: (value: string, index: number) => Iterator | Iterable) => BuiltinIterator -> : ^ ^^ ^^^ ^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>iter3 : IteratorObject +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>iter2.flatMap(() => g1) : IteratorObject +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>iter2.flatMap : (callback: (value: string, index: number) => Iterator | Iterable) => IteratorObject +> : ^ ^^ ^^^ ^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>iter2 : IteratorObject +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>flatMap : (callback: (value: string, index: number) => Iterator | Iterable) => IteratorObject +> : ^ ^^ ^^^ ^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >() => g1 : () => Generator > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >g1 : Generator diff --git a/tests/baselines/reference/builtinIteratorReturn(strictbuiltiniteratorreturn=false).types b/tests/baselines/reference/builtinIteratorReturn(strictbuiltiniteratorreturn=false).types index 3ed7928926650..8c2630930a4cc 100644 --- a/tests/baselines/reference/builtinIteratorReturn(strictbuiltiniteratorreturn=false).types +++ b/tests/baselines/reference/builtinIteratorReturn(strictbuiltiniteratorreturn=false).types @@ -14,12 +14,12 @@ declare const set: Set; > : ^^^^^^^^^^^ const i0 = array[Symbol.iterator](); ->i0 : BuiltinIterator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->array[Symbol.iterator]() : BuiltinIterator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->array[Symbol.iterator] : () => BuiltinIterator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>i0 : ArrayIterator +> : ^^^^^^^^^^^^^^^^^^^^^ +>array[Symbol.iterator]() : ArrayIterator +> : ^^^^^^^^^^^^^^^^^^^^^ +>array[Symbol.iterator] : () => ArrayIterator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ >array : number[] > : ^^^^^^^^ >Symbol.iterator : unique symbol @@ -30,40 +30,40 @@ const i0 = array[Symbol.iterator](); > : ^^^^^^^^^^^^^ const i1 = array.values(); ->i1 : BuiltinIterator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->array.values() : BuiltinIterator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->array.values : () => BuiltinIterator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>i1 : ArrayIterator +> : ^^^^^^^^^^^^^^^^^^^^^ +>array.values() : ArrayIterator +> : ^^^^^^^^^^^^^^^^^^^^^ +>array.values : () => ArrayIterator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ >array : number[] > : ^^^^^^^^ ->values : () => BuiltinIterator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>values : () => ArrayIterator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ const i2 = array.keys(); ->i2 : BuiltinIterator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->array.keys() : BuiltinIterator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->array.keys : () => BuiltinIterator -> : ^^^^^^ +>i2 : ArrayIterator +> : ^^^^^^^^^^^^^^^^^^^^^ +>array.keys() : ArrayIterator +> : ^^^^^^^^^^^^^^^^^^^^^ +>array.keys : () => ArrayIterator +> : ^^^^^^ >array : number[] > : ^^^^^^^^ ->keys : () => BuiltinIterator -> : ^^^^^^ +>keys : () => ArrayIterator +> : ^^^^^^ const i3 = array.entries(); ->i3 : BuiltinIterator<[number, number], any, any> -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->array.entries() : BuiltinIterator<[number, number], any, any> -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->array.entries : () => BuiltinIterator<[number, number], any, any> -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>i3 : ArrayIterator<[number, number]> +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>array.entries() : ArrayIterator<[number, number]> +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>array.entries : () => ArrayIterator<[number, number]> +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >array : number[] > : ^^^^^^^^ ->entries : () => BuiltinIterator<[number, number], any, any> -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>entries : () => ArrayIterator<[number, number]> +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ for (const x of array); >x : number @@ -72,12 +72,12 @@ for (const x of array); > : ^^^^^^^^ const i4 = map[Symbol.iterator](); ->i4 : BuiltinIterator<[string, number], any, any> -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->map[Symbol.iterator]() : BuiltinIterator<[string, number], any, any> -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->map[Symbol.iterator] : () => BuiltinIterator<[string, number], any, any> -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>i4 : MapIterator<[string, number]> +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>map[Symbol.iterator]() : MapIterator<[string, number]> +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>map[Symbol.iterator] : () => MapIterator<[string, number]> +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >map : Map > : ^^^^^^^^^^^^^^^^^^^ >Symbol.iterator : unique symbol @@ -88,40 +88,40 @@ const i4 = map[Symbol.iterator](); > : ^^^^^^^^^^^^^ const i5 = map.values(); ->i5 : BuiltinIterator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->map.values() : BuiltinIterator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->map.values : () => BuiltinIterator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>i5 : MapIterator +> : ^^^^^^^^^^^^^^^^^^^ +>map.values() : MapIterator +> : ^^^^^^^^^^^^^^^^^^^ +>map.values : () => MapIterator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^ >map : Map > : ^^^^^^^^^^^^^^^^^^^ ->values : () => BuiltinIterator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>values : () => MapIterator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^ const i6 = map.keys(); ->i6 : BuiltinIterator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->map.keys() : BuiltinIterator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->map.keys : () => BuiltinIterator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>i6 : MapIterator +> : ^^^^^^^^^^^^^^^^^^^ +>map.keys() : MapIterator +> : ^^^^^^^^^^^^^^^^^^^ +>map.keys : () => MapIterator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^ >map : Map > : ^^^^^^^^^^^^^^^^^^^ ->keys : () => BuiltinIterator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>keys : () => MapIterator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^ const i7 = map.entries(); ->i7 : BuiltinIterator<[string, number], any, any> -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->map.entries() : BuiltinIterator<[string, number], any, any> -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->map.entries : () => BuiltinIterator<[string, number], any, any> -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>i7 : MapIterator<[string, number]> +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>map.entries() : MapIterator<[string, number]> +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>map.entries : () => MapIterator<[string, number]> +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >map : Map > : ^^^^^^^^^^^^^^^^^^^ ->entries : () => BuiltinIterator<[string, number], any, any> -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>entries : () => MapIterator<[string, number]> +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ for (const x of map); >x : [string, number] @@ -130,12 +130,12 @@ for (const x of map); > : ^^^^^^^^^^^^^^^^^^^ const i8 = set[Symbol.iterator](); ->i8 : BuiltinIterator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->set[Symbol.iterator]() : BuiltinIterator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->set[Symbol.iterator] : () => BuiltinIterator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>i8 : SetIterator +> : ^^^^^^^^^^^^^^^^^^^ +>set[Symbol.iterator]() : SetIterator +> : ^^^^^^^^^^^^^^^^^^^ +>set[Symbol.iterator] : () => SetIterator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^ >set : Set > : ^^^^^^^^^^^ >Symbol.iterator : unique symbol @@ -146,40 +146,40 @@ const i8 = set[Symbol.iterator](); > : ^^^^^^^^^^^^^ const i9 = set.values(); ->i9 : BuiltinIterator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->set.values() : BuiltinIterator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->set.values : () => BuiltinIterator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>i9 : SetIterator +> : ^^^^^^^^^^^^^^^^^^^ +>set.values() : SetIterator +> : ^^^^^^^^^^^^^^^^^^^ +>set.values : () => SetIterator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^ >set : Set > : ^^^^^^^^^^^ ->values : () => BuiltinIterator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>values : () => SetIterator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^ const i10 = set.keys(); ->i10 : BuiltinIterator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->set.keys() : BuiltinIterator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->set.keys : () => BuiltinIterator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>i10 : SetIterator +> : ^^^^^^^^^^^^^^^^^^^ +>set.keys() : SetIterator +> : ^^^^^^^^^^^^^^^^^^^ +>set.keys : () => SetIterator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^ >set : Set > : ^^^^^^^^^^^ ->keys : () => BuiltinIterator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>keys : () => SetIterator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^ const i11 = set.entries(); ->i11 : BuiltinIterator<[number, number], any, any> -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->set.entries() : BuiltinIterator<[number, number], any, any> -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->set.entries : () => BuiltinIterator<[number, number], any, any> -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>i11 : SetIterator<[number, number]> +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>set.entries() : SetIterator<[number, number]> +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>set.entries : () => SetIterator<[number, number]> +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >set : Set > : ^^^^^^^^^^^ ->entries : () => BuiltinIterator<[number, number], any, any> -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>entries : () => SetIterator<[number, number]> +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ for (const x of set); >x : number diff --git a/tests/baselines/reference/builtinIteratorReturn(strictbuiltiniteratorreturn=true).types b/tests/baselines/reference/builtinIteratorReturn(strictbuiltiniteratorreturn=true).types index 4a4d461d4a71f..8c2630930a4cc 100644 --- a/tests/baselines/reference/builtinIteratorReturn(strictbuiltiniteratorreturn=true).types +++ b/tests/baselines/reference/builtinIteratorReturn(strictbuiltiniteratorreturn=true).types @@ -14,12 +14,12 @@ declare const set: Set; > : ^^^^^^^^^^^ const i0 = array[Symbol.iterator](); ->i0 : BuiltinIterator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->array[Symbol.iterator]() : BuiltinIterator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->array[Symbol.iterator] : () => BuiltinIterator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>i0 : ArrayIterator +> : ^^^^^^^^^^^^^^^^^^^^^ +>array[Symbol.iterator]() : ArrayIterator +> : ^^^^^^^^^^^^^^^^^^^^^ +>array[Symbol.iterator] : () => ArrayIterator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ >array : number[] > : ^^^^^^^^ >Symbol.iterator : unique symbol @@ -30,40 +30,40 @@ const i0 = array[Symbol.iterator](); > : ^^^^^^^^^^^^^ const i1 = array.values(); ->i1 : BuiltinIterator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->array.values() : BuiltinIterator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->array.values : () => BuiltinIterator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>i1 : ArrayIterator +> : ^^^^^^^^^^^^^^^^^^^^^ +>array.values() : ArrayIterator +> : ^^^^^^^^^^^^^^^^^^^^^ +>array.values : () => ArrayIterator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ >array : number[] > : ^^^^^^^^ ->values : () => BuiltinIterator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>values : () => ArrayIterator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ const i2 = array.keys(); ->i2 : BuiltinIterator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->array.keys() : BuiltinIterator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->array.keys : () => BuiltinIterator -> : ^^^^^^ +>i2 : ArrayIterator +> : ^^^^^^^^^^^^^^^^^^^^^ +>array.keys() : ArrayIterator +> : ^^^^^^^^^^^^^^^^^^^^^ +>array.keys : () => ArrayIterator +> : ^^^^^^ >array : number[] > : ^^^^^^^^ ->keys : () => BuiltinIterator -> : ^^^^^^ +>keys : () => ArrayIterator +> : ^^^^^^ const i3 = array.entries(); ->i3 : BuiltinIterator<[number, number], undefined, any> -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->array.entries() : BuiltinIterator<[number, number], undefined, any> -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->array.entries : () => BuiltinIterator<[number, number], undefined, any> -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>i3 : ArrayIterator<[number, number]> +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>array.entries() : ArrayIterator<[number, number]> +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>array.entries : () => ArrayIterator<[number, number]> +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >array : number[] > : ^^^^^^^^ ->entries : () => BuiltinIterator<[number, number], undefined, any> -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>entries : () => ArrayIterator<[number, number]> +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ for (const x of array); >x : number @@ -72,12 +72,12 @@ for (const x of array); > : ^^^^^^^^ const i4 = map[Symbol.iterator](); ->i4 : BuiltinIterator<[string, number], undefined, any> -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->map[Symbol.iterator]() : BuiltinIterator<[string, number], undefined, any> -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->map[Symbol.iterator] : () => BuiltinIterator<[string, number], undefined, any> -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>i4 : MapIterator<[string, number]> +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>map[Symbol.iterator]() : MapIterator<[string, number]> +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>map[Symbol.iterator] : () => MapIterator<[string, number]> +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >map : Map > : ^^^^^^^^^^^^^^^^^^^ >Symbol.iterator : unique symbol @@ -88,40 +88,40 @@ const i4 = map[Symbol.iterator](); > : ^^^^^^^^^^^^^ const i5 = map.values(); ->i5 : BuiltinIterator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->map.values() : BuiltinIterator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->map.values : () => BuiltinIterator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>i5 : MapIterator +> : ^^^^^^^^^^^^^^^^^^^ +>map.values() : MapIterator +> : ^^^^^^^^^^^^^^^^^^^ +>map.values : () => MapIterator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^ >map : Map > : ^^^^^^^^^^^^^^^^^^^ ->values : () => BuiltinIterator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>values : () => MapIterator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^ const i6 = map.keys(); ->i6 : BuiltinIterator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->map.keys() : BuiltinIterator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->map.keys : () => BuiltinIterator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>i6 : MapIterator +> : ^^^^^^^^^^^^^^^^^^^ +>map.keys() : MapIterator +> : ^^^^^^^^^^^^^^^^^^^ +>map.keys : () => MapIterator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^ >map : Map > : ^^^^^^^^^^^^^^^^^^^ ->keys : () => BuiltinIterator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>keys : () => MapIterator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^ const i7 = map.entries(); ->i7 : BuiltinIterator<[string, number], undefined, any> -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->map.entries() : BuiltinIterator<[string, number], undefined, any> -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->map.entries : () => BuiltinIterator<[string, number], undefined, any> -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>i7 : MapIterator<[string, number]> +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>map.entries() : MapIterator<[string, number]> +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>map.entries : () => MapIterator<[string, number]> +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >map : Map > : ^^^^^^^^^^^^^^^^^^^ ->entries : () => BuiltinIterator<[string, number], undefined, any> -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>entries : () => MapIterator<[string, number]> +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ for (const x of map); >x : [string, number] @@ -130,12 +130,12 @@ for (const x of map); > : ^^^^^^^^^^^^^^^^^^^ const i8 = set[Symbol.iterator](); ->i8 : BuiltinIterator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->set[Symbol.iterator]() : BuiltinIterator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->set[Symbol.iterator] : () => BuiltinIterator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>i8 : SetIterator +> : ^^^^^^^^^^^^^^^^^^^ +>set[Symbol.iterator]() : SetIterator +> : ^^^^^^^^^^^^^^^^^^^ +>set[Symbol.iterator] : () => SetIterator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^ >set : Set > : ^^^^^^^^^^^ >Symbol.iterator : unique symbol @@ -146,40 +146,40 @@ const i8 = set[Symbol.iterator](); > : ^^^^^^^^^^^^^ const i9 = set.values(); ->i9 : BuiltinIterator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->set.values() : BuiltinIterator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->set.values : () => BuiltinIterator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>i9 : SetIterator +> : ^^^^^^^^^^^^^^^^^^^ +>set.values() : SetIterator +> : ^^^^^^^^^^^^^^^^^^^ +>set.values : () => SetIterator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^ >set : Set > : ^^^^^^^^^^^ ->values : () => BuiltinIterator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>values : () => SetIterator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^ const i10 = set.keys(); ->i10 : BuiltinIterator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->set.keys() : BuiltinIterator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->set.keys : () => BuiltinIterator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>i10 : SetIterator +> : ^^^^^^^^^^^^^^^^^^^ +>set.keys() : SetIterator +> : ^^^^^^^^^^^^^^^^^^^ +>set.keys : () => SetIterator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^ >set : Set > : ^^^^^^^^^^^ ->keys : () => BuiltinIterator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>keys : () => SetIterator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^ const i11 = set.entries(); ->i11 : BuiltinIterator<[number, number], undefined, any> -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->set.entries() : BuiltinIterator<[number, number], undefined, any> -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->set.entries : () => BuiltinIterator<[number, number], undefined, any> -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>i11 : SetIterator<[number, number]> +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>set.entries() : SetIterator<[number, number]> +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>set.entries : () => SetIterator<[number, number]> +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >set : Set > : ^^^^^^^^^^^ ->entries : () => BuiltinIterator<[number, number], undefined, any> -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>entries : () => SetIterator<[number, number]> +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ for (const x of set); >x : number diff --git a/tests/baselines/reference/conditionalTypeDoesntSpinForever.types b/tests/baselines/reference/conditionalTypeDoesntSpinForever.types index 9d9489fd8ddff..73fb1f2d6e19d 100644 --- a/tests/baselines/reference/conditionalTypeDoesntSpinForever.types +++ b/tests/baselines/reference/conditionalTypeDoesntSpinForever.types @@ -1,8 +1,8 @@ //// [tests/cases/compiler/conditionalTypeDoesntSpinForever.ts] //// === Performance Stats === -Type Count: 1,000 -> 2,500 -Instantiation count: 5,000 +Type Count: 1,000 +Instantiation count: 2,500 -> 5,000 === conditionalTypeDoesntSpinForever.ts === // A *self-contained* demonstration of the problem follows... diff --git a/tests/baselines/reference/destructuredLateBoundNameHasCorrectTypes.types b/tests/baselines/reference/destructuredLateBoundNameHasCorrectTypes.types index 3a69a723a7b2f..eb6edb1fac68d 100644 --- a/tests/baselines/reference/destructuredLateBoundNameHasCorrectTypes.types +++ b/tests/baselines/reference/destructuredLateBoundNameHasCorrectTypes.types @@ -8,16 +8,16 @@ let { [Symbol.iterator]: destructured } = []; > : ^^^^^^^^^^^^^^^^^ >iterator : unique symbol > : ^^^^^^^^^^^^^ ->destructured : () => BuiltinIterator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>destructured : () => ArrayIterator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >[] : undefined[] > : ^^^^^^^^^^^ void destructured; >void destructured : undefined > : ^^^^^^^^^ ->destructured : () => BuiltinIterator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>destructured : () => ArrayIterator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ const named = "prop"; >named : "prop" diff --git a/tests/baselines/reference/emitter.asyncGenerators.classMethods.es2015.types b/tests/baselines/reference/emitter.asyncGenerators.classMethods.es2015.types index dc92b10c489ff..21621981a4c79 100644 --- a/tests/baselines/reference/emitter.asyncGenerators.classMethods.es2015.types +++ b/tests/baselines/reference/emitter.asyncGenerators.classMethods.es2015.types @@ -46,8 +46,8 @@ class C4 { > : ^^ async * f() { ->f : () => AsyncGenerator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>f : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ const x = yield* [1]; >x : any diff --git a/tests/baselines/reference/emitter.asyncGenerators.classMethods.es2018.types b/tests/baselines/reference/emitter.asyncGenerators.classMethods.es2018.types index 42a23acadf4ed..01da6be08506f 100644 --- a/tests/baselines/reference/emitter.asyncGenerators.classMethods.es2018.types +++ b/tests/baselines/reference/emitter.asyncGenerators.classMethods.es2018.types @@ -46,8 +46,8 @@ class C4 { > : ^^ async * f() { ->f : () => AsyncGenerator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>f : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ const x = yield* [1]; >x : any diff --git a/tests/baselines/reference/emitter.asyncGenerators.classMethods.es5.types b/tests/baselines/reference/emitter.asyncGenerators.classMethods.es5.types index 93ea693423f50..b11c7c75fa475 100644 --- a/tests/baselines/reference/emitter.asyncGenerators.classMethods.es5.types +++ b/tests/baselines/reference/emitter.asyncGenerators.classMethods.es5.types @@ -46,8 +46,8 @@ class C4 { > : ^^ async * f() { ->f : () => AsyncGenerator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>f : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ const x = yield* [1]; >x : any diff --git a/tests/baselines/reference/emitter.asyncGenerators.functionDeclarations.es2015.types b/tests/baselines/reference/emitter.asyncGenerators.functionDeclarations.es2015.types index d3f253300a53c..d291bdc0cd056 100644 --- a/tests/baselines/reference/emitter.asyncGenerators.functionDeclarations.es2015.types +++ b/tests/baselines/reference/emitter.asyncGenerators.functionDeclarations.es2015.types @@ -27,8 +27,8 @@ async function * f3() { } === F4.ts === async function * f4() { ->f4 : () => AsyncGenerator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>f4 : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ const x = yield* [1]; >x : any diff --git a/tests/baselines/reference/emitter.asyncGenerators.functionDeclarations.es2018.types b/tests/baselines/reference/emitter.asyncGenerators.functionDeclarations.es2018.types index c9e8a861c147e..f737ba595effd 100644 --- a/tests/baselines/reference/emitter.asyncGenerators.functionDeclarations.es2018.types +++ b/tests/baselines/reference/emitter.asyncGenerators.functionDeclarations.es2018.types @@ -27,8 +27,8 @@ async function * f3() { } === F4.ts === async function * f4() { ->f4 : () => AsyncGenerator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>f4 : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ const x = yield* [1]; >x : any diff --git a/tests/baselines/reference/emitter.asyncGenerators.functionDeclarations.es5.types b/tests/baselines/reference/emitter.asyncGenerators.functionDeclarations.es5.types index e9f6d8a5c12e3..3489a92210c5e 100644 --- a/tests/baselines/reference/emitter.asyncGenerators.functionDeclarations.es5.types +++ b/tests/baselines/reference/emitter.asyncGenerators.functionDeclarations.es5.types @@ -27,8 +27,8 @@ async function * f3() { } === F4.ts === async function * f4() { ->f4 : () => AsyncGenerator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>f4 : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ const x = yield* [1]; >x : any diff --git a/tests/baselines/reference/emitter.asyncGenerators.functionExpressions.es2015.types b/tests/baselines/reference/emitter.asyncGenerators.functionExpressions.es2015.types index 385726d4ec892..b3d8d1525c942 100644 --- a/tests/baselines/reference/emitter.asyncGenerators.functionExpressions.es2015.types +++ b/tests/baselines/reference/emitter.asyncGenerators.functionExpressions.es2015.types @@ -33,10 +33,10 @@ const f3 = async function * () { } === F4.ts === const f4 = async function * () { ->f4 : () => AsyncGenerator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->async function * () { const x = yield* [1];} : () => AsyncGenerator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>f4 : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>async function * () { const x = yield* [1];} : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ const x = yield* [1]; >x : any diff --git a/tests/baselines/reference/emitter.asyncGenerators.functionExpressions.es2018.types b/tests/baselines/reference/emitter.asyncGenerators.functionExpressions.es2018.types index 074449e1ccf11..05ff8b2df1042 100644 --- a/tests/baselines/reference/emitter.asyncGenerators.functionExpressions.es2018.types +++ b/tests/baselines/reference/emitter.asyncGenerators.functionExpressions.es2018.types @@ -33,10 +33,10 @@ const f3 = async function * () { } === F4.ts === const f4 = async function * () { ->f4 : () => AsyncGenerator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->async function * () { const x = yield* [1];} : () => AsyncGenerator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>f4 : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>async function * () { const x = yield* [1];} : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ const x = yield* [1]; >x : any diff --git a/tests/baselines/reference/emitter.asyncGenerators.functionExpressions.es5.types b/tests/baselines/reference/emitter.asyncGenerators.functionExpressions.es5.types index 0e2315bd1ddc2..ff2dc953caf2b 100644 --- a/tests/baselines/reference/emitter.asyncGenerators.functionExpressions.es5.types +++ b/tests/baselines/reference/emitter.asyncGenerators.functionExpressions.es5.types @@ -33,10 +33,10 @@ const f3 = async function * () { } === F4.ts === const f4 = async function * () { ->f4 : () => AsyncGenerator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->async function * () { const x = yield* [1];} : () => AsyncGenerator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>f4 : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>async function * () { const x = yield* [1];} : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ const x = yield* [1]; >x : any diff --git a/tests/baselines/reference/emitter.asyncGenerators.objectLiteralMethods.es2015.types b/tests/baselines/reference/emitter.asyncGenerators.objectLiteralMethods.es2015.types index 58de2b68a6ca4..3aa61b810a254 100644 --- a/tests/baselines/reference/emitter.asyncGenerators.objectLiteralMethods.es2015.types +++ b/tests/baselines/reference/emitter.asyncGenerators.objectLiteralMethods.es2015.types @@ -48,14 +48,14 @@ const o3 = { } === O4.ts === const o4 = { ->o4 : { f(): AsyncGenerator; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->{ async * f() { const x = yield* [1]; }} : { f(): AsyncGenerator; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>o4 : { f(): AsyncGenerator; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>{ async * f() { const x = yield* [1]; }} : { f(): AsyncGenerator; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ async * f() { ->f : () => AsyncGenerator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>f : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ const x = yield* [1]; >x : any diff --git a/tests/baselines/reference/emitter.asyncGenerators.objectLiteralMethods.es2018.types b/tests/baselines/reference/emitter.asyncGenerators.objectLiteralMethods.es2018.types index 024281295e40d..91624582a4ecd 100644 --- a/tests/baselines/reference/emitter.asyncGenerators.objectLiteralMethods.es2018.types +++ b/tests/baselines/reference/emitter.asyncGenerators.objectLiteralMethods.es2018.types @@ -48,14 +48,14 @@ const o3 = { } === O4.ts === const o4 = { ->o4 : { f(): AsyncGenerator; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->{ async * f() { const x = yield* [1]; }} : { f(): AsyncGenerator; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>o4 : { f(): AsyncGenerator; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>{ async * f() { const x = yield* [1]; }} : { f(): AsyncGenerator; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ async * f() { ->f : () => AsyncGenerator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>f : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ const x = yield* [1]; >x : any diff --git a/tests/baselines/reference/emitter.asyncGenerators.objectLiteralMethods.es5.types b/tests/baselines/reference/emitter.asyncGenerators.objectLiteralMethods.es5.types index 6bb7ecf62404c..3ffdf9a74569a 100644 --- a/tests/baselines/reference/emitter.asyncGenerators.objectLiteralMethods.es5.types +++ b/tests/baselines/reference/emitter.asyncGenerators.objectLiteralMethods.es5.types @@ -48,14 +48,14 @@ const o3 = { } === O4.ts === const o4 = { ->o4 : { f(): AsyncGenerator; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->{ async * f() { const x = yield* [1]; }} : { f(): AsyncGenerator; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>o4 : { f(): AsyncGenerator; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>{ async * f() { const x = yield* [1]; }} : { f(): AsyncGenerator; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ async * f() { ->f : () => AsyncGenerator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>f : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ const x = yield* [1]; >x : any diff --git a/tests/baselines/reference/esNextWeakRefs_IterableWeakMap.types b/tests/baselines/reference/esNextWeakRefs_IterableWeakMap.types index a5fdfa43c94c8..b409385e2c46e 100644 --- a/tests/baselines/reference/esNextWeakRefs_IterableWeakMap.types +++ b/tests/baselines/reference/esNextWeakRefs_IterableWeakMap.types @@ -2,7 +2,7 @@ === Performance Stats === Type Count: 1,000 -Instantiation count: 1,000 -> 2,500 +Instantiation count: 2,500 === esNextWeakRefs_IterableWeakMap.ts === /** `static #cleanup` */ diff --git a/tests/baselines/reference/excessiveStackDepthFlatArray.types b/tests/baselines/reference/excessiveStackDepthFlatArray.types index 6058609386027..17365af09d86d 100644 --- a/tests/baselines/reference/excessiveStackDepthFlatArray.types +++ b/tests/baselines/reference/excessiveStackDepthFlatArray.types @@ -1,7 +1,8 @@ //// [tests/cases/compiler/excessiveStackDepthFlatArray.ts] //// === Performance Stats === -Instantiation count: 1,000 -> 2,500 +Type Count: 1,000 +Instantiation count: 2,500 === index.tsx === interface MiddlewareArray extends Array {} diff --git a/tests/baselines/reference/flatArrayNoExcessiveStackDepth.types b/tests/baselines/reference/flatArrayNoExcessiveStackDepth.types index e4ec2fa695c69..38636565617db 100644 --- a/tests/baselines/reference/flatArrayNoExcessiveStackDepth.types +++ b/tests/baselines/reference/flatArrayNoExcessiveStackDepth.types @@ -1,8 +1,8 @@ //// [tests/cases/compiler/flatArrayNoExcessiveStackDepth.ts] //// === Performance Stats === -Type Count: 1,000 -Instantiation count: 2,500 +Type Count: 2,500 +Instantiation count: 5,000 === flatArrayNoExcessiveStackDepth.ts === // Repro from #43493 diff --git a/tests/baselines/reference/for-of12.types b/tests/baselines/reference/for-of12.types index 3bab8ba58592f..0a803fbce71cd 100644 --- a/tests/baselines/reference/for-of12.types +++ b/tests/baselines/reference/for-of12.types @@ -8,16 +8,16 @@ var v: string; for (v of [0, ""].values()) { } >v : string > : ^^^^^^ ->[0, ""].values() : BuiltinIterator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->[0, ""].values : () => BuiltinIterator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>[0, ""].values() : ArrayIterator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>[0, ""].values : () => ArrayIterator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >[0, ""] : (string | number)[] > : ^^^^^^^^^^^^^^^^^^^ >0 : 0 > : ^ >"" : "" > : ^^ ->values : () => BuiltinIterator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>values : () => ArrayIterator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/baselines/reference/for-of13.types b/tests/baselines/reference/for-of13.types index 42aef034f7446..1cb2638d64f3e 100644 --- a/tests/baselines/reference/for-of13.types +++ b/tests/baselines/reference/for-of13.types @@ -8,14 +8,14 @@ var v: string; for (v of [""].values()) { } >v : string > : ^^^^^^ ->[""].values() : BuiltinIterator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->[""].values : () => BuiltinIterator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>[""].values() : ArrayIterator +> : ^^^^^^^^^^^^^^^^^^^^^ +>[""].values : () => ArrayIterator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ >[""] : string[] > : ^^^^^^^^ >"" : "" > : ^^ ->values : () => BuiltinIterator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>values : () => ArrayIterator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/baselines/reference/for-of14.errors.txt b/tests/baselines/reference/for-of14.errors.txt index d6608338f5777..4aa61b4a7666a 100644 --- a/tests/baselines/reference/for-of14.errors.txt +++ b/tests/baselines/reference/for-of14.errors.txt @@ -1,14 +1,14 @@ -for-of14.ts(8,11): error TS2488: Type 'StringIterator' must have a '[Symbol.iterator]()' method that returns an iterator. +for-of14.ts(8,11): error TS2488: Type 'MyStringIterator' must have a '[Symbol.iterator]()' method that returns an iterator. ==== for-of14.ts (1 errors) ==== - class StringIterator { + class MyStringIterator { next() { return ""; } } var v: string; - for (v of new StringIterator) { } // Should fail because the iterator is not iterable - ~~~~~~~~~~~~~~~~~~ -!!! error TS2488: Type 'StringIterator' must have a '[Symbol.iterator]()' method that returns an iterator. \ No newline at end of file + for (v of new MyStringIterator) { } // Should fail because the iterator is not iterable + ~~~~~~~~~~~~~~~~~~~~ +!!! error TS2488: Type 'MyStringIterator' must have a '[Symbol.iterator]()' method that returns an iterator. \ No newline at end of file diff --git a/tests/baselines/reference/for-of14.js b/tests/baselines/reference/for-of14.js index ee51477b12121..92d9613bfe622 100644 --- a/tests/baselines/reference/for-of14.js +++ b/tests/baselines/reference/for-of14.js @@ -1,20 +1,20 @@ //// [tests/cases/conformance/es6/for-ofStatements/for-of14.ts] //// //// [for-of14.ts] -class StringIterator { +class MyStringIterator { next() { return ""; } } var v: string; -for (v of new StringIterator) { } // Should fail because the iterator is not iterable +for (v of new MyStringIterator) { } // Should fail because the iterator is not iterable //// [for-of14.js] -class StringIterator { +class MyStringIterator { next() { return ""; } } var v; -for (v of new StringIterator) { } // Should fail because the iterator is not iterable +for (v of new MyStringIterator) { } // Should fail because the iterator is not iterable diff --git a/tests/baselines/reference/for-of14.symbols b/tests/baselines/reference/for-of14.symbols index e38832fcce1c9..23b893e125c6e 100644 --- a/tests/baselines/reference/for-of14.symbols +++ b/tests/baselines/reference/for-of14.symbols @@ -1,11 +1,11 @@ //// [tests/cases/conformance/es6/for-ofStatements/for-of14.ts] //// === for-of14.ts === -class StringIterator { ->StringIterator : Symbol(StringIterator, Decl(for-of14.ts, 0, 0)) +class MyStringIterator { +>MyStringIterator : Symbol(MyStringIterator, Decl(for-of14.ts, 0, 0)) next() { ->next : Symbol(StringIterator.next, Decl(for-of14.ts, 0, 22)) +>next : Symbol(MyStringIterator.next, Decl(for-of14.ts, 0, 24)) return ""; } @@ -14,7 +14,7 @@ class StringIterator { var v: string; >v : Symbol(v, Decl(for-of14.ts, 6, 3)) -for (v of new StringIterator) { } // Should fail because the iterator is not iterable +for (v of new MyStringIterator) { } // Should fail because the iterator is not iterable >v : Symbol(v, Decl(for-of14.ts, 6, 3)) ->StringIterator : Symbol(StringIterator, Decl(for-of14.ts, 0, 0)) +>MyStringIterator : Symbol(MyStringIterator, Decl(for-of14.ts, 0, 0)) diff --git a/tests/baselines/reference/for-of14.types b/tests/baselines/reference/for-of14.types index e72978e40db01..60fb9f7fad6cb 100644 --- a/tests/baselines/reference/for-of14.types +++ b/tests/baselines/reference/for-of14.types @@ -1,9 +1,9 @@ //// [tests/cases/conformance/es6/for-ofStatements/for-of14.ts] //// === for-of14.ts === -class StringIterator { ->StringIterator : StringIterator -> : ^^^^^^^^^^^^^^ +class MyStringIterator { +>MyStringIterator : MyStringIterator +> : ^^^^^^^^^^^^^^^^ next() { >next : () => string @@ -19,11 +19,11 @@ var v: string; >v : string > : ^^^^^^ -for (v of new StringIterator) { } // Should fail because the iterator is not iterable +for (v of new MyStringIterator) { } // Should fail because the iterator is not iterable >v : string > : ^^^^^^ ->new StringIterator : StringIterator -> : ^^^^^^^^^^^^^^ ->StringIterator : typeof StringIterator -> : ^^^^^^^^^^^^^^^^^^^^^ +>new MyStringIterator : MyStringIterator +> : ^^^^^^^^^^^^^^^^ +>MyStringIterator : typeof MyStringIterator +> : ^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/baselines/reference/for-of15.errors.txt b/tests/baselines/reference/for-of15.errors.txt index 301ee3da74bab..37ee2d77dacf9 100644 --- a/tests/baselines/reference/for-of15.errors.txt +++ b/tests/baselines/reference/for-of15.errors.txt @@ -2,7 +2,7 @@ for-of15.ts(11,11): error TS2490: The type returned by the 'next()' method of an ==== for-of15.ts (1 errors) ==== - class StringIterator { + class MyStringIterator { next() { return ""; } @@ -12,6 +12,6 @@ for-of15.ts(11,11): error TS2490: The type returned by the 'next()' method of an } var v: string; - for (v of new StringIterator) { } // Should fail - ~~~~~~~~~~~~~~~~~~ + for (v of new MyStringIterator) { } // Should fail + ~~~~~~~~~~~~~~~~~~~~ !!! error TS2490: The type returned by the 'next()' method of an iterator must have a 'value' property. \ No newline at end of file diff --git a/tests/baselines/reference/for-of15.js b/tests/baselines/reference/for-of15.js index 519b7ba792e2e..3505ed87fe29c 100644 --- a/tests/baselines/reference/for-of15.js +++ b/tests/baselines/reference/for-of15.js @@ -1,7 +1,7 @@ //// [tests/cases/conformance/es6/for-ofStatements/for-of15.ts] //// //// [for-of15.ts] -class StringIterator { +class MyStringIterator { next() { return ""; } @@ -11,10 +11,10 @@ class StringIterator { } var v: string; -for (v of new StringIterator) { } // Should fail +for (v of new MyStringIterator) { } // Should fail //// [for-of15.js] -class StringIterator { +class MyStringIterator { next() { return ""; } @@ -23,4 +23,4 @@ class StringIterator { } } var v; -for (v of new StringIterator) { } // Should fail +for (v of new MyStringIterator) { } // Should fail diff --git a/tests/baselines/reference/for-of15.symbols b/tests/baselines/reference/for-of15.symbols index 43c14cf824f56..e4bf338a0541b 100644 --- a/tests/baselines/reference/for-of15.symbols +++ b/tests/baselines/reference/for-of15.symbols @@ -1,29 +1,29 @@ //// [tests/cases/conformance/es6/for-ofStatements/for-of15.ts] //// === for-of15.ts === -class StringIterator { ->StringIterator : Symbol(StringIterator, Decl(for-of15.ts, 0, 0)) +class MyStringIterator { +>MyStringIterator : Symbol(MyStringIterator, Decl(for-of15.ts, 0, 0)) next() { ->next : Symbol(StringIterator.next, Decl(for-of15.ts, 0, 22)) +>next : Symbol(MyStringIterator.next, Decl(for-of15.ts, 0, 24)) return ""; } [Symbol.iterator]() { ->[Symbol.iterator] : Symbol(StringIterator[Symbol.iterator], Decl(for-of15.ts, 3, 5)) +>[Symbol.iterator] : Symbol(MyStringIterator[Symbol.iterator], Decl(for-of15.ts, 3, 5)) >Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.es2015.iterable.d.ts, --, --)) >Symbol : Symbol(Symbol, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) >iterator : Symbol(SymbolConstructor.iterator, Decl(lib.es2015.iterable.d.ts, --, --)) return this; ->this : Symbol(StringIterator, Decl(for-of15.ts, 0, 0)) +>this : Symbol(MyStringIterator, Decl(for-of15.ts, 0, 0)) } } var v: string; >v : Symbol(v, Decl(for-of15.ts, 9, 3)) -for (v of new StringIterator) { } // Should fail +for (v of new MyStringIterator) { } // Should fail >v : Symbol(v, Decl(for-of15.ts, 9, 3)) ->StringIterator : Symbol(StringIterator, Decl(for-of15.ts, 0, 0)) +>MyStringIterator : Symbol(MyStringIterator, Decl(for-of15.ts, 0, 0)) diff --git a/tests/baselines/reference/for-of15.types b/tests/baselines/reference/for-of15.types index 9bd1335f79dc3..3eeabe29b5dd8 100644 --- a/tests/baselines/reference/for-of15.types +++ b/tests/baselines/reference/for-of15.types @@ -1,9 +1,9 @@ //// [tests/cases/conformance/es6/for-ofStatements/for-of15.ts] //// === for-of15.ts === -class StringIterator { ->StringIterator : StringIterator -> : ^^^^^^^^^^^^^^ +class MyStringIterator { +>MyStringIterator : MyStringIterator +> : ^^^^^^^^^^^^^^^^ next() { >next : () => string @@ -33,11 +33,11 @@ var v: string; >v : string > : ^^^^^^ -for (v of new StringIterator) { } // Should fail +for (v of new MyStringIterator) { } // Should fail >v : string > : ^^^^^^ ->new StringIterator : StringIterator -> : ^^^^^^^^^^^^^^ ->StringIterator : typeof StringIterator -> : ^^^^^^^^^^^^^^^^^^^^^ +>new MyStringIterator : MyStringIterator +> : ^^^^^^^^^^^^^^^^ +>MyStringIterator : typeof MyStringIterator +> : ^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/baselines/reference/for-of16.errors.txt b/tests/baselines/reference/for-of16.errors.txt index 37b9b6d05503d..0af867a2c66ad 100644 --- a/tests/baselines/reference/for-of16.errors.txt +++ b/tests/baselines/reference/for-of16.errors.txt @@ -1,21 +1,21 @@ -for-of16.ts(8,11): error TS2488: Type 'StringIterator' must have a '[Symbol.iterator]()' method that returns an iterator. -for-of16.ts(10,11): error TS2488: Type 'StringIterator' must have a '[Symbol.iterator]()' method that returns an iterator. +for-of16.ts(8,11): error TS2488: Type 'MyStringIterator' must have a '[Symbol.iterator]()' method that returns an iterator. +for-of16.ts(10,11): error TS2488: Type 'MyStringIterator' must have a '[Symbol.iterator]()' method that returns an iterator. ==== for-of16.ts (2 errors) ==== - class StringIterator { + class MyStringIterator { [Symbol.iterator]() { return this; } } var v: string; - for (v of new StringIterator) { } // Should fail - ~~~~~~~~~~~~~~~~~~ -!!! error TS2488: Type 'StringIterator' must have a '[Symbol.iterator]()' method that returns an iterator. + for (v of new MyStringIterator) { } // Should fail + ~~~~~~~~~~~~~~~~~~~~ +!!! error TS2488: Type 'MyStringIterator' must have a '[Symbol.iterator]()' method that returns an iterator. !!! related TS2489 for-of16.ts:8:11: An iterator must have a 'next()' method. - for (v of new StringIterator) { } // Should still fail (related errors should still be shown even though type is cached). - ~~~~~~~~~~~~~~~~~~ -!!! error TS2488: Type 'StringIterator' must have a '[Symbol.iterator]()' method that returns an iterator. + for (v of new MyStringIterator) { } // Should still fail (related errors should still be shown even though type is cached). + ~~~~~~~~~~~~~~~~~~~~ +!!! error TS2488: Type 'MyStringIterator' must have a '[Symbol.iterator]()' method that returns an iterator. !!! related TS2489 for-of16.ts:10:11: An iterator must have a 'next()' method. \ No newline at end of file diff --git a/tests/baselines/reference/for-of16.js b/tests/baselines/reference/for-of16.js index 64c7588b72e0a..cf7699af90a5b 100644 --- a/tests/baselines/reference/for-of16.js +++ b/tests/baselines/reference/for-of16.js @@ -1,23 +1,23 @@ //// [tests/cases/conformance/es6/for-ofStatements/for-of16.ts] //// //// [for-of16.ts] -class StringIterator { +class MyStringIterator { [Symbol.iterator]() { return this; } } var v: string; -for (v of new StringIterator) { } // Should fail +for (v of new MyStringIterator) { } // Should fail -for (v of new StringIterator) { } // Should still fail (related errors should still be shown even though type is cached). +for (v of new MyStringIterator) { } // Should still fail (related errors should still be shown even though type is cached). //// [for-of16.js] -class StringIterator { +class MyStringIterator { [Symbol.iterator]() { return this; } } var v; -for (v of new StringIterator) { } // Should fail -for (v of new StringIterator) { } // Should still fail (related errors should still be shown even though type is cached). +for (v of new MyStringIterator) { } // Should fail +for (v of new MyStringIterator) { } // Should still fail (related errors should still be shown even though type is cached). diff --git a/tests/baselines/reference/for-of16.symbols b/tests/baselines/reference/for-of16.symbols index 03a26d1435320..bab17a526bd43 100644 --- a/tests/baselines/reference/for-of16.symbols +++ b/tests/baselines/reference/for-of16.symbols @@ -1,28 +1,28 @@ //// [tests/cases/conformance/es6/for-ofStatements/for-of16.ts] //// === for-of16.ts === -class StringIterator { ->StringIterator : Symbol(StringIterator, Decl(for-of16.ts, 0, 0)) +class MyStringIterator { +>MyStringIterator : Symbol(MyStringIterator, Decl(for-of16.ts, 0, 0)) [Symbol.iterator]() { ->[Symbol.iterator] : Symbol(StringIterator[Symbol.iterator], Decl(for-of16.ts, 0, 22)) +>[Symbol.iterator] : Symbol(MyStringIterator[Symbol.iterator], Decl(for-of16.ts, 0, 24)) >Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.es2015.iterable.d.ts, --, --)) >Symbol : Symbol(Symbol, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) >iterator : Symbol(SymbolConstructor.iterator, Decl(lib.es2015.iterable.d.ts, --, --)) return this; ->this : Symbol(StringIterator, Decl(for-of16.ts, 0, 0)) +>this : Symbol(MyStringIterator, Decl(for-of16.ts, 0, 0)) } } var v: string; >v : Symbol(v, Decl(for-of16.ts, 6, 3)) -for (v of new StringIterator) { } // Should fail +for (v of new MyStringIterator) { } // Should fail >v : Symbol(v, Decl(for-of16.ts, 6, 3)) ->StringIterator : Symbol(StringIterator, Decl(for-of16.ts, 0, 0)) +>MyStringIterator : Symbol(MyStringIterator, Decl(for-of16.ts, 0, 0)) -for (v of new StringIterator) { } // Should still fail (related errors should still be shown even though type is cached). +for (v of new MyStringIterator) { } // Should still fail (related errors should still be shown even though type is cached). >v : Symbol(v, Decl(for-of16.ts, 6, 3)) ->StringIterator : Symbol(StringIterator, Decl(for-of16.ts, 0, 0)) +>MyStringIterator : Symbol(MyStringIterator, Decl(for-of16.ts, 0, 0)) diff --git a/tests/baselines/reference/for-of16.types b/tests/baselines/reference/for-of16.types index 896c3513a2cf8..fb051c331165f 100644 --- a/tests/baselines/reference/for-of16.types +++ b/tests/baselines/reference/for-of16.types @@ -1,9 +1,9 @@ //// [tests/cases/conformance/es6/for-ofStatements/for-of16.ts] //// === for-of16.ts === -class StringIterator { ->StringIterator : StringIterator -> : ^^^^^^^^^^^^^^ +class MyStringIterator { +>MyStringIterator : MyStringIterator +> : ^^^^^^^^^^^^^^^^ [Symbol.iterator]() { >[Symbol.iterator] : () => this @@ -25,19 +25,19 @@ var v: string; >v : string > : ^^^^^^ -for (v of new StringIterator) { } // Should fail +for (v of new MyStringIterator) { } // Should fail >v : string > : ^^^^^^ ->new StringIterator : StringIterator -> : ^^^^^^^^^^^^^^ ->StringIterator : typeof StringIterator -> : ^^^^^^^^^^^^^^^^^^^^^ +>new MyStringIterator : MyStringIterator +> : ^^^^^^^^^^^^^^^^ +>MyStringIterator : typeof MyStringIterator +> : ^^^^^^^^^^^^^^^^^^^^^^^ -for (v of new StringIterator) { } // Should still fail (related errors should still be shown even though type is cached). +for (v of new MyStringIterator) { } // Should still fail (related errors should still be shown even though type is cached). >v : string > : ^^^^^^ ->new StringIterator : StringIterator -> : ^^^^^^^^^^^^^^ ->StringIterator : typeof StringIterator -> : ^^^^^^^^^^^^^^^^^^^^^ +>new MyStringIterator : MyStringIterator +> : ^^^^^^^^^^^^^^^^ +>MyStringIterator : typeof MyStringIterator +> : ^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/baselines/reference/for-of18.js b/tests/baselines/reference/for-of18.js index a0673561e882e..c81fa6a0bc405 100644 --- a/tests/baselines/reference/for-of18.js +++ b/tests/baselines/reference/for-of18.js @@ -1,7 +1,7 @@ //// [tests/cases/conformance/es6/for-ofStatements/for-of18.ts] //// //// [for-of18.ts] -class StringIterator { +class MyStringIterator { next() { return { value: "", @@ -14,10 +14,10 @@ class StringIterator { } var v: string; -for (v of new StringIterator) { } // Should succeed +for (v of new MyStringIterator) { } // Should succeed //// [for-of18.js] -class StringIterator { +class MyStringIterator { next() { return { value: "", @@ -29,4 +29,4 @@ class StringIterator { } } var v; -for (v of new StringIterator) { } // Should succeed +for (v of new MyStringIterator) { } // Should succeed diff --git a/tests/baselines/reference/for-of18.symbols b/tests/baselines/reference/for-of18.symbols index 8bbbb40c329f9..032604bfe0154 100644 --- a/tests/baselines/reference/for-of18.symbols +++ b/tests/baselines/reference/for-of18.symbols @@ -1,11 +1,11 @@ //// [tests/cases/conformance/es6/for-ofStatements/for-of18.ts] //// === for-of18.ts === -class StringIterator { ->StringIterator : Symbol(StringIterator, Decl(for-of18.ts, 0, 0)) +class MyStringIterator { +>MyStringIterator : Symbol(MyStringIterator, Decl(for-of18.ts, 0, 0)) next() { ->next : Symbol(StringIterator.next, Decl(for-of18.ts, 0, 22)) +>next : Symbol(MyStringIterator.next, Decl(for-of18.ts, 0, 24)) return { value: "", @@ -17,20 +17,20 @@ class StringIterator { }; } [Symbol.iterator]() { ->[Symbol.iterator] : Symbol(StringIterator[Symbol.iterator], Decl(for-of18.ts, 6, 5)) +>[Symbol.iterator] : Symbol(MyStringIterator[Symbol.iterator], Decl(for-of18.ts, 6, 5)) >Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.es2015.iterable.d.ts, --, --)) >Symbol : Symbol(Symbol, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) >iterator : Symbol(SymbolConstructor.iterator, Decl(lib.es2015.iterable.d.ts, --, --)) return this; ->this : Symbol(StringIterator, Decl(for-of18.ts, 0, 0)) +>this : Symbol(MyStringIterator, Decl(for-of18.ts, 0, 0)) } } var v: string; >v : Symbol(v, Decl(for-of18.ts, 12, 3)) -for (v of new StringIterator) { } // Should succeed +for (v of new MyStringIterator) { } // Should succeed >v : Symbol(v, Decl(for-of18.ts, 12, 3)) ->StringIterator : Symbol(StringIterator, Decl(for-of18.ts, 0, 0)) +>MyStringIterator : Symbol(MyStringIterator, Decl(for-of18.ts, 0, 0)) diff --git a/tests/baselines/reference/for-of18.types b/tests/baselines/reference/for-of18.types index 34a7e20a9549c..0ac03cf3e9e2d 100644 --- a/tests/baselines/reference/for-of18.types +++ b/tests/baselines/reference/for-of18.types @@ -1,9 +1,9 @@ //// [tests/cases/conformance/es6/for-ofStatements/for-of18.ts] //// === for-of18.ts === -class StringIterator { ->StringIterator : StringIterator -> : ^^^^^^^^^^^^^^ +class MyStringIterator { +>MyStringIterator : MyStringIterator +> : ^^^^^^^^^^^^^^^^ next() { >next : () => { value: string; done: boolean; } @@ -47,11 +47,11 @@ var v: string; >v : string > : ^^^^^^ -for (v of new StringIterator) { } // Should succeed +for (v of new MyStringIterator) { } // Should succeed >v : string > : ^^^^^^ ->new StringIterator : StringIterator -> : ^^^^^^^^^^^^^^ ->StringIterator : typeof StringIterator -> : ^^^^^^^^^^^^^^^^^^^^^ +>new MyStringIterator : MyStringIterator +> : ^^^^^^^^^^^^^^^^ +>MyStringIterator : typeof MyStringIterator +> : ^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/baselines/reference/for-of25.js b/tests/baselines/reference/for-of25.js index 66111df6394d5..bac7342af9714 100644 --- a/tests/baselines/reference/for-of25.js +++ b/tests/baselines/reference/for-of25.js @@ -1,20 +1,20 @@ //// [tests/cases/conformance/es6/for-ofStatements/for-of25.ts] //// //// [for-of25.ts] -class StringIterator { +class MyStringIterator { [Symbol.iterator]() { return x; } } var x: any; -for (var v of new StringIterator) { } +for (var v of new MyStringIterator) { } //// [for-of25.js] -class StringIterator { +class MyStringIterator { [Symbol.iterator]() { return x; } } var x; -for (var v of new StringIterator) { } +for (var v of new MyStringIterator) { } diff --git a/tests/baselines/reference/for-of25.symbols b/tests/baselines/reference/for-of25.symbols index fdb51126c8922..86a223aa335d3 100644 --- a/tests/baselines/reference/for-of25.symbols +++ b/tests/baselines/reference/for-of25.symbols @@ -1,11 +1,11 @@ //// [tests/cases/conformance/es6/for-ofStatements/for-of25.ts] //// === for-of25.ts === -class StringIterator { ->StringIterator : Symbol(StringIterator, Decl(for-of25.ts, 0, 0)) +class MyStringIterator { +>MyStringIterator : Symbol(MyStringIterator, Decl(for-of25.ts, 0, 0)) [Symbol.iterator]() { ->[Symbol.iterator] : Symbol(StringIterator[Symbol.iterator], Decl(for-of25.ts, 0, 22)) +>[Symbol.iterator] : Symbol(MyStringIterator[Symbol.iterator], Decl(for-of25.ts, 0, 24)) >Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.es2015.iterable.d.ts, --, --)) >Symbol : Symbol(Symbol, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) >iterator : Symbol(SymbolConstructor.iterator, Decl(lib.es2015.iterable.d.ts, --, --)) @@ -18,7 +18,7 @@ class StringIterator { var x: any; >x : Symbol(x, Decl(for-of25.ts, 6, 3)) -for (var v of new StringIterator) { } +for (var v of new MyStringIterator) { } >v : Symbol(v, Decl(for-of25.ts, 7, 8)) ->StringIterator : Symbol(StringIterator, Decl(for-of25.ts, 0, 0)) +>MyStringIterator : Symbol(MyStringIterator, Decl(for-of25.ts, 0, 0)) diff --git a/tests/baselines/reference/for-of25.types b/tests/baselines/reference/for-of25.types index 5d3aaaeb2cfba..3ad54a1aea16f 100644 --- a/tests/baselines/reference/for-of25.types +++ b/tests/baselines/reference/for-of25.types @@ -1,9 +1,9 @@ //// [tests/cases/conformance/es6/for-ofStatements/for-of25.ts] //// === for-of25.ts === -class StringIterator { ->StringIterator : StringIterator -> : ^^^^^^^^^^^^^^ +class MyStringIterator { +>MyStringIterator : MyStringIterator +> : ^^^^^^^^^^^^^^^^ [Symbol.iterator]() { >[Symbol.iterator] : () => any @@ -23,10 +23,10 @@ class StringIterator { var x: any; >x : any -for (var v of new StringIterator) { } +for (var v of new MyStringIterator) { } >v : any ->new StringIterator : StringIterator -> : ^^^^^^^^^^^^^^ ->StringIterator : typeof StringIterator -> : ^^^^^^^^^^^^^^^^^^^^^ +>new MyStringIterator : MyStringIterator +> : ^^^^^^^^^^^^^^^^ +>MyStringIterator : typeof MyStringIterator +> : ^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/baselines/reference/for-of26.js b/tests/baselines/reference/for-of26.js index 23a51ad7d8a0d..133ad856d2516 100644 --- a/tests/baselines/reference/for-of26.js +++ b/tests/baselines/reference/for-of26.js @@ -1,7 +1,7 @@ //// [tests/cases/conformance/es6/for-ofStatements/for-of26.ts] //// //// [for-of26.ts] -class StringIterator { +class MyStringIterator { next() { return x; } @@ -11,10 +11,10 @@ class StringIterator { } var x: any; -for (var v of new StringIterator) { } +for (var v of new MyStringIterator) { } //// [for-of26.js] -class StringIterator { +class MyStringIterator { next() { return x; } @@ -23,4 +23,4 @@ class StringIterator { } } var x; -for (var v of new StringIterator) { } +for (var v of new MyStringIterator) { } diff --git a/tests/baselines/reference/for-of26.symbols b/tests/baselines/reference/for-of26.symbols index a5170241f422b..a5b90df679a57 100644 --- a/tests/baselines/reference/for-of26.symbols +++ b/tests/baselines/reference/for-of26.symbols @@ -1,30 +1,30 @@ //// [tests/cases/conformance/es6/for-ofStatements/for-of26.ts] //// === for-of26.ts === -class StringIterator { ->StringIterator : Symbol(StringIterator, Decl(for-of26.ts, 0, 0)) +class MyStringIterator { +>MyStringIterator : Symbol(MyStringIterator, Decl(for-of26.ts, 0, 0)) next() { ->next : Symbol(StringIterator.next, Decl(for-of26.ts, 0, 22)) +>next : Symbol(MyStringIterator.next, Decl(for-of26.ts, 0, 24)) return x; >x : Symbol(x, Decl(for-of26.ts, 9, 3)) } [Symbol.iterator]() { ->[Symbol.iterator] : Symbol(StringIterator[Symbol.iterator], Decl(for-of26.ts, 3, 5)) +>[Symbol.iterator] : Symbol(MyStringIterator[Symbol.iterator], Decl(for-of26.ts, 3, 5)) >Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.es2015.iterable.d.ts, --, --)) >Symbol : Symbol(Symbol, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) >iterator : Symbol(SymbolConstructor.iterator, Decl(lib.es2015.iterable.d.ts, --, --)) return this; ->this : Symbol(StringIterator, Decl(for-of26.ts, 0, 0)) +>this : Symbol(MyStringIterator, Decl(for-of26.ts, 0, 0)) } } var x: any; >x : Symbol(x, Decl(for-of26.ts, 9, 3)) -for (var v of new StringIterator) { } +for (var v of new MyStringIterator) { } >v : Symbol(v, Decl(for-of26.ts, 10, 8)) ->StringIterator : Symbol(StringIterator, Decl(for-of26.ts, 0, 0)) +>MyStringIterator : Symbol(MyStringIterator, Decl(for-of26.ts, 0, 0)) diff --git a/tests/baselines/reference/for-of26.types b/tests/baselines/reference/for-of26.types index d324690555ca0..404fe9d373830 100644 --- a/tests/baselines/reference/for-of26.types +++ b/tests/baselines/reference/for-of26.types @@ -1,9 +1,9 @@ //// [tests/cases/conformance/es6/for-ofStatements/for-of26.ts] //// === for-of26.ts === -class StringIterator { ->StringIterator : StringIterator -> : ^^^^^^^^^^^^^^ +class MyStringIterator { +>MyStringIterator : MyStringIterator +> : ^^^^^^^^^^^^^^^^ next() { >next : () => any @@ -31,10 +31,10 @@ class StringIterator { var x: any; >x : any -for (var v of new StringIterator) { } +for (var v of new MyStringIterator) { } >v : any ->new StringIterator : StringIterator -> : ^^^^^^^^^^^^^^ ->StringIterator : typeof StringIterator -> : ^^^^^^^^^^^^^^^^^^^^^ +>new MyStringIterator : MyStringIterator +> : ^^^^^^^^^^^^^^^^ +>MyStringIterator : typeof MyStringIterator +> : ^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/baselines/reference/for-of27.js b/tests/baselines/reference/for-of27.js index e8e71a9513b90..eaa09a06b72b3 100644 --- a/tests/baselines/reference/for-of27.js +++ b/tests/baselines/reference/for-of27.js @@ -1,14 +1,14 @@ //// [tests/cases/conformance/es6/for-ofStatements/for-of27.ts] //// //// [for-of27.ts] -class StringIterator { +class MyStringIterator { [Symbol.iterator]: any; } -for (var v of new StringIterator) { } +for (var v of new MyStringIterator) { } //// [for-of27.js] -class StringIterator { +class MyStringIterator { } Symbol.iterator; -for (var v of new StringIterator) { } +for (var v of new MyStringIterator) { } diff --git a/tests/baselines/reference/for-of27.symbols b/tests/baselines/reference/for-of27.symbols index 62f6b6a7069f1..a3d03b9f5a89a 100644 --- a/tests/baselines/reference/for-of27.symbols +++ b/tests/baselines/reference/for-of27.symbols @@ -1,17 +1,17 @@ //// [tests/cases/conformance/es6/for-ofStatements/for-of27.ts] //// === for-of27.ts === -class StringIterator { ->StringIterator : Symbol(StringIterator, Decl(for-of27.ts, 0, 0)) +class MyStringIterator { +>MyStringIterator : Symbol(MyStringIterator, Decl(for-of27.ts, 0, 0)) [Symbol.iterator]: any; ->[Symbol.iterator] : Symbol(StringIterator[Symbol.iterator], Decl(for-of27.ts, 0, 22)) +>[Symbol.iterator] : Symbol(MyStringIterator[Symbol.iterator], Decl(for-of27.ts, 0, 24)) >Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.es2015.iterable.d.ts, --, --)) >Symbol : Symbol(Symbol, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) >iterator : Symbol(SymbolConstructor.iterator, Decl(lib.es2015.iterable.d.ts, --, --)) } -for (var v of new StringIterator) { } +for (var v of new MyStringIterator) { } >v : Symbol(v, Decl(for-of27.ts, 4, 8)) ->StringIterator : Symbol(StringIterator, Decl(for-of27.ts, 0, 0)) +>MyStringIterator : Symbol(MyStringIterator, Decl(for-of27.ts, 0, 0)) diff --git a/tests/baselines/reference/for-of27.types b/tests/baselines/reference/for-of27.types index 9968893ec59b8..c783168764dbe 100644 --- a/tests/baselines/reference/for-of27.types +++ b/tests/baselines/reference/for-of27.types @@ -1,9 +1,9 @@ //// [tests/cases/conformance/es6/for-ofStatements/for-of27.ts] //// === for-of27.ts === -class StringIterator { ->StringIterator : StringIterator -> : ^^^^^^^^^^^^^^ +class MyStringIterator { +>MyStringIterator : MyStringIterator +> : ^^^^^^^^^^^^^^^^ [Symbol.iterator]: any; >[Symbol.iterator] : any @@ -15,10 +15,10 @@ class StringIterator { > : ^^^^^^^^^^^^^ } -for (var v of new StringIterator) { } +for (var v of new MyStringIterator) { } >v : any ->new StringIterator : StringIterator -> : ^^^^^^^^^^^^^^ ->StringIterator : typeof StringIterator -> : ^^^^^^^^^^^^^^^^^^^^^ +>new MyStringIterator : MyStringIterator +> : ^^^^^^^^^^^^^^^^ +>MyStringIterator : typeof MyStringIterator +> : ^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/baselines/reference/for-of28.js b/tests/baselines/reference/for-of28.js index bddd76685c326..a144ef9260d38 100644 --- a/tests/baselines/reference/for-of28.js +++ b/tests/baselines/reference/for-of28.js @@ -1,19 +1,19 @@ //// [tests/cases/conformance/es6/for-ofStatements/for-of28.ts] //// //// [for-of28.ts] -class StringIterator { +class MyStringIterator { next: any; [Symbol.iterator]() { return this; } } -for (var v of new StringIterator) { } +for (var v of new MyStringIterator) { } //// [for-of28.js] -class StringIterator { +class MyStringIterator { [Symbol.iterator]() { return this; } } -for (var v of new StringIterator) { } +for (var v of new MyStringIterator) { } diff --git a/tests/baselines/reference/for-of28.symbols b/tests/baselines/reference/for-of28.symbols index 39b1997ddb66c..d7d95b3491a3c 100644 --- a/tests/baselines/reference/for-of28.symbols +++ b/tests/baselines/reference/for-of28.symbols @@ -1,24 +1,24 @@ //// [tests/cases/conformance/es6/for-ofStatements/for-of28.ts] //// === for-of28.ts === -class StringIterator { ->StringIterator : Symbol(StringIterator, Decl(for-of28.ts, 0, 0)) +class MyStringIterator { +>MyStringIterator : Symbol(MyStringIterator, Decl(for-of28.ts, 0, 0)) next: any; ->next : Symbol(StringIterator.next, Decl(for-of28.ts, 0, 22)) +>next : Symbol(MyStringIterator.next, Decl(for-of28.ts, 0, 24)) [Symbol.iterator]() { ->[Symbol.iterator] : Symbol(StringIterator[Symbol.iterator], Decl(for-of28.ts, 1, 14)) +>[Symbol.iterator] : Symbol(MyStringIterator[Symbol.iterator], Decl(for-of28.ts, 1, 14)) >Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.es2015.iterable.d.ts, --, --)) >Symbol : Symbol(Symbol, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) >iterator : Symbol(SymbolConstructor.iterator, Decl(lib.es2015.iterable.d.ts, --, --)) return this; ->this : Symbol(StringIterator, Decl(for-of28.ts, 0, 0)) +>this : Symbol(MyStringIterator, Decl(for-of28.ts, 0, 0)) } } -for (var v of new StringIterator) { } +for (var v of new MyStringIterator) { } >v : Symbol(v, Decl(for-of28.ts, 7, 8)) ->StringIterator : Symbol(StringIterator, Decl(for-of28.ts, 0, 0)) +>MyStringIterator : Symbol(MyStringIterator, Decl(for-of28.ts, 0, 0)) diff --git a/tests/baselines/reference/for-of28.types b/tests/baselines/reference/for-of28.types index ba5d79822dfdf..c6d9d8ab16bdb 100644 --- a/tests/baselines/reference/for-of28.types +++ b/tests/baselines/reference/for-of28.types @@ -1,9 +1,9 @@ //// [tests/cases/conformance/es6/for-ofStatements/for-of28.ts] //// === for-of28.ts === -class StringIterator { ->StringIterator : StringIterator -> : ^^^^^^^^^^^^^^ +class MyStringIterator { +>MyStringIterator : MyStringIterator +> : ^^^^^^^^^^^^^^^^ next: any; >next : any @@ -24,10 +24,10 @@ class StringIterator { } } -for (var v of new StringIterator) { } +for (var v of new MyStringIterator) { } >v : any ->new StringIterator : StringIterator -> : ^^^^^^^^^^^^^^ ->StringIterator : typeof StringIterator -> : ^^^^^^^^^^^^^^^^^^^^^ +>new MyStringIterator : MyStringIterator +> : ^^^^^^^^^^^^^^^^ +>MyStringIterator : typeof MyStringIterator +> : ^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/baselines/reference/for-of30.errors.txt b/tests/baselines/reference/for-of30.errors.txt index c577b8c11a796..e4d06358865d1 100644 --- a/tests/baselines/reference/for-of30.errors.txt +++ b/tests/baselines/reference/for-of30.errors.txt @@ -2,7 +2,7 @@ for-of30.ts(16,15): error TS2767: The 'return' property of an iterator must be a ==== for-of30.ts (1 errors) ==== - class StringIterator { + class MyStringIterator { next() { return { done: false, @@ -17,6 +17,6 @@ for-of30.ts(16,15): error TS2767: The 'return' property of an iterator must be a } } - for (var v of new StringIterator) { } - ~~~~~~~~~~~~~~~~~~ + for (var v of new MyStringIterator) { } + ~~~~~~~~~~~~~~~~~~~~ !!! error TS2767: The 'return' property of an iterator must be a method. \ No newline at end of file diff --git a/tests/baselines/reference/for-of30.js b/tests/baselines/reference/for-of30.js index b964ab44e2738..cb7a096a5a6b6 100644 --- a/tests/baselines/reference/for-of30.js +++ b/tests/baselines/reference/for-of30.js @@ -1,7 +1,7 @@ //// [tests/cases/conformance/es6/for-ofStatements/for-of30.ts] //// //// [for-of30.ts] -class StringIterator { +class MyStringIterator { next() { return { done: false, @@ -16,10 +16,10 @@ class StringIterator { } } -for (var v of new StringIterator) { } +for (var v of new MyStringIterator) { } //// [for-of30.js] -class StringIterator { +class MyStringIterator { constructor() { this.return = 0; } @@ -33,4 +33,4 @@ class StringIterator { return this; } } -for (var v of new StringIterator) { } +for (var v of new MyStringIterator) { } diff --git a/tests/baselines/reference/for-of30.symbols b/tests/baselines/reference/for-of30.symbols index 39ec1bffa0e66..d6f57f3e9dce0 100644 --- a/tests/baselines/reference/for-of30.symbols +++ b/tests/baselines/reference/for-of30.symbols @@ -1,11 +1,11 @@ //// [tests/cases/conformance/es6/for-ofStatements/for-of30.ts] //// === for-of30.ts === -class StringIterator { ->StringIterator : Symbol(StringIterator, Decl(for-of30.ts, 0, 0)) +class MyStringIterator { +>MyStringIterator : Symbol(MyStringIterator, Decl(for-of30.ts, 0, 0)) next() { ->next : Symbol(StringIterator.next, Decl(for-of30.ts, 0, 22)) +>next : Symbol(MyStringIterator.next, Decl(for-of30.ts, 0, 24)) return { done: false, @@ -17,20 +17,20 @@ class StringIterator { } return = 0; ->return : Symbol(StringIterator.return, Decl(for-of30.ts, 6, 5)) +>return : Symbol(MyStringIterator.return, Decl(for-of30.ts, 6, 5)) [Symbol.iterator]() { ->[Symbol.iterator] : Symbol(StringIterator[Symbol.iterator], Decl(for-of30.ts, 8, 15)) +>[Symbol.iterator] : Symbol(MyStringIterator[Symbol.iterator], Decl(for-of30.ts, 8, 15)) >Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.es2015.iterable.d.ts, --, --)) >Symbol : Symbol(Symbol, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) >iterator : Symbol(SymbolConstructor.iterator, Decl(lib.es2015.iterable.d.ts, --, --)) return this; ->this : Symbol(StringIterator, Decl(for-of30.ts, 0, 0)) +>this : Symbol(MyStringIterator, Decl(for-of30.ts, 0, 0)) } } -for (var v of new StringIterator) { } +for (var v of new MyStringIterator) { } >v : Symbol(v, Decl(for-of30.ts, 15, 8)) ->StringIterator : Symbol(StringIterator, Decl(for-of30.ts, 0, 0)) +>MyStringIterator : Symbol(MyStringIterator, Decl(for-of30.ts, 0, 0)) diff --git a/tests/baselines/reference/for-of30.types b/tests/baselines/reference/for-of30.types index e7e10b3ad168c..3b05a65c38762 100644 --- a/tests/baselines/reference/for-of30.types +++ b/tests/baselines/reference/for-of30.types @@ -1,9 +1,9 @@ //// [tests/cases/conformance/es6/for-ofStatements/for-of30.ts] //// === for-of30.ts === -class StringIterator { ->StringIterator : StringIterator -> : ^^^^^^^^^^^^^^ +class MyStringIterator { +>MyStringIterator : MyStringIterator +> : ^^^^^^^^^^^^^^^^ next() { >next : () => { done: boolean; value: string; } @@ -49,11 +49,11 @@ class StringIterator { } } -for (var v of new StringIterator) { } +for (var v of new MyStringIterator) { } >v : string > : ^^^^^^ ->new StringIterator : StringIterator -> : ^^^^^^^^^^^^^^ ->StringIterator : typeof StringIterator -> : ^^^^^^^^^^^^^^^^^^^^^ +>new MyStringIterator : MyStringIterator +> : ^^^^^^^^^^^^^^^^ +>MyStringIterator : typeof MyStringIterator +> : ^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/baselines/reference/for-of31.js b/tests/baselines/reference/for-of31.js index 8459c4c7c82bd..76395f273241c 100644 --- a/tests/baselines/reference/for-of31.js +++ b/tests/baselines/reference/for-of31.js @@ -1,7 +1,7 @@ //// [tests/cases/conformance/es6/for-ofStatements/for-of31.ts] //// //// [for-of31.ts] -class StringIterator { +class MyStringIterator { next() { return { // no done property @@ -14,10 +14,10 @@ class StringIterator { } } -for (var v of new StringIterator) { } +for (var v of new MyStringIterator) { } //// [for-of31.js] -class StringIterator { +class MyStringIterator { next() { return { // no done property @@ -28,4 +28,4 @@ class StringIterator { return this; } } -for (var v of new StringIterator) { } +for (var v of new MyStringIterator) { } diff --git a/tests/baselines/reference/for-of31.symbols b/tests/baselines/reference/for-of31.symbols index 010e2c4f50cc2..71f3b5773ca92 100644 --- a/tests/baselines/reference/for-of31.symbols +++ b/tests/baselines/reference/for-of31.symbols @@ -1,11 +1,11 @@ //// [tests/cases/conformance/es6/for-ofStatements/for-of31.ts] //// === for-of31.ts === -class StringIterator { ->StringIterator : Symbol(StringIterator, Decl(for-of31.ts, 0, 0)) +class MyStringIterator { +>MyStringIterator : Symbol(MyStringIterator, Decl(for-of31.ts, 0, 0)) next() { ->next : Symbol(StringIterator.next, Decl(for-of31.ts, 0, 22)) +>next : Symbol(MyStringIterator.next, Decl(for-of31.ts, 0, 24)) return { // no done property @@ -15,17 +15,17 @@ class StringIterator { } [Symbol.iterator]() { ->[Symbol.iterator] : Symbol(StringIterator[Symbol.iterator], Decl(for-of31.ts, 6, 5)) +>[Symbol.iterator] : Symbol(MyStringIterator[Symbol.iterator], Decl(for-of31.ts, 6, 5)) >Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.es2015.iterable.d.ts, --, --)) >Symbol : Symbol(Symbol, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) >iterator : Symbol(SymbolConstructor.iterator, Decl(lib.es2015.iterable.d.ts, --, --)) return this; ->this : Symbol(StringIterator, Decl(for-of31.ts, 0, 0)) +>this : Symbol(MyStringIterator, Decl(for-of31.ts, 0, 0)) } } -for (var v of new StringIterator) { } +for (var v of new MyStringIterator) { } >v : Symbol(v, Decl(for-of31.ts, 13, 8)) ->StringIterator : Symbol(StringIterator, Decl(for-of31.ts, 0, 0)) +>MyStringIterator : Symbol(MyStringIterator, Decl(for-of31.ts, 0, 0)) diff --git a/tests/baselines/reference/for-of31.types b/tests/baselines/reference/for-of31.types index 4b706a0eb0638..79cf5a3748f86 100644 --- a/tests/baselines/reference/for-of31.types +++ b/tests/baselines/reference/for-of31.types @@ -1,9 +1,9 @@ //// [tests/cases/conformance/es6/for-ofStatements/for-of31.ts] //// === for-of31.ts === -class StringIterator { ->StringIterator : StringIterator -> : ^^^^^^^^^^^^^^ +class MyStringIterator { +>MyStringIterator : MyStringIterator +> : ^^^^^^^^^^^^^^^^ next() { >next : () => { value: string; } @@ -38,11 +38,11 @@ class StringIterator { } } -for (var v of new StringIterator) { } +for (var v of new MyStringIterator) { } >v : string > : ^^^^^^ ->new StringIterator : StringIterator -> : ^^^^^^^^^^^^^^ ->StringIterator : typeof StringIterator -> : ^^^^^^^^^^^^^^^^^^^^^ +>new MyStringIterator : MyStringIterator +> : ^^^^^^^^^^^^^^^^ +>MyStringIterator : typeof MyStringIterator +> : ^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/baselines/reference/for-of33.errors.txt b/tests/baselines/reference/for-of33.errors.txt index 3937f05d0730f..2549e78d9c7e4 100644 --- a/tests/baselines/reference/for-of33.errors.txt +++ b/tests/baselines/reference/for-of33.errors.txt @@ -3,7 +3,7 @@ for-of33.ts(7,10): error TS7022: 'v' implicitly has type 'any' because it does n ==== for-of33.ts (2 errors) ==== - class StringIterator { + class MyStringIterator { [Symbol.iterator]() { ~~~~~~~~~~~~~~~~~ !!! error TS7023: '[Symbol.iterator]' implicitly has return type 'any' because it does not have a return type annotation and is referenced directly or indirectly in one of its return expressions. @@ -11,6 +11,6 @@ for-of33.ts(7,10): error TS7022: 'v' implicitly has type 'any' because it does n } } - for (var v of new StringIterator) { } + for (var v of new MyStringIterator) { } ~ !!! error TS7022: 'v' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer. \ No newline at end of file diff --git a/tests/baselines/reference/for-of33.js b/tests/baselines/reference/for-of33.js index ae019516d14c4..5018026b9651e 100644 --- a/tests/baselines/reference/for-of33.js +++ b/tests/baselines/reference/for-of33.js @@ -1,18 +1,18 @@ //// [tests/cases/conformance/es6/for-ofStatements/for-of33.ts] //// //// [for-of33.ts] -class StringIterator { +class MyStringIterator { [Symbol.iterator]() { return v; } } -for (var v of new StringIterator) { } +for (var v of new MyStringIterator) { } //// [for-of33.js] -class StringIterator { +class MyStringIterator { [Symbol.iterator]() { return v; } } -for (var v of new StringIterator) { } +for (var v of new MyStringIterator) { } diff --git a/tests/baselines/reference/for-of33.symbols b/tests/baselines/reference/for-of33.symbols index ece2b2d06e672..89becb49083ab 100644 --- a/tests/baselines/reference/for-of33.symbols +++ b/tests/baselines/reference/for-of33.symbols @@ -1,11 +1,11 @@ //// [tests/cases/conformance/es6/for-ofStatements/for-of33.ts] //// === for-of33.ts === -class StringIterator { ->StringIterator : Symbol(StringIterator, Decl(for-of33.ts, 0, 0)) +class MyStringIterator { +>MyStringIterator : Symbol(MyStringIterator, Decl(for-of33.ts, 0, 0)) [Symbol.iterator]() { ->[Symbol.iterator] : Symbol(StringIterator[Symbol.iterator], Decl(for-of33.ts, 0, 22)) +>[Symbol.iterator] : Symbol(MyStringIterator[Symbol.iterator], Decl(for-of33.ts, 0, 24)) >Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.es2015.iterable.d.ts, --, --)) >Symbol : Symbol(Symbol, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) >iterator : Symbol(SymbolConstructor.iterator, Decl(lib.es2015.iterable.d.ts, --, --)) @@ -15,7 +15,7 @@ class StringIterator { } } -for (var v of new StringIterator) { } +for (var v of new MyStringIterator) { } >v : Symbol(v, Decl(for-of33.ts, 6, 8)) ->StringIterator : Symbol(StringIterator, Decl(for-of33.ts, 0, 0)) +>MyStringIterator : Symbol(MyStringIterator, Decl(for-of33.ts, 0, 0)) diff --git a/tests/baselines/reference/for-of33.types b/tests/baselines/reference/for-of33.types index ea1266df15efa..c493ce3deab46 100644 --- a/tests/baselines/reference/for-of33.types +++ b/tests/baselines/reference/for-of33.types @@ -1,9 +1,9 @@ //// [tests/cases/conformance/es6/for-ofStatements/for-of33.ts] //// === for-of33.ts === -class StringIterator { ->StringIterator : StringIterator -> : ^^^^^^^^^^^^^^ +class MyStringIterator { +>MyStringIterator : MyStringIterator +> : ^^^^^^^^^^^^^^^^ [Symbol.iterator]() { >[Symbol.iterator] : () => any @@ -21,11 +21,11 @@ class StringIterator { } } -for (var v of new StringIterator) { } +for (var v of new MyStringIterator) { } >v : any > : ^^^ ->new StringIterator : StringIterator -> : ^^^^^^^^^^^^^^ ->StringIterator : typeof StringIterator -> : ^^^^^^^^^^^^^^^^^^^^^ +>new MyStringIterator : MyStringIterator +> : ^^^^^^^^^^^^^^^^ +>MyStringIterator : typeof MyStringIterator +> : ^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/baselines/reference/for-of34.errors.txt b/tests/baselines/reference/for-of34.errors.txt index 8517429bc651e..f2540a155909e 100644 --- a/tests/baselines/reference/for-of34.errors.txt +++ b/tests/baselines/reference/for-of34.errors.txt @@ -3,7 +3,7 @@ for-of34.ts(11,10): error TS7022: 'v' implicitly has type 'any' because it does ==== for-of34.ts (2 errors) ==== - class StringIterator { + class MyStringIterator { next() { ~~~~ !!! error TS7023: 'next' implicitly has return type 'any' because it does not have a return type annotation and is referenced directly or indirectly in one of its return expressions. @@ -15,6 +15,6 @@ for-of34.ts(11,10): error TS7022: 'v' implicitly has type 'any' because it does } } - for (var v of new StringIterator) { } + for (var v of new MyStringIterator) { } ~ !!! error TS7022: 'v' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer. \ No newline at end of file diff --git a/tests/baselines/reference/for-of34.js b/tests/baselines/reference/for-of34.js index d583893db5a8b..bb674e84e1c63 100644 --- a/tests/baselines/reference/for-of34.js +++ b/tests/baselines/reference/for-of34.js @@ -1,7 +1,7 @@ //// [tests/cases/conformance/es6/for-ofStatements/for-of34.ts] //// //// [for-of34.ts] -class StringIterator { +class MyStringIterator { next() { return v; } @@ -11,10 +11,10 @@ class StringIterator { } } -for (var v of new StringIterator) { } +for (var v of new MyStringIterator) { } //// [for-of34.js] -class StringIterator { +class MyStringIterator { next() { return v; } @@ -22,4 +22,4 @@ class StringIterator { return this; } } -for (var v of new StringIterator) { } +for (var v of new MyStringIterator) { } diff --git a/tests/baselines/reference/for-of34.symbols b/tests/baselines/reference/for-of34.symbols index 5f0f856fc918f..d00c6bf26563c 100644 --- a/tests/baselines/reference/for-of34.symbols +++ b/tests/baselines/reference/for-of34.symbols @@ -1,28 +1,28 @@ //// [tests/cases/conformance/es6/for-ofStatements/for-of34.ts] //// === for-of34.ts === -class StringIterator { ->StringIterator : Symbol(StringIterator, Decl(for-of34.ts, 0, 0)) +class MyStringIterator { +>MyStringIterator : Symbol(MyStringIterator, Decl(for-of34.ts, 0, 0)) next() { ->next : Symbol(StringIterator.next, Decl(for-of34.ts, 0, 22)) +>next : Symbol(MyStringIterator.next, Decl(for-of34.ts, 0, 24)) return v; >v : Symbol(v, Decl(for-of34.ts, 10, 8)) } [Symbol.iterator]() { ->[Symbol.iterator] : Symbol(StringIterator[Symbol.iterator], Decl(for-of34.ts, 3, 5)) +>[Symbol.iterator] : Symbol(MyStringIterator[Symbol.iterator], Decl(for-of34.ts, 3, 5)) >Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.es2015.iterable.d.ts, --, --)) >Symbol : Symbol(Symbol, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) >iterator : Symbol(SymbolConstructor.iterator, Decl(lib.es2015.iterable.d.ts, --, --)) return this; ->this : Symbol(StringIterator, Decl(for-of34.ts, 0, 0)) +>this : Symbol(MyStringIterator, Decl(for-of34.ts, 0, 0)) } } -for (var v of new StringIterator) { } +for (var v of new MyStringIterator) { } >v : Symbol(v, Decl(for-of34.ts, 10, 8)) ->StringIterator : Symbol(StringIterator, Decl(for-of34.ts, 0, 0)) +>MyStringIterator : Symbol(MyStringIterator, Decl(for-of34.ts, 0, 0)) diff --git a/tests/baselines/reference/for-of34.types b/tests/baselines/reference/for-of34.types index ec160d279249e..7cd4841204cdd 100644 --- a/tests/baselines/reference/for-of34.types +++ b/tests/baselines/reference/for-of34.types @@ -1,9 +1,9 @@ //// [tests/cases/conformance/es6/for-ofStatements/for-of34.ts] //// === for-of34.ts === -class StringIterator { ->StringIterator : StringIterator -> : ^^^^^^^^^^^^^^ +class MyStringIterator { +>MyStringIterator : MyStringIterator +> : ^^^^^^^^^^^^^^^^ next() { >next : () => any @@ -30,11 +30,11 @@ class StringIterator { } } -for (var v of new StringIterator) { } +for (var v of new MyStringIterator) { } >v : any > : ^^^ ->new StringIterator : StringIterator -> : ^^^^^^^^^^^^^^ ->StringIterator : typeof StringIterator -> : ^^^^^^^^^^^^^^^^^^^^^ +>new MyStringIterator : MyStringIterator +> : ^^^^^^^^^^^^^^^^ +>MyStringIterator : typeof MyStringIterator +> : ^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/baselines/reference/for-of35.errors.txt b/tests/baselines/reference/for-of35.errors.txt index 19ec2cac8b2ad..52b8e6d498e88 100644 --- a/tests/baselines/reference/for-of35.errors.txt +++ b/tests/baselines/reference/for-of35.errors.txt @@ -3,7 +3,7 @@ for-of35.ts(14,10): error TS7022: 'v' implicitly has type 'any' because it does ==== for-of35.ts (2 errors) ==== - class StringIterator { + class MyStringIterator { next() { ~~~~ !!! error TS7023: 'next' implicitly has return type 'any' because it does not have a return type annotation and is referenced directly or indirectly in one of its return expressions. @@ -18,6 +18,6 @@ for-of35.ts(14,10): error TS7022: 'v' implicitly has type 'any' because it does } } - for (var v of new StringIterator) { } + for (var v of new MyStringIterator) { } ~ !!! error TS7022: 'v' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer. \ No newline at end of file diff --git a/tests/baselines/reference/for-of35.js b/tests/baselines/reference/for-of35.js index d4b803a929ea0..66b4d298db03a 100644 --- a/tests/baselines/reference/for-of35.js +++ b/tests/baselines/reference/for-of35.js @@ -1,7 +1,7 @@ //// [tests/cases/conformance/es6/for-ofStatements/for-of35.ts] //// //// [for-of35.ts] -class StringIterator { +class MyStringIterator { next() { return { done: true, @@ -14,10 +14,10 @@ class StringIterator { } } -for (var v of new StringIterator) { } +for (var v of new MyStringIterator) { } //// [for-of35.js] -class StringIterator { +class MyStringIterator { next() { return { done: true, @@ -28,4 +28,4 @@ class StringIterator { return this; } } -for (var v of new StringIterator) { } +for (var v of new MyStringIterator) { } diff --git a/tests/baselines/reference/for-of35.symbols b/tests/baselines/reference/for-of35.symbols index dd35d74df2817..4f8aa152e0163 100644 --- a/tests/baselines/reference/for-of35.symbols +++ b/tests/baselines/reference/for-of35.symbols @@ -1,11 +1,11 @@ //// [tests/cases/conformance/es6/for-ofStatements/for-of35.ts] //// === for-of35.ts === -class StringIterator { ->StringIterator : Symbol(StringIterator, Decl(for-of35.ts, 0, 0)) +class MyStringIterator { +>MyStringIterator : Symbol(MyStringIterator, Decl(for-of35.ts, 0, 0)) next() { ->next : Symbol(StringIterator.next, Decl(for-of35.ts, 0, 22)) +>next : Symbol(MyStringIterator.next, Decl(for-of35.ts, 0, 24)) return { done: true, @@ -18,17 +18,17 @@ class StringIterator { } [Symbol.iterator]() { ->[Symbol.iterator] : Symbol(StringIterator[Symbol.iterator], Decl(for-of35.ts, 6, 5)) +>[Symbol.iterator] : Symbol(MyStringIterator[Symbol.iterator], Decl(for-of35.ts, 6, 5)) >Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.es2015.iterable.d.ts, --, --)) >Symbol : Symbol(Symbol, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) >iterator : Symbol(SymbolConstructor.iterator, Decl(lib.es2015.iterable.d.ts, --, --)) return this; ->this : Symbol(StringIterator, Decl(for-of35.ts, 0, 0)) +>this : Symbol(MyStringIterator, Decl(for-of35.ts, 0, 0)) } } -for (var v of new StringIterator) { } +for (var v of new MyStringIterator) { } >v : Symbol(v, Decl(for-of35.ts, 13, 8)) ->StringIterator : Symbol(StringIterator, Decl(for-of35.ts, 0, 0)) +>MyStringIterator : Symbol(MyStringIterator, Decl(for-of35.ts, 0, 0)) diff --git a/tests/baselines/reference/for-of35.types b/tests/baselines/reference/for-of35.types index d8d5b51f4a132..6f458f5fce0b9 100644 --- a/tests/baselines/reference/for-of35.types +++ b/tests/baselines/reference/for-of35.types @@ -1,9 +1,9 @@ //// [tests/cases/conformance/es6/for-ofStatements/for-of35.ts] //// === for-of35.ts === -class StringIterator { ->StringIterator : StringIterator -> : ^^^^^^^^^^^^^^ +class MyStringIterator { +>MyStringIterator : MyStringIterator +> : ^^^^^^^^^^^^^^^^ next() { >next : () => any @@ -43,11 +43,11 @@ class StringIterator { } } -for (var v of new StringIterator) { } +for (var v of new MyStringIterator) { } >v : any > : ^^^ ->new StringIterator : StringIterator -> : ^^^^^^^^^^^^^^ ->StringIterator : typeof StringIterator -> : ^^^^^^^^^^^^^^^^^^^^^ +>new MyStringIterator : MyStringIterator +> : ^^^^^^^^^^^^^^^^ +>MyStringIterator : typeof MyStringIterator +> : ^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/baselines/reference/generatorReturnTypeInference.types b/tests/baselines/reference/generatorReturnTypeInference.types index e6249102d6437..6f13c13bc8435 100644 --- a/tests/baselines/reference/generatorReturnTypeInference.types +++ b/tests/baselines/reference/generatorReturnTypeInference.types @@ -40,8 +40,8 @@ function* g002() { // Generator } function* g003() { // Generator ->g003 : () => Generator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>g003 : () => Generator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ yield* []; >yield* [] : any diff --git a/tests/baselines/reference/generatorReturnTypeInferenceNonStrict.types b/tests/baselines/reference/generatorReturnTypeInferenceNonStrict.types index 03155f5fd2b4e..cd4c2569fbe6b 100644 --- a/tests/baselines/reference/generatorReturnTypeInferenceNonStrict.types +++ b/tests/baselines/reference/generatorReturnTypeInferenceNonStrict.types @@ -40,8 +40,8 @@ function* g002() { // Generator } function* g003() { // Generator ->g003 : () => Generator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>g003 : () => Generator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // NOTE: In strict mode, `[]` produces the type `never[]`. // In non-strict mode, `[]` produces the type `undefined[]` which is implicitly any. diff --git a/tests/baselines/reference/generatorTypeCheck22.types b/tests/baselines/reference/generatorTypeCheck22.types index f8f6580b45433..3e05be0eaa5d9 100644 --- a/tests/baselines/reference/generatorTypeCheck22.types +++ b/tests/baselines/reference/generatorTypeCheck22.types @@ -22,8 +22,8 @@ class Baz { z: number } > : ^^^^^^ function* g3() { ->g3 : () => Generator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>g3 : () => Generator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ yield; >yield : any diff --git a/tests/baselines/reference/generatorTypeCheck23.types b/tests/baselines/reference/generatorTypeCheck23.types index 50e76794cc437..2fdf66a6e6976 100644 --- a/tests/baselines/reference/generatorTypeCheck23.types +++ b/tests/baselines/reference/generatorTypeCheck23.types @@ -22,8 +22,8 @@ class Baz { z: number } > : ^^^^^^ function* g3() { ->g3 : () => Generator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>g3 : () => Generator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ yield; >yield : any diff --git a/tests/baselines/reference/generatorTypeCheck24.types b/tests/baselines/reference/generatorTypeCheck24.types index d0869e1134889..13bfe853c6d4b 100644 --- a/tests/baselines/reference/generatorTypeCheck24.types +++ b/tests/baselines/reference/generatorTypeCheck24.types @@ -22,8 +22,8 @@ class Baz { z: number } > : ^^^^^^ function* g3() { ->g3 : () => Generator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>g3 : () => Generator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ yield; >yield : any diff --git a/tests/baselines/reference/generatorTypeCheck25.errors.txt b/tests/baselines/reference/generatorTypeCheck25.errors.txt index 2113fedd55fd5..5a0fdf0fc791a 100644 --- a/tests/baselines/reference/generatorTypeCheck25.errors.txt +++ b/tests/baselines/reference/generatorTypeCheck25.errors.txt @@ -1,5 +1,5 @@ -generatorTypeCheck25.ts(4,5): error TS2322: Type '() => Generator' is not assignable to type '() => Iterable'. - Call signature return types 'Generator' and 'Iterable' are incompatible. +generatorTypeCheck25.ts(4,5): error TS2322: Type '() => Generator' is not assignable to type '() => Iterable'. + Call signature return types 'Generator' and 'Iterable' are incompatible. The types returned by '[Symbol.iterator]().next(...)' are incompatible between these types. Type 'IteratorResult' is not assignable to type 'IteratorResult'. Type 'IteratorYieldResult' is not assignable to type 'IteratorResult'. @@ -14,8 +14,8 @@ generatorTypeCheck25.ts(4,5): error TS2322: Type '() => Generator Iterable = function* () { ~~ -!!! error TS2322: Type '() => Generator' is not assignable to type '() => Iterable'. -!!! error TS2322: Call signature return types 'Generator' and 'Iterable' are incompatible. +!!! error TS2322: Type '() => Generator' is not assignable to type '() => Iterable'. +!!! error TS2322: Call signature return types 'Generator' and 'Iterable' are incompatible. !!! error TS2322: The types returned by '[Symbol.iterator]().next(...)' are incompatible between these types. !!! error TS2322: Type 'IteratorResult' is not assignable to type 'IteratorResult'. !!! error TS2322: Type 'IteratorYieldResult' is not assignable to type 'IteratorResult'. diff --git a/tests/baselines/reference/generatorTypeCheck25.types b/tests/baselines/reference/generatorTypeCheck25.types index 322bb4b92688c..65a5e73672b80 100644 --- a/tests/baselines/reference/generatorTypeCheck25.types +++ b/tests/baselines/reference/generatorTypeCheck25.types @@ -24,8 +24,8 @@ class Baz { z: number } var g3: () => Iterable = function* () { >g3 : () => Iterable > : ^^^^^^ ->function* () { yield; yield new Bar; yield new Baz; yield *[new Bar]; yield *[new Baz];} : () => Generator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>function* () { yield; yield new Bar; yield new Baz; yield *[new Bar]; yield *[new Baz];} : () => Generator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ yield; >yield : any diff --git a/tests/baselines/reference/generatorTypeCheck53.types b/tests/baselines/reference/generatorTypeCheck53.types index 308c3c45f0e42..96cfa3ff36c4a 100644 --- a/tests/baselines/reference/generatorTypeCheck53.types +++ b/tests/baselines/reference/generatorTypeCheck53.types @@ -14,8 +14,8 @@ class Baz { z: number } > : ^^^^^^ function* g() { ->g : () => Generator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>g : () => Generator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ yield new Foo; >yield new Foo : any diff --git a/tests/baselines/reference/generatorTypeCheck54.types b/tests/baselines/reference/generatorTypeCheck54.types index 3162d1537f12c..fc37b2ba451f0 100644 --- a/tests/baselines/reference/generatorTypeCheck54.types +++ b/tests/baselines/reference/generatorTypeCheck54.types @@ -14,8 +14,8 @@ class Baz { z: number } > : ^^^^^^ function* g() { ->g : () => Generator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>g : () => Generator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ yield* [new Foo]; >yield* [new Foo] : any diff --git a/tests/baselines/reference/importHelpersNoHelpersForAsyncGenerators.types b/tests/baselines/reference/importHelpersNoHelpersForAsyncGenerators.types index 3bf6420170b9d..9d221f738586b 100644 --- a/tests/baselines/reference/importHelpersNoHelpersForAsyncGenerators.types +++ b/tests/baselines/reference/importHelpersNoHelpersForAsyncGenerators.types @@ -2,8 +2,8 @@ === main.ts === export async function * f() { ->f : () => AsyncGenerator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>f : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ await 1; >await 1 : 1 diff --git a/tests/baselines/reference/indirectGlobalSymbolPartOfObjectType.types b/tests/baselines/reference/indirectGlobalSymbolPartOfObjectType.types index 65c655b1ea332..56cc1e8004baa 100644 --- a/tests/baselines/reference/indirectGlobalSymbolPartOfObjectType.types +++ b/tests/baselines/reference/indirectGlobalSymbolPartOfObjectType.types @@ -13,8 +13,8 @@ const Symbol = globalThis.Symbol; > : ^^^^^^^^^^^^^^^^^ [][Symbol.iterator]; ->[][Symbol.iterator] : () => BuiltinIterator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>[][Symbol.iterator] : () => ArrayIterator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >[] : undefined[] > : ^^^^^^^^^^^ >Symbol.iterator : unique symbol diff --git a/tests/baselines/reference/inferFromGenericFunctionReturnTypes3.types b/tests/baselines/reference/inferFromGenericFunctionReturnTypes3.types index c4a3eace14466..e20de1c2bbd86 100644 --- a/tests/baselines/reference/inferFromGenericFunctionReturnTypes3.types +++ b/tests/baselines/reference/inferFromGenericFunctionReturnTypes3.types @@ -1,5 +1,8 @@ //// [tests/cases/compiler/inferFromGenericFunctionReturnTypes3.ts] //// +=== Performance Stats === +Type Count: 1,000 + === inferFromGenericFunctionReturnTypes3.ts === // Repros from #5487 diff --git a/tests/baselines/reference/iterableTReturnTNext(strictbuiltiniteratorreturn=false).js b/tests/baselines/reference/iterableTReturnTNext(strictbuiltiniteratorreturn=false).js index b79d0bfee7fa5..9a58042032979 100644 --- a/tests/baselines/reference/iterableTReturnTNext(strictbuiltiniteratorreturn=false).js +++ b/tests/baselines/reference/iterableTReturnTNext(strictbuiltiniteratorreturn=false).js @@ -37,9 +37,9 @@ class MyMap implements Map { get(key: string): number | undefined { return undefined; } has(key: string): boolean { return false; } set(key: string, value: number): this { return this; } - entries(): BuiltinIterator<[string, number], BuiltinIteratorReturn> { throw new Error("Method not implemented."); } - keys(): BuiltinIterator { throw new Error("Method not implemented."); } - [Symbol.iterator](): BuiltinIterator<[string, number], BuiltinIteratorReturn> { throw new Error("Method not implemented."); } + entries(): MapIterator<[string, number]> { throw new Error("Method not implemented."); } + keys(): MapIterator { throw new Error("Method not implemented."); } + [Symbol.iterator](): MapIterator<[string, number]> { throw new Error("Method not implemented."); } // error when strictBuiltinIteratorReturn is true because values() has implicit `void` return, which isn't assignable to `undefined` * values() { diff --git a/tests/baselines/reference/iterableTReturnTNext(strictbuiltiniteratorreturn=false).symbols b/tests/baselines/reference/iterableTReturnTNext(strictbuiltiniteratorreturn=false).symbols index c1e1de41c3035..1806f8d645812 100644 --- a/tests/baselines/reference/iterableTReturnTNext(strictbuiltiniteratorreturn=false).symbols +++ b/tests/baselines/reference/iterableTReturnTNext(strictbuiltiniteratorreturn=false).symbols @@ -118,30 +118,27 @@ class MyMap implements Map { >value : Symbol(value, Decl(iterableTReturnTNext.ts, 35, 20)) >this : Symbol(MyMap, Decl(iterableTReturnTNext.ts, 21, 57)) - entries(): BuiltinIterator<[string, number], BuiltinIteratorReturn> { throw new Error("Method not implemented."); } + entries(): MapIterator<[string, number]> { throw new Error("Method not implemented."); } >entries : Symbol(MyMap.entries, Decl(iterableTReturnTNext.ts, 35, 58)) ->BuiltinIterator : Symbol(BuiltinIterator, Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --)) ->BuiltinIteratorReturn : Symbol(BuiltinIteratorReturn, Decl(lib.es2015.iterable.d.ts, --, --)) +>MapIterator : Symbol(MapIterator, Decl(lib.es2015.iterable.d.ts, --, --)) >Error : Symbol(Error, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2022.error.d.ts, --, --)) - keys(): BuiltinIterator { throw new Error("Method not implemented."); } ->keys : Symbol(MyMap.keys, Decl(iterableTReturnTNext.ts, 36, 119)) ->BuiltinIterator : Symbol(BuiltinIterator, Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --)) ->BuiltinIteratorReturn : Symbol(BuiltinIteratorReturn, Decl(lib.es2015.iterable.d.ts, --, --)) + keys(): MapIterator { throw new Error("Method not implemented."); } +>keys : Symbol(MyMap.keys, Decl(iterableTReturnTNext.ts, 36, 92)) +>MapIterator : Symbol(MapIterator, Decl(lib.es2015.iterable.d.ts, --, --)) >Error : Symbol(Error, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2022.error.d.ts, --, --)) - [Symbol.iterator](): BuiltinIterator<[string, number], BuiltinIteratorReturn> { throw new Error("Method not implemented."); } ->[Symbol.iterator] : Symbol(MyMap[Symbol.iterator], Decl(iterableTReturnTNext.ts, 37, 106)) + [Symbol.iterator](): MapIterator<[string, number]> { throw new Error("Method not implemented."); } +>[Symbol.iterator] : Symbol(MyMap[Symbol.iterator], Decl(iterableTReturnTNext.ts, 37, 79)) >Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.es2015.iterable.d.ts, --, --)) >Symbol : Symbol(Symbol, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2019.symbol.d.ts, --, --)) >iterator : Symbol(SymbolConstructor.iterator, Decl(lib.es2015.iterable.d.ts, --, --)) ->BuiltinIterator : Symbol(BuiltinIterator, Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --)) ->BuiltinIteratorReturn : Symbol(BuiltinIteratorReturn, Decl(lib.es2015.iterable.d.ts, --, --)) +>MapIterator : Symbol(MapIterator, Decl(lib.es2015.iterable.d.ts, --, --)) >Error : Symbol(Error, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2022.error.d.ts, --, --)) // error when strictBuiltinIteratorReturn is true because values() has implicit `void` return, which isn't assignable to `undefined` * values() { ->values : Symbol(MyMap.values, Decl(iterableTReturnTNext.ts, 38, 129)) +>values : Symbol(MyMap.values, Decl(iterableTReturnTNext.ts, 38, 102)) yield* this._values; >this._values : Symbol(MyMap._values, Decl(iterableTReturnTNext.ts, 25, 36)) diff --git a/tests/baselines/reference/iterableTReturnTNext(strictbuiltiniteratorreturn=false).types b/tests/baselines/reference/iterableTReturnTNext(strictbuiltiniteratorreturn=false).types index 64293b894dba4..881e9e6a2af25 100644 --- a/tests/baselines/reference/iterableTReturnTNext(strictbuiltiniteratorreturn=false).types +++ b/tests/baselines/reference/iterableTReturnTNext(strictbuiltiniteratorreturn=false).types @@ -18,18 +18,18 @@ const r1: number = map.values().next().value; // error when strictBuiltinIterato >map.values().next().value : any >map.values().next() : IteratorResult > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->map.values().next : (...[value]: [] | [any]) => IteratorResult -> : ^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->map.values() : BuiltinIterator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->map.values : () => BuiltinIterator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>map.values().next : (...[value]: [] | [unknown]) => IteratorResult +> : ^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>map.values() : MapIterator +> : ^^^^^^^^^^^^^^^^^^^ +>map.values : () => MapIterator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^ >map : Map > : ^^^^^^^^^^^^^^^^^^^ ->values : () => BuiltinIterator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->next : (...[value]: [] | [any]) => IteratorResult -> : ^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>values : () => MapIterator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^ +>next : (...[value]: [] | [unknown]) => IteratorResult +> : ^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >value : any > : ^^^ @@ -48,18 +48,18 @@ const r2: Next = map.values().next(); // error when strictBuiltinIterato > : ^^^^^^^^^^^^ >map.values().next() : IteratorResult > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->map.values().next : (...[value]: [] | [any]) => IteratorResult -> : ^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->map.values() : BuiltinIterator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->map.values : () => BuiltinIterator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>map.values().next : (...[value]: [] | [unknown]) => IteratorResult +> : ^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>map.values() : MapIterator +> : ^^^^^^^^^^^^^^^^^^^ +>map.values : () => MapIterator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^ >map : Map > : ^^^^^^^^^^^^^^^^^^^ ->values : () => BuiltinIterator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->next : (...[value]: [] | [any]) => IteratorResult -> : ^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>values : () => MapIterator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^ +>next : (...[value]: [] | [unknown]) => IteratorResult +> : ^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // based on: https://github.com/graphql/graphql-js/blob/e15c3ec4dc21d9fd1df34fe9798cadf3bf02c6ea/src/execution/__tests__/mapAsyncIterable-test.ts#L175 async function* source() { yield 1; yield 2; yield 3; } @@ -100,18 +100,18 @@ const r3: number | undefined = set.values().next().value; >set.values().next().value : any >set.values().next() : IteratorResult > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->set.values().next : (...[value]: [] | [any]) => IteratorResult -> : ^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->set.values() : BuiltinIterator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->set.values : () => BuiltinIterator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>set.values().next : (...[value]: [] | [unknown]) => IteratorResult +> : ^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>set.values() : SetIterator +> : ^^^^^^^^^^^^^^^^^^^ +>set.values : () => SetIterator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^ >set : Set > : ^^^^^^^^^^^ ->values : () => BuiltinIterator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->next : (...[value]: [] | [any]) => IteratorResult -> : ^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>values : () => SetIterator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^ +>next : (...[value]: [] | [unknown]) => IteratorResult +> : ^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >value : any > : ^^^ @@ -193,9 +193,9 @@ class MyMap implements Map { >this : this > : ^^^^ - entries(): BuiltinIterator<[string, number], BuiltinIteratorReturn> { throw new Error("Method not implemented."); } ->entries : () => BuiltinIterator<[string, number], BuiltinIteratorReturn> -> : ^^^^^^ + entries(): MapIterator<[string, number]> { throw new Error("Method not implemented."); } +>entries : () => MapIterator<[string, number]> +> : ^^^^^^ >new Error("Method not implemented.") : Error > : ^^^^^ >Error : ErrorConstructor @@ -203,9 +203,9 @@ class MyMap implements Map { >"Method not implemented." : "Method not implemented." > : ^^^^^^^^^^^^^^^^^^^^^^^^^ - keys(): BuiltinIterator { throw new Error("Method not implemented."); } ->keys : () => BuiltinIterator -> : ^^^^^^ + keys(): MapIterator { throw new Error("Method not implemented."); } +>keys : () => MapIterator +> : ^^^^^^ >new Error("Method not implemented.") : Error > : ^^^^^ >Error : ErrorConstructor @@ -213,9 +213,9 @@ class MyMap implements Map { >"Method not implemented." : "Method not implemented." > : ^^^^^^^^^^^^^^^^^^^^^^^^^ - [Symbol.iterator](): BuiltinIterator<[string, number], BuiltinIteratorReturn> { throw new Error("Method not implemented."); } ->[Symbol.iterator] : () => BuiltinIterator<[string, number], BuiltinIteratorReturn> -> : ^^^^^^ + [Symbol.iterator](): MapIterator<[string, number]> { throw new Error("Method not implemented."); } +>[Symbol.iterator] : () => MapIterator<[string, number]> +> : ^^^^^^ >Symbol.iterator : unique symbol > : ^^^^^^^^^^^^^ >Symbol : SymbolConstructor @@ -231,8 +231,8 @@ class MyMap implements Map { // error when strictBuiltinIteratorReturn is true because values() has implicit `void` return, which isn't assignable to `undefined` * values() { ->values : () => Generator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>values : () => Generator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ yield* this._values; >yield* this._values : any diff --git a/tests/baselines/reference/iterableTReturnTNext(strictbuiltiniteratorreturn=true).errors.txt b/tests/baselines/reference/iterableTReturnTNext(strictbuiltiniteratorreturn=true).errors.txt index 4912e19f699a7..00a1ae1a8d330 100644 --- a/tests/baselines/reference/iterableTReturnTNext(strictbuiltiniteratorreturn=true).errors.txt +++ b/tests/baselines/reference/iterableTReturnTNext(strictbuiltiniteratorreturn=true).errors.txt @@ -5,8 +5,8 @@ iterableTReturnTNext.ts(14,7): error TS2322: Type 'IteratorResult'. - Type '() => Generator' is not assignable to type '() => BuiltinIterator'. - Call signature return types 'Generator' and 'BuiltinIterator' are incompatible. + Type '() => Generator' is not assignable to type '() => MapIterator'. + Call signature return types 'Generator' and 'MapIterator' are incompatible. The types returned by 'next(...)' are incompatible between these types. Type 'IteratorResult' is not assignable to type 'IteratorResult'. Type 'IteratorReturnResult' is not assignable to type 'IteratorResult'. @@ -59,16 +59,16 @@ iterableTReturnTNext.ts(42,7): error TS2416: Property 'values' in type 'MyMap' i get(key: string): number | undefined { return undefined; } has(key: string): boolean { return false; } set(key: string, value: number): this { return this; } - entries(): BuiltinIterator<[string, number], BuiltinIteratorReturn> { throw new Error("Method not implemented."); } - keys(): BuiltinIterator { throw new Error("Method not implemented."); } - [Symbol.iterator](): BuiltinIterator<[string, number], BuiltinIteratorReturn> { throw new Error("Method not implemented."); } + entries(): MapIterator<[string, number]> { throw new Error("Method not implemented."); } + keys(): MapIterator { throw new Error("Method not implemented."); } + [Symbol.iterator](): MapIterator<[string, number]> { throw new Error("Method not implemented."); } // error when strictBuiltinIteratorReturn is true because values() has implicit `void` return, which isn't assignable to `undefined` * values() { ~~~~~~ !!! error TS2416: Property 'values' in type 'MyMap' is not assignable to the same property in base type 'Map'. -!!! error TS2416: Type '() => Generator' is not assignable to type '() => BuiltinIterator'. -!!! error TS2416: Call signature return types 'Generator' and 'BuiltinIterator' are incompatible. +!!! error TS2416: Type '() => Generator' is not assignable to type '() => MapIterator'. +!!! error TS2416: Call signature return types 'Generator' and 'MapIterator' are incompatible. !!! error TS2416: The types returned by 'next(...)' are incompatible between these types. !!! error TS2416: Type 'IteratorResult' is not assignable to type 'IteratorResult'. !!! error TS2416: Type 'IteratorReturnResult' is not assignable to type 'IteratorResult'. diff --git a/tests/baselines/reference/iterableTReturnTNext(strictbuiltiniteratorreturn=true).js b/tests/baselines/reference/iterableTReturnTNext(strictbuiltiniteratorreturn=true).js index b79d0bfee7fa5..9a58042032979 100644 --- a/tests/baselines/reference/iterableTReturnTNext(strictbuiltiniteratorreturn=true).js +++ b/tests/baselines/reference/iterableTReturnTNext(strictbuiltiniteratorreturn=true).js @@ -37,9 +37,9 @@ class MyMap implements Map { get(key: string): number | undefined { return undefined; } has(key: string): boolean { return false; } set(key: string, value: number): this { return this; } - entries(): BuiltinIterator<[string, number], BuiltinIteratorReturn> { throw new Error("Method not implemented."); } - keys(): BuiltinIterator { throw new Error("Method not implemented."); } - [Symbol.iterator](): BuiltinIterator<[string, number], BuiltinIteratorReturn> { throw new Error("Method not implemented."); } + entries(): MapIterator<[string, number]> { throw new Error("Method not implemented."); } + keys(): MapIterator { throw new Error("Method not implemented."); } + [Symbol.iterator](): MapIterator<[string, number]> { throw new Error("Method not implemented."); } // error when strictBuiltinIteratorReturn is true because values() has implicit `void` return, which isn't assignable to `undefined` * values() { diff --git a/tests/baselines/reference/iterableTReturnTNext(strictbuiltiniteratorreturn=true).symbols b/tests/baselines/reference/iterableTReturnTNext(strictbuiltiniteratorreturn=true).symbols index c1e1de41c3035..1806f8d645812 100644 --- a/tests/baselines/reference/iterableTReturnTNext(strictbuiltiniteratorreturn=true).symbols +++ b/tests/baselines/reference/iterableTReturnTNext(strictbuiltiniteratorreturn=true).symbols @@ -118,30 +118,27 @@ class MyMap implements Map { >value : Symbol(value, Decl(iterableTReturnTNext.ts, 35, 20)) >this : Symbol(MyMap, Decl(iterableTReturnTNext.ts, 21, 57)) - entries(): BuiltinIterator<[string, number], BuiltinIteratorReturn> { throw new Error("Method not implemented."); } + entries(): MapIterator<[string, number]> { throw new Error("Method not implemented."); } >entries : Symbol(MyMap.entries, Decl(iterableTReturnTNext.ts, 35, 58)) ->BuiltinIterator : Symbol(BuiltinIterator, Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --)) ->BuiltinIteratorReturn : Symbol(BuiltinIteratorReturn, Decl(lib.es2015.iterable.d.ts, --, --)) +>MapIterator : Symbol(MapIterator, Decl(lib.es2015.iterable.d.ts, --, --)) >Error : Symbol(Error, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2022.error.d.ts, --, --)) - keys(): BuiltinIterator { throw new Error("Method not implemented."); } ->keys : Symbol(MyMap.keys, Decl(iterableTReturnTNext.ts, 36, 119)) ->BuiltinIterator : Symbol(BuiltinIterator, Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --)) ->BuiltinIteratorReturn : Symbol(BuiltinIteratorReturn, Decl(lib.es2015.iterable.d.ts, --, --)) + keys(): MapIterator { throw new Error("Method not implemented."); } +>keys : Symbol(MyMap.keys, Decl(iterableTReturnTNext.ts, 36, 92)) +>MapIterator : Symbol(MapIterator, Decl(lib.es2015.iterable.d.ts, --, --)) >Error : Symbol(Error, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2022.error.d.ts, --, --)) - [Symbol.iterator](): BuiltinIterator<[string, number], BuiltinIteratorReturn> { throw new Error("Method not implemented."); } ->[Symbol.iterator] : Symbol(MyMap[Symbol.iterator], Decl(iterableTReturnTNext.ts, 37, 106)) + [Symbol.iterator](): MapIterator<[string, number]> { throw new Error("Method not implemented."); } +>[Symbol.iterator] : Symbol(MyMap[Symbol.iterator], Decl(iterableTReturnTNext.ts, 37, 79)) >Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.es2015.iterable.d.ts, --, --)) >Symbol : Symbol(Symbol, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2019.symbol.d.ts, --, --)) >iterator : Symbol(SymbolConstructor.iterator, Decl(lib.es2015.iterable.d.ts, --, --)) ->BuiltinIterator : Symbol(BuiltinIterator, Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --)) ->BuiltinIteratorReturn : Symbol(BuiltinIteratorReturn, Decl(lib.es2015.iterable.d.ts, --, --)) +>MapIterator : Symbol(MapIterator, Decl(lib.es2015.iterable.d.ts, --, --)) >Error : Symbol(Error, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2022.error.d.ts, --, --)) // error when strictBuiltinIteratorReturn is true because values() has implicit `void` return, which isn't assignable to `undefined` * values() { ->values : Symbol(MyMap.values, Decl(iterableTReturnTNext.ts, 38, 129)) +>values : Symbol(MyMap.values, Decl(iterableTReturnTNext.ts, 38, 102)) yield* this._values; >this._values : Symbol(MyMap._values, Decl(iterableTReturnTNext.ts, 25, 36)) diff --git a/tests/baselines/reference/iterableTReturnTNext(strictbuiltiniteratorreturn=true).types b/tests/baselines/reference/iterableTReturnTNext(strictbuiltiniteratorreturn=true).types index 71a1e6da57570..a18a9d65133f7 100644 --- a/tests/baselines/reference/iterableTReturnTNext(strictbuiltiniteratorreturn=true).types +++ b/tests/baselines/reference/iterableTReturnTNext(strictbuiltiniteratorreturn=true).types @@ -19,18 +19,18 @@ const r1: number = map.values().next().value; // error when strictBuiltinIterato > : ^^^^^^^^^^^^^^^^^^ >map.values().next() : IteratorResult > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->map.values().next : (...[value]: [] | [any]) => IteratorResult -> : ^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->map.values() : BuiltinIterator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->map.values : () => BuiltinIterator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>map.values().next : (...[value]: [] | [unknown]) => IteratorResult +> : ^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>map.values() : MapIterator +> : ^^^^^^^^^^^^^^^^^^^ +>map.values : () => MapIterator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^ >map : Map > : ^^^^^^^^^^^^^^^^^^^ ->values : () => BuiltinIterator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->next : (...[value]: [] | [any]) => IteratorResult -> : ^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>values : () => MapIterator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^ +>next : (...[value]: [] | [unknown]) => IteratorResult +> : ^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >value : number | undefined > : ^^^^^^^^^^^^^^^^^^ @@ -49,18 +49,18 @@ const r2: Next = map.values().next(); // error when strictBuiltinIterato > : ^^^^^^^^^^^^ >map.values().next() : IteratorResult > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->map.values().next : (...[value]: [] | [any]) => IteratorResult -> : ^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->map.values() : BuiltinIterator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->map.values : () => BuiltinIterator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>map.values().next : (...[value]: [] | [unknown]) => IteratorResult +> : ^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>map.values() : MapIterator +> : ^^^^^^^^^^^^^^^^^^^ +>map.values : () => MapIterator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^ >map : Map > : ^^^^^^^^^^^^^^^^^^^ ->values : () => BuiltinIterator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->next : (...[value]: [] | [any]) => IteratorResult -> : ^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>values : () => MapIterator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^ +>next : (...[value]: [] | [unknown]) => IteratorResult +> : ^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // based on: https://github.com/graphql/graphql-js/blob/e15c3ec4dc21d9fd1df34fe9798cadf3bf02c6ea/src/execution/__tests__/mapAsyncIterable-test.ts#L175 async function* source() { yield 1; yield 2; yield 3; } @@ -105,18 +105,18 @@ const r3: number | undefined = set.values().next().value; > : ^^^^^^^^^^^^^^^^^^ >set.values().next() : IteratorResult > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->set.values().next : (...[value]: [] | [any]) => IteratorResult -> : ^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->set.values() : BuiltinIterator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->set.values : () => BuiltinIterator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>set.values().next : (...[value]: [] | [unknown]) => IteratorResult +> : ^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>set.values() : SetIterator +> : ^^^^^^^^^^^^^^^^^^^ +>set.values : () => SetIterator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^ >set : Set > : ^^^^^^^^^^^ ->values : () => BuiltinIterator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->next : (...[value]: [] | [any]) => IteratorResult -> : ^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>values : () => SetIterator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^ +>next : (...[value]: [] | [unknown]) => IteratorResult +> : ^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >value : number | undefined > : ^^^^^^^^^^^^^^^^^^ @@ -199,9 +199,9 @@ class MyMap implements Map { >this : this > : ^^^^ - entries(): BuiltinIterator<[string, number], BuiltinIteratorReturn> { throw new Error("Method not implemented."); } ->entries : () => BuiltinIterator<[string, number], BuiltinIteratorReturn> -> : ^^^^^^ + entries(): MapIterator<[string, number]> { throw new Error("Method not implemented."); } +>entries : () => MapIterator<[string, number]> +> : ^^^^^^ >new Error("Method not implemented.") : Error > : ^^^^^ >Error : ErrorConstructor @@ -209,9 +209,9 @@ class MyMap implements Map { >"Method not implemented." : "Method not implemented." > : ^^^^^^^^^^^^^^^^^^^^^^^^^ - keys(): BuiltinIterator { throw new Error("Method not implemented."); } ->keys : () => BuiltinIterator -> : ^^^^^^ + keys(): MapIterator { throw new Error("Method not implemented."); } +>keys : () => MapIterator +> : ^^^^^^ >new Error("Method not implemented.") : Error > : ^^^^^ >Error : ErrorConstructor @@ -219,9 +219,9 @@ class MyMap implements Map { >"Method not implemented." : "Method not implemented." > : ^^^^^^^^^^^^^^^^^^^^^^^^^ - [Symbol.iterator](): BuiltinIterator<[string, number], BuiltinIteratorReturn> { throw new Error("Method not implemented."); } ->[Symbol.iterator] : () => BuiltinIterator<[string, number], BuiltinIteratorReturn> -> : ^^^^^^ + [Symbol.iterator](): MapIterator<[string, number]> { throw new Error("Method not implemented."); } +>[Symbol.iterator] : () => MapIterator<[string, number]> +> : ^^^^^^ >Symbol.iterator : unique symbol > : ^^^^^^^^^^^^^ >Symbol : SymbolConstructor @@ -237,8 +237,8 @@ class MyMap implements Map { // error when strictBuiltinIteratorReturn is true because values() has implicit `void` return, which isn't assignable to `undefined` * values() { ->values : () => Generator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>values : () => Generator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ yield* this._values; >yield* this._values : undefined diff --git a/tests/baselines/reference/mappedTypeWithAsClauseAndLateBoundProperty.errors.txt b/tests/baselines/reference/mappedTypeWithAsClauseAndLateBoundProperty.errors.txt index bca4e124b9ed3..2dae16154f20d 100644 --- a/tests/baselines/reference/mappedTypeWithAsClauseAndLateBoundProperty.errors.txt +++ b/tests/baselines/reference/mappedTypeWithAsClauseAndLateBoundProperty.errors.txt @@ -1,4 +1,4 @@ -mappedTypeWithAsClauseAndLateBoundProperty.ts(3,1): error TS2741: Property 'length' is missing in type '{ [x: number]: number; toString: () => string; toLocaleString: { (): string; (locales: string | string[], options?: NumberFormatOptions & DateTimeFormatOptions): string; }; pop: () => number; push: (...items: number[]) => number; concat: { (...items: ConcatArray[]): number[]; (...items: (number | ConcatArray)[]): number[]; }; join: (separator?: string) => string; reverse: () => number[]; shift: () => number; slice: (start?: number, end?: number) => number[]; sort: (compareFn?: (a: number, b: number) => number) => number[]; splice: { (start: number, deleteCount?: number): number[]; (start: number, deleteCount: number, ...items: number[]): number[]; }; unshift: (...items: number[]) => number; indexOf: (searchElement: number, fromIndex?: number) => number; lastIndexOf: (searchElement: number, fromIndex?: number) => number; every: { (predicate: (value: number, index: number, array: number[]) => value is S, thisArg?: any): this is S[]; (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any): boolean; }; some: (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any) => boolean; forEach: (callbackfn: (value: number, index: number, array: number[]) => void, thisArg?: any) => void; map: (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[]; filter: { (predicate: (value: number, index: number, array: number[]) => value is S, thisArg?: any): S[]; (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any): number[]; }; reduce: { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number): number; (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue: number): number; (callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; }; reduceRight: { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number): number; (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue: number): number; (callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; }; find: { (predicate: (value: number, index: number, obj: number[]) => value is S, thisArg?: any): S; (predicate: (value: number, index: number, obj: number[]) => unknown, thisArg?: any): number; }; findIndex: (predicate: (value: number, index: number, obj: number[]) => unknown, thisArg?: any) => number; fill: (value: number, start?: number, end?: number) => number[]; copyWithin: (target: number, start: number, end?: number) => number[]; entries: () => BuiltinIterator<[number, number], any, any>; keys: () => BuiltinIterator; values: () => BuiltinIterator; includes: (searchElement: number, fromIndex?: number) => boolean; flatMap: (callback: (this: This, value: number, index: number, array: number[]) => U | readonly U[], thisArg?: This) => U[]; flat: (this: A, depth?: D) => FlatArray[]; [Symbol.iterator]: () => BuiltinIterator; readonly [Symbol.unscopables]: { [x: number]: boolean; length?: boolean; toString?: boolean; toLocaleString?: boolean; pop?: boolean; push?: boolean; concat?: boolean; join?: boolean; reverse?: boolean; shift?: boolean; slice?: boolean; sort?: boolean; splice?: boolean; unshift?: boolean; indexOf?: boolean; lastIndexOf?: boolean; every?: boolean; some?: boolean; forEach?: boolean; map?: boolean; filter?: boolean; reduce?: boolean; reduceRight?: boolean; find?: boolean; findIndex?: boolean; fill?: boolean; copyWithin?: boolean; entries?: boolean; keys?: boolean; values?: boolean; includes?: boolean; flatMap?: boolean; flat?: boolean; [Symbol.iterator]?: boolean; readonly [Symbol.unscopables]?: boolean; }; }' but required in type 'number[]'. +mappedTypeWithAsClauseAndLateBoundProperty.ts(3,1): error TS2741: Property 'length' is missing in type '{ [x: number]: number; toString: () => string; toLocaleString: { (): string; (locales: string | string[], options?: NumberFormatOptions & DateTimeFormatOptions): string; }; pop: () => number; push: (...items: number[]) => number; concat: { (...items: ConcatArray[]): number[]; (...items: (number | ConcatArray)[]): number[]; }; join: (separator?: string) => string; reverse: () => number[]; shift: () => number; slice: (start?: number, end?: number) => number[]; sort: (compareFn?: (a: number, b: number) => number) => number[]; splice: { (start: number, deleteCount?: number): number[]; (start: number, deleteCount: number, ...items: number[]): number[]; }; unshift: (...items: number[]) => number; indexOf: (searchElement: number, fromIndex?: number) => number; lastIndexOf: (searchElement: number, fromIndex?: number) => number; every: { (predicate: (value: number, index: number, array: number[]) => value is S, thisArg?: any): this is S[]; (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any): boolean; }; some: (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any) => boolean; forEach: (callbackfn: (value: number, index: number, array: number[]) => void, thisArg?: any) => void; map: (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[]; filter: { (predicate: (value: number, index: number, array: number[]) => value is S, thisArg?: any): S[]; (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any): number[]; }; reduce: { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number): number; (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue: number): number; (callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; }; reduceRight: { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number): number; (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue: number): number; (callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; }; find: { (predicate: (value: number, index: number, obj: number[]) => value is S, thisArg?: any): S; (predicate: (value: number, index: number, obj: number[]) => unknown, thisArg?: any): number; }; findIndex: (predicate: (value: number, index: number, obj: number[]) => unknown, thisArg?: any) => number; fill: (value: number, start?: number, end?: number) => number[]; copyWithin: (target: number, start: number, end?: number) => number[]; entries: () => ArrayIterator<[number, number]>; keys: () => ArrayIterator; values: () => ArrayIterator; includes: (searchElement: number, fromIndex?: number) => boolean; flatMap: (callback: (this: This, value: number, index: number, array: number[]) => U | readonly U[], thisArg?: This) => U[]; flat: (this: A, depth?: D) => FlatArray[]; [Symbol.iterator]: () => ArrayIterator; readonly [Symbol.unscopables]: { [x: number]: boolean; length?: boolean; toString?: boolean; toLocaleString?: boolean; pop?: boolean; push?: boolean; concat?: boolean; join?: boolean; reverse?: boolean; shift?: boolean; slice?: boolean; sort?: boolean; splice?: boolean; unshift?: boolean; indexOf?: boolean; lastIndexOf?: boolean; every?: boolean; some?: boolean; forEach?: boolean; map?: boolean; filter?: boolean; reduce?: boolean; reduceRight?: boolean; find?: boolean; findIndex?: boolean; fill?: boolean; copyWithin?: boolean; entries?: boolean; keys?: boolean; values?: boolean; includes?: boolean; flatMap?: boolean; flat?: boolean; [Symbol.iterator]?: boolean; readonly [Symbol.unscopables]?: boolean; }; }' but required in type 'number[]'. ==== mappedTypeWithAsClauseAndLateBoundProperty.ts (1 errors) ==== @@ -6,6 +6,6 @@ mappedTypeWithAsClauseAndLateBoundProperty.ts(3,1): error TS2741: Property 'leng declare let src2: { [K in keyof number[] as Exclude]: (number[])[K] }; tgt2 = src2; // Should error ~~~~ -!!! error TS2741: Property 'length' is missing in type '{ [x: number]: number; toString: () => string; toLocaleString: { (): string; (locales: string | string[], options?: NumberFormatOptions & DateTimeFormatOptions): string; }; pop: () => number; push: (...items: number[]) => number; concat: { (...items: ConcatArray[]): number[]; (...items: (number | ConcatArray)[]): number[]; }; join: (separator?: string) => string; reverse: () => number[]; shift: () => number; slice: (start?: number, end?: number) => number[]; sort: (compareFn?: (a: number, b: number) => number) => number[]; splice: { (start: number, deleteCount?: number): number[]; (start: number, deleteCount: number, ...items: number[]): number[]; }; unshift: (...items: number[]) => number; indexOf: (searchElement: number, fromIndex?: number) => number; lastIndexOf: (searchElement: number, fromIndex?: number) => number; every: { (predicate: (value: number, index: number, array: number[]) => value is S, thisArg?: any): this is S[]; (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any): boolean; }; some: (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any) => boolean; forEach: (callbackfn: (value: number, index: number, array: number[]) => void, thisArg?: any) => void; map: (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[]; filter: { (predicate: (value: number, index: number, array: number[]) => value is S, thisArg?: any): S[]; (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any): number[]; }; reduce: { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number): number; (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue: number): number; (callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; }; reduceRight: { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number): number; (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue: number): number; (callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; }; find: { (predicate: (value: number, index: number, obj: number[]) => value is S, thisArg?: any): S; (predicate: (value: number, index: number, obj: number[]) => unknown, thisArg?: any): number; }; findIndex: (predicate: (value: number, index: number, obj: number[]) => unknown, thisArg?: any) => number; fill: (value: number, start?: number, end?: number) => number[]; copyWithin: (target: number, start: number, end?: number) => number[]; entries: () => BuiltinIterator<[number, number], any, any>; keys: () => BuiltinIterator; values: () => BuiltinIterator; includes: (searchElement: number, fromIndex?: number) => boolean; flatMap: (callback: (this: This, value: number, index: number, array: number[]) => U | readonly U[], thisArg?: This) => U[]; flat: (this: A, depth?: D) => FlatArray[]; [Symbol.iterator]: () => BuiltinIterator; readonly [Symbol.unscopables]: { [x: number]: boolean; length?: boolean; toString?: boolean; toLocaleString?: boolean; pop?: boolean; push?: boolean; concat?: boolean; join?: boolean; reverse?: boolean; shift?: boolean; slice?: boolean; sort?: boolean; splice?: boolean; unshift?: boolean; indexOf?: boolean; lastIndexOf?: boolean; every?: boolean; some?: boolean; forEach?: boolean; map?: boolean; filter?: boolean; reduce?: boolean; reduceRight?: boolean; find?: boolean; findIndex?: boolean; fill?: boolean; copyWithin?: boolean; entries?: boolean; keys?: boolean; values?: boolean; includes?: boolean; flatMap?: boolean; flat?: boolean; [Symbol.iterator]?: boolean; readonly [Symbol.unscopables]?: boolean; }; }' but required in type 'number[]'. +!!! error TS2741: Property 'length' is missing in type '{ [x: number]: number; toString: () => string; toLocaleString: { (): string; (locales: string | string[], options?: NumberFormatOptions & DateTimeFormatOptions): string; }; pop: () => number; push: (...items: number[]) => number; concat: { (...items: ConcatArray[]): number[]; (...items: (number | ConcatArray)[]): number[]; }; join: (separator?: string) => string; reverse: () => number[]; shift: () => number; slice: (start?: number, end?: number) => number[]; sort: (compareFn?: (a: number, b: number) => number) => number[]; splice: { (start: number, deleteCount?: number): number[]; (start: number, deleteCount: number, ...items: number[]): number[]; }; unshift: (...items: number[]) => number; indexOf: (searchElement: number, fromIndex?: number) => number; lastIndexOf: (searchElement: number, fromIndex?: number) => number; every: { (predicate: (value: number, index: number, array: number[]) => value is S, thisArg?: any): this is S[]; (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any): boolean; }; some: (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any) => boolean; forEach: (callbackfn: (value: number, index: number, array: number[]) => void, thisArg?: any) => void; map: (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[]; filter: { (predicate: (value: number, index: number, array: number[]) => value is S, thisArg?: any): S[]; (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any): number[]; }; reduce: { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number): number; (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue: number): number; (callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; }; reduceRight: { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number): number; (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue: number): number; (callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; }; find: { (predicate: (value: number, index: number, obj: number[]) => value is S, thisArg?: any): S; (predicate: (value: number, index: number, obj: number[]) => unknown, thisArg?: any): number; }; findIndex: (predicate: (value: number, index: number, obj: number[]) => unknown, thisArg?: any) => number; fill: (value: number, start?: number, end?: number) => number[]; copyWithin: (target: number, start: number, end?: number) => number[]; entries: () => ArrayIterator<[number, number]>; keys: () => ArrayIterator; values: () => ArrayIterator; includes: (searchElement: number, fromIndex?: number) => boolean; flatMap: (callback: (this: This, value: number, index: number, array: number[]) => U | readonly U[], thisArg?: This) => U[]; flat: (this: A, depth?: D) => FlatArray[]; [Symbol.iterator]: () => ArrayIterator; readonly [Symbol.unscopables]: { [x: number]: boolean; length?: boolean; toString?: boolean; toLocaleString?: boolean; pop?: boolean; push?: boolean; concat?: boolean; join?: boolean; reverse?: boolean; shift?: boolean; slice?: boolean; sort?: boolean; splice?: boolean; unshift?: boolean; indexOf?: boolean; lastIndexOf?: boolean; every?: boolean; some?: boolean; forEach?: boolean; map?: boolean; filter?: boolean; reduce?: boolean; reduceRight?: boolean; find?: boolean; findIndex?: boolean; fill?: boolean; copyWithin?: boolean; entries?: boolean; keys?: boolean; values?: boolean; includes?: boolean; flatMap?: boolean; flat?: boolean; [Symbol.iterator]?: boolean; readonly [Symbol.unscopables]?: boolean; }; }' but required in type 'number[]'. !!! related TS2728 lib.es5.d.ts:--:--: 'length' is declared here. \ No newline at end of file diff --git a/tests/baselines/reference/mappedTypeWithAsClauseAndLateBoundProperty.types b/tests/baselines/reference/mappedTypeWithAsClauseAndLateBoundProperty.types index 7caab51892d4f..7dcab74e21c48 100644 --- a/tests/baselines/reference/mappedTypeWithAsClauseAndLateBoundProperty.types +++ b/tests/baselines/reference/mappedTypeWithAsClauseAndLateBoundProperty.types @@ -6,14 +6,14 @@ declare let tgt2: number[]; > : ^^^^^^^^ declare let src2: { [K in keyof number[] as Exclude]: (number[])[K] }; ->src2 : { [x: number]: number; toString: () => string; toLocaleString: { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions): string; }; pop: () => number; push: (...items: number[]) => number; concat: { (...items: ConcatArray[]): number[]; (...items: (number | ConcatArray)[]): number[]; }; join: (separator?: string) => string; reverse: () => number[]; shift: () => number; slice: (start?: number, end?: number) => number[]; sort: (compareFn?: (a: number, b: number) => number) => number[]; splice: { (start: number, deleteCount?: number): number[]; (start: number, deleteCount: number, ...items: number[]): number[]; }; unshift: (...items: number[]) => number; indexOf: (searchElement: number, fromIndex?: number) => number; lastIndexOf: (searchElement: number, fromIndex?: number) => number; every: { (predicate: (value: number, index: number, array: number[]) => value is S, thisArg?: any): this is S[]; (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any): boolean; }; some: (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any) => boolean; forEach: (callbackfn: (value: number, index: number, array: number[]) => void, thisArg?: any) => void; map: (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[]; filter: { (predicate: (value: number, index: number, array: number[]) => value is S, thisArg?: any): S[]; (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any): number[]; }; reduce: { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number): number; (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue: number): number; (callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; }; reduceRight: { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number): number; (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue: number): number; (callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; }; find: { (predicate: (value: number, index: number, obj: number[]) => value is S, thisArg?: any): S; (predicate: (value: number, index: number, obj: number[]) => unknown, thisArg?: any): number; }; findIndex: (predicate: (value: number, index: number, obj: number[]) => unknown, thisArg?: any) => number; fill: (value: number, start?: number, end?: number) => number[]; copyWithin: (target: number, start: number, end?: number) => number[]; entries: () => BuiltinIterator<[number, number], any, any>; keys: () => BuiltinIterator; values: () => BuiltinIterator; includes: (searchElement: number, fromIndex?: number) => boolean; flatMap: (callback: (this: This, value: number, index: number, array: number[]) => U | readonly U[], thisArg?: This) => U[]; flat: (this: A, depth?: D) => FlatArray[]; [Symbol.iterator]: () => BuiltinIterator; readonly [Symbol.unscopables]: { [x: number]: boolean; length?: boolean; toString?: boolean; toLocaleString?: boolean; pop?: boolean; push?: boolean; concat?: boolean; join?: boolean; reverse?: boolean; shift?: boolean; slice?: boolean; sort?: boolean; splice?: boolean; unshift?: boolean; indexOf?: boolean; lastIndexOf?: boolean; every?: boolean; some?: boolean; forEach?: boolean; map?: boolean; filter?: boolean; reduce?: boolean; reduceRight?: boolean; find?: boolean; findIndex?: boolean; fill?: boolean; copyWithin?: boolean; entries?: boolean; keys?: boolean; values?: boolean; includes?: boolean; flatMap?: boolean; flat?: boolean; [Symbol.iterator]?: boolean; readonly [Symbol.unscopables]?: boolean; }; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^ ^^ ^^^ ^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^ ^^^ ^^^^^^^^^^^^^^^^^^^^^^ ^^^^ ^^^^^^^^^^ ^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^ ^^^ ^^^^^^^^^^^^^^ ^^ ^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^ ^^^^^^^^^^ ^^^ ^^^^^ ^^^^^^^^^^^^^^^^ ^^^^^^^^^^ ^^^ ^^^^^ ^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^ ^ ^^^ ^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^ ^^ ^^^ ^^^ ^^^^^^^^^^^^ ^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^ ^^ ^^^ ^^^^^ ^^^^^^^^^^^^ ^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^ ^^ ^^^ ^^^^^ ^^^^^^^^ ^^ ^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^^ ^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^ ^^ ^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^ ^^ ^^^ ^^^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^ ^^ ^^^ ^^^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^ ^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^ ^^ ^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^ ^^ ^^^ ^^^^^ ^^^^^^^^^ ^^^^^^^^^^ ^^^ ^^ ^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^ ^^ ^^ ^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^ ^^^ ^^^^^ ^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^ ^^^ ^^^^^^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^^^^^^^^ ^^^^^^ ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>src2 : { [x: number]: number; toString: () => string; toLocaleString: { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions): string; }; pop: () => number; push: (...items: number[]) => number; concat: { (...items: ConcatArray[]): number[]; (...items: (number | ConcatArray)[]): number[]; }; join: (separator?: string) => string; reverse: () => number[]; shift: () => number; slice: (start?: number, end?: number) => number[]; sort: (compareFn?: (a: number, b: number) => number) => number[]; splice: { (start: number, deleteCount?: number): number[]; (start: number, deleteCount: number, ...items: number[]): number[]; }; unshift: (...items: number[]) => number; indexOf: (searchElement: number, fromIndex?: number) => number; lastIndexOf: (searchElement: number, fromIndex?: number) => number; every: { (predicate: (value: number, index: number, array: number[]) => value is S, thisArg?: any): this is S[]; (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any): boolean; }; some: (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any) => boolean; forEach: (callbackfn: (value: number, index: number, array: number[]) => void, thisArg?: any) => void; map: (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[]; filter: { (predicate: (value: number, index: number, array: number[]) => value is S, thisArg?: any): S[]; (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any): number[]; }; reduce: { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number): number; (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue: number): number; (callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; }; reduceRight: { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number): number; (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue: number): number; (callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; }; find: { (predicate: (value: number, index: number, obj: number[]) => value is S, thisArg?: any): S; (predicate: (value: number, index: number, obj: number[]) => unknown, thisArg?: any): number; }; findIndex: (predicate: (value: number, index: number, obj: number[]) => unknown, thisArg?: any) => number; fill: (value: number, start?: number, end?: number) => number[]; copyWithin: (target: number, start: number, end?: number) => number[]; entries: () => ArrayIterator<[number, number]>; keys: () => ArrayIterator; values: () => ArrayIterator; includes: (searchElement: number, fromIndex?: number) => boolean; flatMap: (callback: (this: This, value: number, index: number, array: number[]) => U | readonly U[], thisArg?: This) => U[]; flat: (this: A, depth?: D) => FlatArray[]; [Symbol.iterator]: () => ArrayIterator; readonly [Symbol.unscopables]: { [x: number]: boolean; length?: boolean; toString?: boolean; toLocaleString?: boolean; pop?: boolean; push?: boolean; concat?: boolean; join?: boolean; reverse?: boolean; shift?: boolean; slice?: boolean; sort?: boolean; splice?: boolean; unshift?: boolean; indexOf?: boolean; lastIndexOf?: boolean; every?: boolean; some?: boolean; forEach?: boolean; map?: boolean; filter?: boolean; reduce?: boolean; reduceRight?: boolean; find?: boolean; findIndex?: boolean; fill?: boolean; copyWithin?: boolean; entries?: boolean; keys?: boolean; values?: boolean; includes?: boolean; flatMap?: boolean; flat?: boolean; [Symbol.iterator]?: boolean; readonly [Symbol.unscopables]?: boolean; }; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^ ^^ ^^^ ^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^ ^^^ ^^^^^^^^^^^^^^^^^^^^^^ ^^^^ ^^^^^^^^^^ ^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^ ^^^ ^^^^^^^^^^^^^^ ^^ ^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^ ^^^^^^^^^^ ^^^ ^^^^^ ^^^^^^^^^^^^^^^^ ^^^^^^^^^^ ^^^ ^^^^^ ^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^ ^ ^^^ ^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^ ^^ ^^^ ^^^ ^^^^^^^^^^^^ ^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^ ^^ ^^^ ^^^^^ ^^^^^^^^^^^^ ^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^ ^^ ^^^ ^^^^^ ^^^^^^^^ ^^ ^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^^ ^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^ ^^ ^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^ ^^ ^^^ ^^^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^ ^^ ^^^ ^^^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^ ^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^ ^^ ^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^ ^^ ^^^ ^^^^^ ^^^^^^^^^ ^^^^^^^^^^ ^^^ ^^ ^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^ ^^ ^^ ^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^ ^^^ ^^^^^ ^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^ ^^^ ^^^^^^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^^^^^^^^ ^^^^^^ ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ tgt2 = src2; // Should error ->tgt2 = src2 : { [x: number]: number; toString: () => string; toLocaleString: { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions): string; }; pop: () => number; push: (...items: number[]) => number; concat: { (...items: ConcatArray[]): number[]; (...items: (number | ConcatArray)[]): number[]; }; join: (separator?: string) => string; reverse: () => number[]; shift: () => number; slice: (start?: number, end?: number) => number[]; sort: (compareFn?: (a: number, b: number) => number) => number[]; splice: { (start: number, deleteCount?: number): number[]; (start: number, deleteCount: number, ...items: number[]): number[]; }; unshift: (...items: number[]) => number; indexOf: (searchElement: number, fromIndex?: number) => number; lastIndexOf: (searchElement: number, fromIndex?: number) => number; every: { (predicate: (value: number, index: number, array: number[]) => value is S, thisArg?: any): this is S[]; (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any): boolean; }; some: (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any) => boolean; forEach: (callbackfn: (value: number, index: number, array: number[]) => void, thisArg?: any) => void; map: (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[]; filter: { (predicate: (value: number, index: number, array: number[]) => value is S, thisArg?: any): S[]; (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any): number[]; }; reduce: { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number): number; (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue: number): number; (callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; }; reduceRight: { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number): number; (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue: number): number; (callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; }; find: { (predicate: (value: number, index: number, obj: number[]) => value is S, thisArg?: any): S; (predicate: (value: number, index: number, obj: number[]) => unknown, thisArg?: any): number; }; findIndex: (predicate: (value: number, index: number, obj: number[]) => unknown, thisArg?: any) => number; fill: (value: number, start?: number, end?: number) => number[]; copyWithin: (target: number, start: number, end?: number) => number[]; entries: () => BuiltinIterator<[number, number], any, any>; keys: () => BuiltinIterator; values: () => BuiltinIterator; includes: (searchElement: number, fromIndex?: number) => boolean; flatMap: (callback: (this: This, value: number, index: number, array: number[]) => U | readonly U[], thisArg?: This) => U[]; flat: (this: A, depth?: D) => FlatArray[]; [Symbol.iterator]: () => BuiltinIterator; readonly [Symbol.unscopables]: { [x: number]: boolean; length?: boolean; toString?: boolean; toLocaleString?: boolean; pop?: boolean; push?: boolean; concat?: boolean; join?: boolean; reverse?: boolean; shift?: boolean; slice?: boolean; sort?: boolean; splice?: boolean; unshift?: boolean; indexOf?: boolean; lastIndexOf?: boolean; every?: boolean; some?: boolean; forEach?: boolean; map?: boolean; filter?: boolean; reduce?: boolean; reduceRight?: boolean; find?: boolean; findIndex?: boolean; fill?: boolean; copyWithin?: boolean; entries?: boolean; keys?: boolean; values?: boolean; includes?: boolean; flatMap?: boolean; flat?: boolean; [Symbol.iterator]?: boolean; readonly [Symbol.unscopables]?: boolean; }; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^ ^^ ^^^ ^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^ ^^^ ^^^^^^^^^^^^^^^^^^^^^^ ^^^^ ^^^^^^^^^^ ^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^ ^^^ ^^^^^^^^^^^^^^ ^^ ^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^ ^^^^^^^^^^ ^^^ ^^^^^ ^^^^^^^^^^^^^^^^ ^^^^^^^^^^ ^^^ ^^^^^ ^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^ ^ ^^^ ^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^ ^^ ^^^ ^^^ ^^^^^^^^^^^^ ^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^ ^^ ^^^ ^^^^^ ^^^^^^^^^^^^ ^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^ ^^ ^^^ ^^^^^ ^^^^^^^^ ^^ ^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^^ ^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^ ^^ ^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^ ^^ ^^^ ^^^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^ ^^ ^^^ ^^^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^ ^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^ ^^ ^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^ ^^ ^^^ ^^^^^ ^^^^^^^^^ ^^^^^^^^^^ ^^^ ^^ ^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^ ^^ ^^ ^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^ ^^^ ^^^^^ ^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^ ^^^ ^^^^^^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^^^^^^^^ ^^^^^^ ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>tgt2 = src2 : { [x: number]: number; toString: () => string; toLocaleString: { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions): string; }; pop: () => number; push: (...items: number[]) => number; concat: { (...items: ConcatArray[]): number[]; (...items: (number | ConcatArray)[]): number[]; }; join: (separator?: string) => string; reverse: () => number[]; shift: () => number; slice: (start?: number, end?: number) => number[]; sort: (compareFn?: (a: number, b: number) => number) => number[]; splice: { (start: number, deleteCount?: number): number[]; (start: number, deleteCount: number, ...items: number[]): number[]; }; unshift: (...items: number[]) => number; indexOf: (searchElement: number, fromIndex?: number) => number; lastIndexOf: (searchElement: number, fromIndex?: number) => number; every: { (predicate: (value: number, index: number, array: number[]) => value is S, thisArg?: any): this is S[]; (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any): boolean; }; some: (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any) => boolean; forEach: (callbackfn: (value: number, index: number, array: number[]) => void, thisArg?: any) => void; map: (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[]; filter: { (predicate: (value: number, index: number, array: number[]) => value is S, thisArg?: any): S[]; (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any): number[]; }; reduce: { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number): number; (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue: number): number; (callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; }; reduceRight: { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number): number; (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue: number): number; (callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; }; find: { (predicate: (value: number, index: number, obj: number[]) => value is S, thisArg?: any): S; (predicate: (value: number, index: number, obj: number[]) => unknown, thisArg?: any): number; }; findIndex: (predicate: (value: number, index: number, obj: number[]) => unknown, thisArg?: any) => number; fill: (value: number, start?: number, end?: number) => number[]; copyWithin: (target: number, start: number, end?: number) => number[]; entries: () => ArrayIterator<[number, number]>; keys: () => ArrayIterator; values: () => ArrayIterator; includes: (searchElement: number, fromIndex?: number) => boolean; flatMap: (callback: (this: This, value: number, index: number, array: number[]) => U | readonly U[], thisArg?: This) => U[]; flat: (this: A, depth?: D) => FlatArray[]; [Symbol.iterator]: () => ArrayIterator; readonly [Symbol.unscopables]: { [x: number]: boolean; length?: boolean; toString?: boolean; toLocaleString?: boolean; pop?: boolean; push?: boolean; concat?: boolean; join?: boolean; reverse?: boolean; shift?: boolean; slice?: boolean; sort?: boolean; splice?: boolean; unshift?: boolean; indexOf?: boolean; lastIndexOf?: boolean; every?: boolean; some?: boolean; forEach?: boolean; map?: boolean; filter?: boolean; reduce?: boolean; reduceRight?: boolean; find?: boolean; findIndex?: boolean; fill?: boolean; copyWithin?: boolean; entries?: boolean; keys?: boolean; values?: boolean; includes?: boolean; flatMap?: boolean; flat?: boolean; [Symbol.iterator]?: boolean; readonly [Symbol.unscopables]?: boolean; }; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^ ^^ ^^^ ^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^ ^^^ ^^^^^^^^^^^^^^^^^^^^^^ ^^^^ ^^^^^^^^^^ ^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^ ^^^ ^^^^^^^^^^^^^^ ^^ ^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^ ^^^^^^^^^^ ^^^ ^^^^^ ^^^^^^^^^^^^^^^^ ^^^^^^^^^^ ^^^ ^^^^^ ^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^ ^ ^^^ ^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^ ^^ ^^^ ^^^ ^^^^^^^^^^^^ ^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^ ^^ ^^^ ^^^^^ ^^^^^^^^^^^^ ^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^ ^^ ^^^ ^^^^^ ^^^^^^^^ ^^ ^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^^ ^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^ ^^ ^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^ ^^ ^^^ ^^^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^ ^^ ^^^ ^^^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^ ^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^ ^^ ^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^ ^^ ^^^ ^^^^^ ^^^^^^^^^ ^^^^^^^^^^ ^^^ ^^ ^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^ ^^ ^^ ^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^ ^^^ ^^^^^ ^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^ ^^^ ^^^^^^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^^^^^^^^ ^^^^^^ ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >tgt2 : number[] > : ^^^^^^^^ ->src2 : { [x: number]: number; toString: () => string; toLocaleString: { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions): string; }; pop: () => number; push: (...items: number[]) => number; concat: { (...items: ConcatArray[]): number[]; (...items: (number | ConcatArray)[]): number[]; }; join: (separator?: string) => string; reverse: () => number[]; shift: () => number; slice: (start?: number, end?: number) => number[]; sort: (compareFn?: (a: number, b: number) => number) => number[]; splice: { (start: number, deleteCount?: number): number[]; (start: number, deleteCount: number, ...items: number[]): number[]; }; unshift: (...items: number[]) => number; indexOf: (searchElement: number, fromIndex?: number) => number; lastIndexOf: (searchElement: number, fromIndex?: number) => number; every: { (predicate: (value: number, index: number, array: number[]) => value is S, thisArg?: any): this is S[]; (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any): boolean; }; some: (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any) => boolean; forEach: (callbackfn: (value: number, index: number, array: number[]) => void, thisArg?: any) => void; map: (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[]; filter: { (predicate: (value: number, index: number, array: number[]) => value is S, thisArg?: any): S[]; (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any): number[]; }; reduce: { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number): number; (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue: number): number; (callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; }; reduceRight: { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number): number; (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue: number): number; (callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; }; find: { (predicate: (value: number, index: number, obj: number[]) => value is S, thisArg?: any): S; (predicate: (value: number, index: number, obj: number[]) => unknown, thisArg?: any): number; }; findIndex: (predicate: (value: number, index: number, obj: number[]) => unknown, thisArg?: any) => number; fill: (value: number, start?: number, end?: number) => number[]; copyWithin: (target: number, start: number, end?: number) => number[]; entries: () => BuiltinIterator<[number, number], any, any>; keys: () => BuiltinIterator; values: () => BuiltinIterator; includes: (searchElement: number, fromIndex?: number) => boolean; flatMap: (callback: (this: This, value: number, index: number, array: number[]) => U | readonly U[], thisArg?: This) => U[]; flat: (this: A, depth?: D) => FlatArray[]; [Symbol.iterator]: () => BuiltinIterator; readonly [Symbol.unscopables]: { [x: number]: boolean; length?: boolean; toString?: boolean; toLocaleString?: boolean; pop?: boolean; push?: boolean; concat?: boolean; join?: boolean; reverse?: boolean; shift?: boolean; slice?: boolean; sort?: boolean; splice?: boolean; unshift?: boolean; indexOf?: boolean; lastIndexOf?: boolean; every?: boolean; some?: boolean; forEach?: boolean; map?: boolean; filter?: boolean; reduce?: boolean; reduceRight?: boolean; find?: boolean; findIndex?: boolean; fill?: boolean; copyWithin?: boolean; entries?: boolean; keys?: boolean; values?: boolean; includes?: boolean; flatMap?: boolean; flat?: boolean; [Symbol.iterator]?: boolean; readonly [Symbol.unscopables]?: boolean; }; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^ ^^ ^^^ ^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^ ^^^ ^^^^^^^^^^^^^^^^^^^^^^ ^^^^ ^^^^^^^^^^ ^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^ ^^^ ^^^^^^^^^^^^^^ ^^ ^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^ ^^^^^^^^^^ ^^^ ^^^^^ ^^^^^^^^^^^^^^^^ ^^^^^^^^^^ ^^^ ^^^^^ ^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^ ^ ^^^ ^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^ ^^ ^^^ ^^^ ^^^^^^^^^^^^ ^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^ ^^ ^^^ ^^^^^ ^^^^^^^^^^^^ ^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^ ^^ ^^^ ^^^^^ ^^^^^^^^ ^^ ^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^^ ^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^ ^^ ^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^ ^^ ^^^ ^^^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^ ^^ ^^^ ^^^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^ ^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^ ^^ ^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^ ^^ ^^^ ^^^^^ ^^^^^^^^^ ^^^^^^^^^^ ^^^ ^^ ^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^ ^^ ^^ ^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^ ^^^ ^^^^^ ^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^ ^^^ ^^^^^^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^^^^^^^^ ^^^^^^ ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>src2 : { [x: number]: number; toString: () => string; toLocaleString: { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions): string; }; pop: () => number; push: (...items: number[]) => number; concat: { (...items: ConcatArray[]): number[]; (...items: (number | ConcatArray)[]): number[]; }; join: (separator?: string) => string; reverse: () => number[]; shift: () => number; slice: (start?: number, end?: number) => number[]; sort: (compareFn?: (a: number, b: number) => number) => number[]; splice: { (start: number, deleteCount?: number): number[]; (start: number, deleteCount: number, ...items: number[]): number[]; }; unshift: (...items: number[]) => number; indexOf: (searchElement: number, fromIndex?: number) => number; lastIndexOf: (searchElement: number, fromIndex?: number) => number; every: { (predicate: (value: number, index: number, array: number[]) => value is S, thisArg?: any): this is S[]; (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any): boolean; }; some: (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any) => boolean; forEach: (callbackfn: (value: number, index: number, array: number[]) => void, thisArg?: any) => void; map: (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[]; filter: { (predicate: (value: number, index: number, array: number[]) => value is S, thisArg?: any): S[]; (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any): number[]; }; reduce: { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number): number; (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue: number): number; (callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; }; reduceRight: { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number): number; (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue: number): number; (callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; }; find: { (predicate: (value: number, index: number, obj: number[]) => value is S, thisArg?: any): S; (predicate: (value: number, index: number, obj: number[]) => unknown, thisArg?: any): number; }; findIndex: (predicate: (value: number, index: number, obj: number[]) => unknown, thisArg?: any) => number; fill: (value: number, start?: number, end?: number) => number[]; copyWithin: (target: number, start: number, end?: number) => number[]; entries: () => ArrayIterator<[number, number]>; keys: () => ArrayIterator; values: () => ArrayIterator; includes: (searchElement: number, fromIndex?: number) => boolean; flatMap: (callback: (this: This, value: number, index: number, array: number[]) => U | readonly U[], thisArg?: This) => U[]; flat: (this: A, depth?: D) => FlatArray[]; [Symbol.iterator]: () => ArrayIterator; readonly [Symbol.unscopables]: { [x: number]: boolean; length?: boolean; toString?: boolean; toLocaleString?: boolean; pop?: boolean; push?: boolean; concat?: boolean; join?: boolean; reverse?: boolean; shift?: boolean; slice?: boolean; sort?: boolean; splice?: boolean; unshift?: boolean; indexOf?: boolean; lastIndexOf?: boolean; every?: boolean; some?: boolean; forEach?: boolean; map?: boolean; filter?: boolean; reduce?: boolean; reduceRight?: boolean; find?: boolean; findIndex?: boolean; fill?: boolean; copyWithin?: boolean; entries?: boolean; keys?: boolean; values?: boolean; includes?: boolean; flatMap?: boolean; flat?: boolean; [Symbol.iterator]?: boolean; readonly [Symbol.unscopables]?: boolean; }; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^ ^^ ^^^ ^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^ ^^^ ^^^^^^^^^^^^^^^^^^^^^^ ^^^^ ^^^^^^^^^^ ^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^ ^^^ ^^^^^^^^^^^^^^ ^^ ^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^ ^^^^^^^^^^ ^^^ ^^^^^ ^^^^^^^^^^^^^^^^ ^^^^^^^^^^ ^^^ ^^^^^ ^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^ ^ ^^^ ^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^ ^^ ^^^ ^^^ ^^^^^^^^^^^^ ^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^ ^^ ^^^ ^^^^^ ^^^^^^^^^^^^ ^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^ ^^ ^^^ ^^^^^ ^^^^^^^^ ^^ ^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^^ ^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^ ^^ ^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^ ^^ ^^^ ^^^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^ ^^ ^^^ ^^^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^ ^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^ ^^ ^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^ ^^ ^^^ ^^^^^ ^^^^^^^^^ ^^^^^^^^^^ ^^^ ^^ ^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^ ^^ ^^ ^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^ ^^^ ^^^^^ ^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^ ^^^ ^^^^^^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^^^^^^^^ ^^^^^^ ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/baselines/reference/mappedTypeWithAsClauseAndLateBoundProperty2.js b/tests/baselines/reference/mappedTypeWithAsClauseAndLateBoundProperty2.js index 4aa389086c111..36696aa90cffe 100644 --- a/tests/baselines/reference/mappedTypeWithAsClauseAndLateBoundProperty2.js +++ b/tests/baselines/reference/mappedTypeWithAsClauseAndLateBoundProperty2.js @@ -62,13 +62,13 @@ export declare const thing: { findIndex: (predicate: (value: number, index: number, obj: number[]) => unknown, thisArg?: any) => number; fill: (value: number, start?: number, end?: number) => number[]; copyWithin: (target: number, start: number, end?: number) => number[]; - entries: () => BuiltinIterator<[number, number], any, any>; - keys: () => BuiltinIterator; - values: () => BuiltinIterator; + entries: () => ArrayIterator<[number, number]>; + keys: () => ArrayIterator; + values: () => ArrayIterator; includes: (searchElement: number, fromIndex?: number) => boolean; flatMap: (callback: (this: This, value: number, index: number, array: number[]) => U | readonly U[], thisArg?: This) => U[]; flat: (this: A, depth?: D) => FlatArray[]; - [Symbol.iterator]: () => BuiltinIterator; + [Symbol.iterator]: () => ArrayIterator; readonly [Symbol.unscopables]: { [x: number]: boolean; length?: boolean; diff --git a/tests/baselines/reference/mappedTypeWithAsClauseAndLateBoundProperty2.types b/tests/baselines/reference/mappedTypeWithAsClauseAndLateBoundProperty2.types index 4f712549244c2..8e0a2e605bb3e 100644 --- a/tests/baselines/reference/mappedTypeWithAsClauseAndLateBoundProperty2.types +++ b/tests/baselines/reference/mappedTypeWithAsClauseAndLateBoundProperty2.types @@ -2,11 +2,11 @@ === mappedTypeWithAsClauseAndLateBoundProperty2.ts === export const thing = (null as any as { [K in keyof number[] as Exclude]: (number[])[K] }); ->thing : { [x: number]: number; toString: () => string; toLocaleString: { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions): string; }; pop: () => number; push: (...items: number[]) => number; concat: { (...items: ConcatArray[]): number[]; (...items: (number | ConcatArray)[]): number[]; }; join: (separator?: string) => string; reverse: () => number[]; shift: () => number; slice: (start?: number, end?: number) => number[]; sort: (compareFn?: (a: number, b: number) => number) => number[]; splice: { (start: number, deleteCount?: number): number[]; (start: number, deleteCount: number, ...items: number[]): number[]; }; unshift: (...items: number[]) => number; indexOf: (searchElement: number, fromIndex?: number) => number; lastIndexOf: (searchElement: number, fromIndex?: number) => number; every: { (predicate: (value: number, index: number, array: number[]) => value is S, thisArg?: any): this is S[]; (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any): boolean; }; some: (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any) => boolean; forEach: (callbackfn: (value: number, index: number, array: number[]) => void, thisArg?: any) => void; map: (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[]; filter: { (predicate: (value: number, index: number, array: number[]) => value is S, thisArg?: any): S[]; (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any): number[]; }; reduce: { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number): number; (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue: number): number; (callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; }; reduceRight: { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number): number; (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue: number): number; (callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; }; find: { (predicate: (value: number, index: number, obj: number[]) => value is S, thisArg?: any): S; (predicate: (value: number, index: number, obj: number[]) => unknown, thisArg?: any): number; }; findIndex: (predicate: (value: number, index: number, obj: number[]) => unknown, thisArg?: any) => number; fill: (value: number, start?: number, end?: number) => number[]; copyWithin: (target: number, start: number, end?: number) => number[]; entries: () => BuiltinIterator<[number, number], any, any>; keys: () => BuiltinIterator; values: () => BuiltinIterator; includes: (searchElement: number, fromIndex?: number) => boolean; flatMap: (callback: (this: This, value: number, index: number, array: number[]) => U | readonly U[], thisArg?: This) => U[]; flat: (this: A, depth?: D) => FlatArray[]; [Symbol.iterator]: () => BuiltinIterator; readonly [Symbol.unscopables]: { [x: number]: boolean; length?: boolean; toString?: boolean; toLocaleString?: boolean; pop?: boolean; push?: boolean; concat?: boolean; join?: boolean; reverse?: boolean; shift?: boolean; slice?: boolean; sort?: boolean; splice?: boolean; unshift?: boolean; indexOf?: boolean; lastIndexOf?: boolean; every?: boolean; some?: boolean; forEach?: boolean; map?: boolean; filter?: boolean; reduce?: boolean; reduceRight?: boolean; find?: boolean; findIndex?: boolean; fill?: boolean; copyWithin?: boolean; entries?: boolean; keys?: boolean; values?: boolean; includes?: boolean; flatMap?: boolean; flat?: boolean; [Symbol.iterator]?: boolean; readonly [Symbol.unscopables]?: boolean; }; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^ ^^ ^^^ ^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^ ^^^ ^^^^^^^^^^^^^^^^^^^^^^ ^^^^ ^^^^^^^^^^ ^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^ ^^^ ^^^^^^^^^^^^^^ ^^ ^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^ ^^^^^^^^^^ ^^^ ^^^^^ ^^^^^^^^^^^^^^^^ ^^^^^^^^^^ ^^^ ^^^^^ ^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^ ^ ^^^ ^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^ ^^ ^^^ ^^^ ^^^^^^^^^^^^ ^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^ ^^ ^^^ ^^^^^ ^^^^^^^^^^^^ ^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^ ^^ ^^^ ^^^^^ ^^^^^^^^ ^^ ^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^^ ^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^ ^^ ^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^ ^^ ^^^ ^^^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^ ^^ ^^^ ^^^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^ ^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^ ^^ ^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^ ^^ ^^^ ^^^^^ ^^^^^^^^^ ^^^^^^^^^^ ^^^ ^^ ^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^ ^^ ^^ ^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^ ^^^ ^^^^^ ^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^ ^^^ ^^^^^^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^^^^^^^^ ^^^^^^ ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->(null as any as { [K in keyof number[] as Exclude]: (number[])[K] }) : { [x: number]: number; toString: () => string; toLocaleString: { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions): string; }; pop: () => number; push: (...items: number[]) => number; concat: { (...items: ConcatArray[]): number[]; (...items: (number | ConcatArray)[]): number[]; }; join: (separator?: string) => string; reverse: () => number[]; shift: () => number; slice: (start?: number, end?: number) => number[]; sort: (compareFn?: (a: number, b: number) => number) => number[]; splice: { (start: number, deleteCount?: number): number[]; (start: number, deleteCount: number, ...items: number[]): number[]; }; unshift: (...items: number[]) => number; indexOf: (searchElement: number, fromIndex?: number) => number; lastIndexOf: (searchElement: number, fromIndex?: number) => number; every: { (predicate: (value: number, index: number, array: number[]) => value is S, thisArg?: any): this is S[]; (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any): boolean; }; some: (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any) => boolean; forEach: (callbackfn: (value: number, index: number, array: number[]) => void, thisArg?: any) => void; map: (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[]; filter: { (predicate: (value: number, index: number, array: number[]) => value is S, thisArg?: any): S[]; (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any): number[]; }; reduce: { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number): number; (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue: number): number; (callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; }; reduceRight: { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number): number; (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue: number): number; (callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; }; find: { (predicate: (value: number, index: number, obj: number[]) => value is S, thisArg?: any): S; (predicate: (value: number, index: number, obj: number[]) => unknown, thisArg?: any): number; }; findIndex: (predicate: (value: number, index: number, obj: number[]) => unknown, thisArg?: any) => number; fill: (value: number, start?: number, end?: number) => number[]; copyWithin: (target: number, start: number, end?: number) => number[]; entries: () => BuiltinIterator<[number, number], any, any>; keys: () => BuiltinIterator; values: () => BuiltinIterator; includes: (searchElement: number, fromIndex?: number) => boolean; flatMap: (callback: (this: This, value: number, index: number, array: number[]) => U | readonly U[], thisArg?: This) => U[]; flat: (this: A, depth?: D) => FlatArray[]; [Symbol.iterator]: () => BuiltinIterator; readonly [Symbol.unscopables]: { [x: number]: boolean; length?: boolean; toString?: boolean; toLocaleString?: boolean; pop?: boolean; push?: boolean; concat?: boolean; join?: boolean; reverse?: boolean; shift?: boolean; slice?: boolean; sort?: boolean; splice?: boolean; unshift?: boolean; indexOf?: boolean; lastIndexOf?: boolean; every?: boolean; some?: boolean; forEach?: boolean; map?: boolean; filter?: boolean; reduce?: boolean; reduceRight?: boolean; find?: boolean; findIndex?: boolean; fill?: boolean; copyWithin?: boolean; entries?: boolean; keys?: boolean; values?: boolean; includes?: boolean; flatMap?: boolean; flat?: boolean; [Symbol.iterator]?: boolean; readonly [Symbol.unscopables]?: boolean; }; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^ ^^ ^^^ ^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^ ^^^ ^^^^^^^^^^^^^^^^^^^^^^ ^^^^ ^^^^^^^^^^ ^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^ ^^^ ^^^^^^^^^^^^^^ ^^ ^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^ ^^^^^^^^^^ ^^^ ^^^^^ ^^^^^^^^^^^^^^^^ ^^^^^^^^^^ ^^^ ^^^^^ ^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^ ^ ^^^ ^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^ ^^ ^^^ ^^^ ^^^^^^^^^^^^ ^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^ ^^ ^^^ ^^^^^ ^^^^^^^^^^^^ ^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^ ^^ ^^^ ^^^^^ ^^^^^^^^ ^^ ^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^^ ^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^ ^^ ^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^ ^^ ^^^ ^^^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^ ^^ ^^^ ^^^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^ ^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^ ^^ ^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^ ^^ ^^^ ^^^^^ ^^^^^^^^^ ^^^^^^^^^^ ^^^ ^^ ^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^ ^^ ^^ ^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^ ^^^ ^^^^^ ^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^ ^^^ ^^^^^^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^^^^^^^^ ^^^^^^ ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->null as any as { [K in keyof number[] as Exclude]: (number[])[K] } : { [x: number]: number; toString: () => string; toLocaleString: { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions): string; }; pop: () => number; push: (...items: number[]) => number; concat: { (...items: ConcatArray[]): number[]; (...items: (number | ConcatArray)[]): number[]; }; join: (separator?: string) => string; reverse: () => number[]; shift: () => number; slice: (start?: number, end?: number) => number[]; sort: (compareFn?: (a: number, b: number) => number) => number[]; splice: { (start: number, deleteCount?: number): number[]; (start: number, deleteCount: number, ...items: number[]): number[]; }; unshift: (...items: number[]) => number; indexOf: (searchElement: number, fromIndex?: number) => number; lastIndexOf: (searchElement: number, fromIndex?: number) => number; every: { (predicate: (value: number, index: number, array: number[]) => value is S, thisArg?: any): this is S[]; (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any): boolean; }; some: (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any) => boolean; forEach: (callbackfn: (value: number, index: number, array: number[]) => void, thisArg?: any) => void; map: (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[]; filter: { (predicate: (value: number, index: number, array: number[]) => value is S, thisArg?: any): S[]; (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any): number[]; }; reduce: { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number): number; (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue: number): number; (callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; }; reduceRight: { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number): number; (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue: number): number; (callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; }; find: { (predicate: (value: number, index: number, obj: number[]) => value is S, thisArg?: any): S; (predicate: (value: number, index: number, obj: number[]) => unknown, thisArg?: any): number; }; findIndex: (predicate: (value: number, index: number, obj: number[]) => unknown, thisArg?: any) => number; fill: (value: number, start?: number, end?: number) => number[]; copyWithin: (target: number, start: number, end?: number) => number[]; entries: () => BuiltinIterator<[number, number], any, any>; keys: () => BuiltinIterator; values: () => BuiltinIterator; includes: (searchElement: number, fromIndex?: number) => boolean; flatMap: (callback: (this: This, value: number, index: number, array: number[]) => U | readonly U[], thisArg?: This) => U[]; flat: (this: A, depth?: D) => FlatArray[]; [Symbol.iterator]: () => BuiltinIterator; readonly [Symbol.unscopables]: { [x: number]: boolean; length?: boolean; toString?: boolean; toLocaleString?: boolean; pop?: boolean; push?: boolean; concat?: boolean; join?: boolean; reverse?: boolean; shift?: boolean; slice?: boolean; sort?: boolean; splice?: boolean; unshift?: boolean; indexOf?: boolean; lastIndexOf?: boolean; every?: boolean; some?: boolean; forEach?: boolean; map?: boolean; filter?: boolean; reduce?: boolean; reduceRight?: boolean; find?: boolean; findIndex?: boolean; fill?: boolean; copyWithin?: boolean; entries?: boolean; keys?: boolean; values?: boolean; includes?: boolean; flatMap?: boolean; flat?: boolean; [Symbol.iterator]?: boolean; readonly [Symbol.unscopables]?: boolean; }; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^ ^^ ^^^ ^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^ ^^^ ^^^^^^^^^^^^^^^^^^^^^^ ^^^^ ^^^^^^^^^^ ^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^ ^^^ ^^^^^^^^^^^^^^ ^^ ^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^ ^^^^^^^^^^ ^^^ ^^^^^ ^^^^^^^^^^^^^^^^ ^^^^^^^^^^ ^^^ ^^^^^ ^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^ ^ ^^^ ^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^ ^^ ^^^ ^^^ ^^^^^^^^^^^^ ^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^ ^^ ^^^ ^^^^^ ^^^^^^^^^^^^ ^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^ ^^ ^^^ ^^^^^ ^^^^^^^^ ^^ ^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^^ ^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^ ^^ ^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^ ^^ ^^^ ^^^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^ ^^ ^^^ ^^^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^ ^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^ ^^ ^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^ ^^ ^^^ ^^^^^ ^^^^^^^^^ ^^^^^^^^^^ ^^^ ^^ ^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^ ^^ ^^ ^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^ ^^^ ^^^^^ ^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^ ^^^ ^^^^^^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^^^^^^^^ ^^^^^^ ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>thing : { [x: number]: number; toString: () => string; toLocaleString: { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions): string; }; pop: () => number; push: (...items: number[]) => number; concat: { (...items: ConcatArray[]): number[]; (...items: (number | ConcatArray)[]): number[]; }; join: (separator?: string) => string; reverse: () => number[]; shift: () => number; slice: (start?: number, end?: number) => number[]; sort: (compareFn?: (a: number, b: number) => number) => number[]; splice: { (start: number, deleteCount?: number): number[]; (start: number, deleteCount: number, ...items: number[]): number[]; }; unshift: (...items: number[]) => number; indexOf: (searchElement: number, fromIndex?: number) => number; lastIndexOf: (searchElement: number, fromIndex?: number) => number; every: { (predicate: (value: number, index: number, array: number[]) => value is S, thisArg?: any): this is S[]; (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any): boolean; }; some: (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any) => boolean; forEach: (callbackfn: (value: number, index: number, array: number[]) => void, thisArg?: any) => void; map: (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[]; filter: { (predicate: (value: number, index: number, array: number[]) => value is S, thisArg?: any): S[]; (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any): number[]; }; reduce: { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number): number; (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue: number): number; (callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; }; reduceRight: { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number): number; (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue: number): number; (callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; }; find: { (predicate: (value: number, index: number, obj: number[]) => value is S, thisArg?: any): S; (predicate: (value: number, index: number, obj: number[]) => unknown, thisArg?: any): number; }; findIndex: (predicate: (value: number, index: number, obj: number[]) => unknown, thisArg?: any) => number; fill: (value: number, start?: number, end?: number) => number[]; copyWithin: (target: number, start: number, end?: number) => number[]; entries: () => ArrayIterator<[number, number]>; keys: () => ArrayIterator; values: () => ArrayIterator; includes: (searchElement: number, fromIndex?: number) => boolean; flatMap: (callback: (this: This, value: number, index: number, array: number[]) => U | readonly U[], thisArg?: This) => U[]; flat: (this: A, depth?: D) => FlatArray[]; [Symbol.iterator]: () => ArrayIterator; readonly [Symbol.unscopables]: { [x: number]: boolean; length?: boolean; toString?: boolean; toLocaleString?: boolean; pop?: boolean; push?: boolean; concat?: boolean; join?: boolean; reverse?: boolean; shift?: boolean; slice?: boolean; sort?: boolean; splice?: boolean; unshift?: boolean; indexOf?: boolean; lastIndexOf?: boolean; every?: boolean; some?: boolean; forEach?: boolean; map?: boolean; filter?: boolean; reduce?: boolean; reduceRight?: boolean; find?: boolean; findIndex?: boolean; fill?: boolean; copyWithin?: boolean; entries?: boolean; keys?: boolean; values?: boolean; includes?: boolean; flatMap?: boolean; flat?: boolean; [Symbol.iterator]?: boolean; readonly [Symbol.unscopables]?: boolean; }; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^ ^^ ^^^ ^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^ ^^^ ^^^^^^^^^^^^^^^^^^^^^^ ^^^^ ^^^^^^^^^^ ^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^ ^^^ ^^^^^^^^^^^^^^ ^^ ^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^ ^^^^^^^^^^ ^^^ ^^^^^ ^^^^^^^^^^^^^^^^ ^^^^^^^^^^ ^^^ ^^^^^ ^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^ ^ ^^^ ^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^ ^^ ^^^ ^^^ ^^^^^^^^^^^^ ^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^ ^^ ^^^ ^^^^^ ^^^^^^^^^^^^ ^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^ ^^ ^^^ ^^^^^ ^^^^^^^^ ^^ ^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^^ ^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^ ^^ ^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^ ^^ ^^^ ^^^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^ ^^ ^^^ ^^^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^ ^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^ ^^ ^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^ ^^ ^^^ ^^^^^ ^^^^^^^^^ ^^^^^^^^^^ ^^^ ^^ ^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^ ^^ ^^ ^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^ ^^^ ^^^^^ ^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^ ^^^ ^^^^^^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^^^^^^^^ ^^^^^^ ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>(null as any as { [K in keyof number[] as Exclude]: (number[])[K] }) : { [x: number]: number; toString: () => string; toLocaleString: { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions): string; }; pop: () => number; push: (...items: number[]) => number; concat: { (...items: ConcatArray[]): number[]; (...items: (number | ConcatArray)[]): number[]; }; join: (separator?: string) => string; reverse: () => number[]; shift: () => number; slice: (start?: number, end?: number) => number[]; sort: (compareFn?: (a: number, b: number) => number) => number[]; splice: { (start: number, deleteCount?: number): number[]; (start: number, deleteCount: number, ...items: number[]): number[]; }; unshift: (...items: number[]) => number; indexOf: (searchElement: number, fromIndex?: number) => number; lastIndexOf: (searchElement: number, fromIndex?: number) => number; every: { (predicate: (value: number, index: number, array: number[]) => value is S, thisArg?: any): this is S[]; (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any): boolean; }; some: (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any) => boolean; forEach: (callbackfn: (value: number, index: number, array: number[]) => void, thisArg?: any) => void; map: (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[]; filter: { (predicate: (value: number, index: number, array: number[]) => value is S, thisArg?: any): S[]; (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any): number[]; }; reduce: { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number): number; (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue: number): number; (callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; }; reduceRight: { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number): number; (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue: number): number; (callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; }; find: { (predicate: (value: number, index: number, obj: number[]) => value is S, thisArg?: any): S; (predicate: (value: number, index: number, obj: number[]) => unknown, thisArg?: any): number; }; findIndex: (predicate: (value: number, index: number, obj: number[]) => unknown, thisArg?: any) => number; fill: (value: number, start?: number, end?: number) => number[]; copyWithin: (target: number, start: number, end?: number) => number[]; entries: () => ArrayIterator<[number, number]>; keys: () => ArrayIterator; values: () => ArrayIterator; includes: (searchElement: number, fromIndex?: number) => boolean; flatMap: (callback: (this: This, value: number, index: number, array: number[]) => U | readonly U[], thisArg?: This) => U[]; flat: (this: A, depth?: D) => FlatArray[]; [Symbol.iterator]: () => ArrayIterator; readonly [Symbol.unscopables]: { [x: number]: boolean; length?: boolean; toString?: boolean; toLocaleString?: boolean; pop?: boolean; push?: boolean; concat?: boolean; join?: boolean; reverse?: boolean; shift?: boolean; slice?: boolean; sort?: boolean; splice?: boolean; unshift?: boolean; indexOf?: boolean; lastIndexOf?: boolean; every?: boolean; some?: boolean; forEach?: boolean; map?: boolean; filter?: boolean; reduce?: boolean; reduceRight?: boolean; find?: boolean; findIndex?: boolean; fill?: boolean; copyWithin?: boolean; entries?: boolean; keys?: boolean; values?: boolean; includes?: boolean; flatMap?: boolean; flat?: boolean; [Symbol.iterator]?: boolean; readonly [Symbol.unscopables]?: boolean; }; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^ ^^ ^^^ ^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^ ^^^ ^^^^^^^^^^^^^^^^^^^^^^ ^^^^ ^^^^^^^^^^ ^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^ ^^^ ^^^^^^^^^^^^^^ ^^ ^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^ ^^^^^^^^^^ ^^^ ^^^^^ ^^^^^^^^^^^^^^^^ ^^^^^^^^^^ ^^^ ^^^^^ ^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^ ^ ^^^ ^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^ ^^ ^^^ ^^^ ^^^^^^^^^^^^ ^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^ ^^ ^^^ ^^^^^ ^^^^^^^^^^^^ ^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^ ^^ ^^^ ^^^^^ ^^^^^^^^ ^^ ^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^^ ^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^ ^^ ^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^ ^^ ^^^ ^^^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^ ^^ ^^^ ^^^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^ ^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^ ^^ ^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^ ^^ ^^^ ^^^^^ ^^^^^^^^^ ^^^^^^^^^^ ^^^ ^^ ^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^ ^^ ^^ ^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^ ^^^ ^^^^^ ^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^ ^^^ ^^^^^^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^^^^^^^^ ^^^^^^ ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>null as any as { [K in keyof number[] as Exclude]: (number[])[K] } : { [x: number]: number; toString: () => string; toLocaleString: { (): string; (locales: string | string[], options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions): string; }; pop: () => number; push: (...items: number[]) => number; concat: { (...items: ConcatArray[]): number[]; (...items: (number | ConcatArray)[]): number[]; }; join: (separator?: string) => string; reverse: () => number[]; shift: () => number; slice: (start?: number, end?: number) => number[]; sort: (compareFn?: (a: number, b: number) => number) => number[]; splice: { (start: number, deleteCount?: number): number[]; (start: number, deleteCount: number, ...items: number[]): number[]; }; unshift: (...items: number[]) => number; indexOf: (searchElement: number, fromIndex?: number) => number; lastIndexOf: (searchElement: number, fromIndex?: number) => number; every: { (predicate: (value: number, index: number, array: number[]) => value is S, thisArg?: any): this is S[]; (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any): boolean; }; some: (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any) => boolean; forEach: (callbackfn: (value: number, index: number, array: number[]) => void, thisArg?: any) => void; map: (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[]; filter: { (predicate: (value: number, index: number, array: number[]) => value is S, thisArg?: any): S[]; (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any): number[]; }; reduce: { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number): number; (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue: number): number; (callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; }; reduceRight: { (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number): number; (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue: number): number; (callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; }; find: { (predicate: (value: number, index: number, obj: number[]) => value is S, thisArg?: any): S; (predicate: (value: number, index: number, obj: number[]) => unknown, thisArg?: any): number; }; findIndex: (predicate: (value: number, index: number, obj: number[]) => unknown, thisArg?: any) => number; fill: (value: number, start?: number, end?: number) => number[]; copyWithin: (target: number, start: number, end?: number) => number[]; entries: () => ArrayIterator<[number, number]>; keys: () => ArrayIterator; values: () => ArrayIterator; includes: (searchElement: number, fromIndex?: number) => boolean; flatMap: (callback: (this: This, value: number, index: number, array: number[]) => U | readonly U[], thisArg?: This) => U[]; flat: (this: A, depth?: D) => FlatArray[]; [Symbol.iterator]: () => ArrayIterator; readonly [Symbol.unscopables]: { [x: number]: boolean; length?: boolean; toString?: boolean; toLocaleString?: boolean; pop?: boolean; push?: boolean; concat?: boolean; join?: boolean; reverse?: boolean; shift?: boolean; slice?: boolean; sort?: boolean; splice?: boolean; unshift?: boolean; indexOf?: boolean; lastIndexOf?: boolean; every?: boolean; some?: boolean; forEach?: boolean; map?: boolean; filter?: boolean; reduce?: boolean; reduceRight?: boolean; find?: boolean; findIndex?: boolean; fill?: boolean; copyWithin?: boolean; entries?: boolean; keys?: boolean; values?: boolean; includes?: boolean; flatMap?: boolean; flat?: boolean; [Symbol.iterator]?: boolean; readonly [Symbol.unscopables]?: boolean; }; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^ ^^ ^^^ ^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^ ^^^ ^^^^^^^^^^^^^^^^^^^^^^ ^^^^ ^^^^^^^^^^ ^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^ ^^^ ^^^^^^^^^^^^^^ ^^ ^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^ ^^^^^^^^^^ ^^^ ^^^^^ ^^^^^^^^^^^^^^^^ ^^^^^^^^^^ ^^^ ^^^^^ ^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^ ^ ^^^ ^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^ ^^ ^^^ ^^^ ^^^^^^^^^^^^ ^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^ ^^ ^^^ ^^^^^ ^^^^^^^^^^^^ ^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^ ^^ ^^^ ^^^^^ ^^^^^^^^ ^^ ^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^^ ^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^ ^^ ^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^ ^^ ^^^ ^^^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^ ^^ ^^^ ^^^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^ ^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^ ^^ ^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^ ^^ ^^^ ^^^^^ ^^^^^^^^^ ^^^^^^^^^^ ^^^ ^^ ^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^ ^^ ^^ ^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^ ^^^ ^^^^^ ^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^^^ ^^^ ^^^^^^^^ ^^^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^^^^^^^^ ^^^^^^ ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >null as any : any diff --git a/tests/baselines/reference/modularizeLibrary_NoErrorDuplicateLibOptions1.types b/tests/baselines/reference/modularizeLibrary_NoErrorDuplicateLibOptions1.types index 075659bb6c643..7e3956c6ebc25 100644 --- a/tests/baselines/reference/modularizeLibrary_NoErrorDuplicateLibOptions1.types +++ b/tests/baselines/reference/modularizeLibrary_NoErrorDuplicateLibOptions1.types @@ -58,14 +58,14 @@ m.clear(); // Using ES6 iterable m.keys(); ->m.keys() : BuiltinIterator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->m.keys : () => BuiltinIterator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>m.keys() : MapIterator +> : ^^^^^^^^^^^^^^^^^^^ +>m.keys : () => MapIterator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^ >m : Map > : ^^^^^^^^^^^^^^^^^^^ ->keys : () => BuiltinIterator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>keys : () => MapIterator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^ // Using ES6 function function Baz() { } diff --git a/tests/baselines/reference/modularizeLibrary_NoErrorDuplicateLibOptions2.types b/tests/baselines/reference/modularizeLibrary_NoErrorDuplicateLibOptions2.types index 21ebd84450062..6901043410e96 100644 --- a/tests/baselines/reference/modularizeLibrary_NoErrorDuplicateLibOptions2.types +++ b/tests/baselines/reference/modularizeLibrary_NoErrorDuplicateLibOptions2.types @@ -58,14 +58,14 @@ m.clear(); // Using ES6 iterable m.keys(); ->m.keys() : BuiltinIterator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->m.keys : () => BuiltinIterator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>m.keys() : MapIterator +> : ^^^^^^^^^^^^^^^^^^^ +>m.keys : () => MapIterator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^ >m : Map > : ^^^^^^^^^^^^^^^^^^^ ->keys : () => BuiltinIterator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>keys : () => MapIterator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^ // Using ES6 function function Baz() { } diff --git a/tests/baselines/reference/modularizeLibrary_TargetES5UsingES6Lib.types b/tests/baselines/reference/modularizeLibrary_TargetES5UsingES6Lib.types index 14688b34b1362..a1da8cedb1464 100644 --- a/tests/baselines/reference/modularizeLibrary_TargetES5UsingES6Lib.types +++ b/tests/baselines/reference/modularizeLibrary_TargetES5UsingES6Lib.types @@ -58,14 +58,14 @@ m.clear(); // Using ES6 iterable m.keys(); ->m.keys() : BuiltinIterator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->m.keys : () => BuiltinIterator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>m.keys() : MapIterator +> : ^^^^^^^^^^^^^^^^^^^ +>m.keys : () => MapIterator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^ >m : Map > : ^^^^^^^^^^^^^^^^^^^ ->keys : () => BuiltinIterator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>keys : () => MapIterator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^ // Using ES6 function function Baz() { } diff --git a/tests/baselines/reference/modularizeLibrary_TargetES6UsingES6Lib.types b/tests/baselines/reference/modularizeLibrary_TargetES6UsingES6Lib.types index 67cc3c013d5a8..dad02bc4bf693 100644 --- a/tests/baselines/reference/modularizeLibrary_TargetES6UsingES6Lib.types +++ b/tests/baselines/reference/modularizeLibrary_TargetES6UsingES6Lib.types @@ -58,14 +58,14 @@ m.clear(); // Using ES6 iterable m.keys(); ->m.keys() : BuiltinIterator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->m.keys : () => BuiltinIterator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>m.keys() : MapIterator +> : ^^^^^^^^^^^^^^^^^^^ +>m.keys : () => MapIterator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^ >m : Map > : ^^^^^^^^^^^^^^^^^^^ ->keys : () => BuiltinIterator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>keys : () => MapIterator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^ // Using ES6 function function Baz() { } diff --git a/tests/baselines/reference/narrowingPastLastAssignment.types b/tests/baselines/reference/narrowingPastLastAssignment.types index ba185b982df4f..057c24d71516e 100644 --- a/tests/baselines/reference/narrowingPastLastAssignment.types +++ b/tests/baselines/reference/narrowingPastLastAssignment.types @@ -2,7 +2,7 @@ === Performance Stats === Type Count: 1,000 -Instantiation count: 1,000 +Instantiation count: 2,500 === narrowingPastLastAssignment.ts === function action(f: Function) {} diff --git a/tests/baselines/reference/parenthesizedJSDocCastAtReturnStatement.types b/tests/baselines/reference/parenthesizedJSDocCastAtReturnStatement.types index e138921e963b2..61141eebd4c63 100644 --- a/tests/baselines/reference/parenthesizedJSDocCastAtReturnStatement.types +++ b/tests/baselines/reference/parenthesizedJSDocCastAtReturnStatement.types @@ -2,7 +2,7 @@ === Performance Stats === Type Count: 1,000 -Instantiation count: 1,000 +Instantiation count: 2,500 === index.js === /** @type {Map>} */ diff --git a/tests/baselines/reference/parser.asyncGenerators.classMethods.es2018.types b/tests/baselines/reference/parser.asyncGenerators.classMethods.es2018.types index 41859c1f7190e..1aa65a69c8cd4 100644 --- a/tests/baselines/reference/parser.asyncGenerators.classMethods.es2018.types +++ b/tests/baselines/reference/parser.asyncGenerators.classMethods.es2018.types @@ -221,8 +221,8 @@ class C16 { > : ^^^ async * f() { ->f : () => AsyncGenerator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>f : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ yield * []; >yield * [] : any diff --git a/tests/baselines/reference/parser.asyncGenerators.functionDeclarations.es2018.types b/tests/baselines/reference/parser.asyncGenerators.functionDeclarations.es2018.types index 145171838a86b..8b708f94c95a6 100644 --- a/tests/baselines/reference/parser.asyncGenerators.functionDeclarations.es2018.types +++ b/tests/baselines/reference/parser.asyncGenerators.functionDeclarations.es2018.types @@ -142,8 +142,8 @@ async function * f15() { } === yieldStarWithValueIsOk.ts === async function * f16() { ->f16 : () => AsyncGenerator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>f16 : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ yield * []; >yield * [] : any diff --git a/tests/baselines/reference/parser.asyncGenerators.functionExpressions.es2018.types b/tests/baselines/reference/parser.asyncGenerators.functionExpressions.es2018.types index 9082a5732d5a0..036bdb2f62b80 100644 --- a/tests/baselines/reference/parser.asyncGenerators.functionExpressions.es2018.types +++ b/tests/baselines/reference/parser.asyncGenerators.functionExpressions.es2018.types @@ -188,10 +188,10 @@ const f15 = async function * () { }; === yieldStarWithValueIsOk.ts === const f16 = async function * () { ->f16 : () => AsyncGenerator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->async function * () { yield * [];} : () => AsyncGenerator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>f16 : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>async function * () { yield * [];} : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ yield * []; >yield * [] : any diff --git a/tests/baselines/reference/parser.asyncGenerators.objectLiteralMethods.es2018.types b/tests/baselines/reference/parser.asyncGenerators.objectLiteralMethods.es2018.types index a1c287cfa1fd3..0a67b43853d48 100644 --- a/tests/baselines/reference/parser.asyncGenerators.objectLiteralMethods.es2018.types +++ b/tests/baselines/reference/parser.asyncGenerators.objectLiteralMethods.es2018.types @@ -247,14 +247,14 @@ const o15 = { }; === yieldStarWithValueIsOk.ts === const o16 = { ->o16 : { f(): AsyncGenerator; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->{ async * f() { yield * []; }} : { f(): AsyncGenerator; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>o16 : { f(): AsyncGenerator; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>{ async * f() { yield * []; }} : { f(): AsyncGenerator; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ async * f() { ->f : () => AsyncGenerator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>f : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ yield * []; >yield * [] : any diff --git a/tests/baselines/reference/regexMatchAll-esnext.types b/tests/baselines/reference/regexMatchAll-esnext.types index 80790de11283e..af8bf8d1466a9 100644 --- a/tests/baselines/reference/regexMatchAll-esnext.types +++ b/tests/baselines/reference/regexMatchAll-esnext.types @@ -2,12 +2,12 @@ === regexMatchAll-esnext.ts === const matches = /\w/g[Symbol.matchAll]("matchAll"); ->matches : BuiltinIterator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->/\w/g[Symbol.matchAll]("matchAll") : BuiltinIterator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->/\w/g[Symbol.matchAll] : (str: string) => BuiltinIterator -> : ^ ^^ ^^^^^ +>matches : RegExpStringIterator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>/\w/g[Symbol.matchAll]("matchAll") : RegExpStringIterator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>/\w/g[Symbol.matchAll] : (str: string) => RegExpStringIterator +> : ^ ^^ ^^^^^ >/\w/g : RegExp > : ^^^^^^ >Symbol.matchAll : unique symbol @@ -26,8 +26,8 @@ const array = [...matches]; > : ^^^^^^^^^^^^^^^^^^ >...matches : RegExpMatchArray > : ^^^^^^^^^^^^^^^^ ->matches : BuiltinIterator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>matches : RegExpStringIterator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ const { index, input } = array[0]; >index : number diff --git a/tests/baselines/reference/regexMatchAll.types b/tests/baselines/reference/regexMatchAll.types index 3237c73dba1d3..9b937a0577e25 100644 --- a/tests/baselines/reference/regexMatchAll.types +++ b/tests/baselines/reference/regexMatchAll.types @@ -2,12 +2,12 @@ === regexMatchAll.ts === const matches = /\w/g[Symbol.matchAll]("matchAll"); ->matches : BuiltinIterator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->/\w/g[Symbol.matchAll]("matchAll") : BuiltinIterator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->/\w/g[Symbol.matchAll] : (str: string) => BuiltinIterator -> : ^ ^^ ^^^^^ +>matches : RegExpStringIterator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>/\w/g[Symbol.matchAll]("matchAll") : RegExpStringIterator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>/\w/g[Symbol.matchAll] : (str: string) => RegExpStringIterator +> : ^ ^^ ^^^^^ >/\w/g : RegExp > : ^^^^^^ >Symbol.matchAll : unique symbol @@ -26,8 +26,8 @@ const array = [...matches]; > : ^^^^^^^^^^^^^^^^^^ >...matches : RegExpMatchArray > : ^^^^^^^^^^^^^^^^ ->matches : BuiltinIterator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>matches : RegExpStringIterator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ const { index, input } = array[0]; >index : number diff --git a/tests/baselines/reference/stringMatchAll.types b/tests/baselines/reference/stringMatchAll.types index 13e45697d8bcd..0de59f913a9a2 100644 --- a/tests/baselines/reference/stringMatchAll.types +++ b/tests/baselines/reference/stringMatchAll.types @@ -2,16 +2,16 @@ === stringMatchAll.ts === const matches = "matchAll".matchAll(/\w/g); ->matches : BuiltinIterator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->"matchAll".matchAll(/\w/g) : BuiltinIterator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->"matchAll".matchAll : (regexp: RegExp) => BuiltinIterator -> : ^ ^^ ^^^^^ +>matches : RegExpStringIterator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>"matchAll".matchAll(/\w/g) : RegExpStringIterator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>"matchAll".matchAll : (regexp: RegExp) => RegExpStringIterator +> : ^ ^^ ^^^^^ >"matchAll" : "matchAll" > : ^^^^^^^^^^ ->matchAll : (regexp: RegExp) => BuiltinIterator -> : ^ ^^ ^^^^^ +>matchAll : (regexp: RegExp) => RegExpStringIterator +> : ^ ^^ ^^^^^ >/\w/g : RegExp > : ^^^^^^ @@ -22,8 +22,8 @@ const array = [...matches]; > : ^^^^^^^^^^^^^^^^^ >...matches : RegExpExecArray > : ^^^^^^^^^^^^^^^ ->matches : BuiltinIterator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>matches : RegExpStringIterator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ const { index, input } = array[0]; >index : number diff --git a/tests/baselines/reference/substitutionTypePassedToExtends.types b/tests/baselines/reference/substitutionTypePassedToExtends.types index a5d81c4699c7a..102d4d17d567f 100644 --- a/tests/baselines/reference/substitutionTypePassedToExtends.types +++ b/tests/baselines/reference/substitutionTypePassedToExtends.types @@ -2,7 +2,7 @@ === Performance Stats === Type Count: 500 -> 1,000 -Instantiation count: 100 -> 1,000 +Instantiation count: 100 -> 2,500 === substitutionTypePassedToExtends.ts === type Foo1 = [A, B] extends unknown[][] ? Bar1<[A, B]> : 'else' diff --git a/tests/baselines/reference/types.asyncGenerators.es2018.1.types b/tests/baselines/reference/types.asyncGenerators.es2018.1.types index 2d2f8df98e490..1cb91c6012c40 100644 --- a/tests/baselines/reference/types.asyncGenerators.es2018.1.types +++ b/tests/baselines/reference/types.asyncGenerators.es2018.1.types @@ -61,8 +61,8 @@ async function * inferReturnType5() { > : ^ } async function * inferReturnType6() { ->inferReturnType6 : () => AsyncGenerator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>inferReturnType6 : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ yield* [1, 2]; >yield* [1, 2] : any @@ -74,8 +74,8 @@ async function * inferReturnType6() { > : ^ } async function * inferReturnType7() { ->inferReturnType7 : () => AsyncGenerator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>inferReturnType7 : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ yield* [Promise.resolve(1)]; >yield* [Promise.resolve(1)] : any @@ -144,8 +144,8 @@ const assignability2: () => AsyncIterableIterator = async function * () const assignability3: () => AsyncIterableIterator = async function * () { >assignability3 : () => AsyncIterableIterator > : ^^^^^^ ->async function * () { yield* [1, 2];} : () => AsyncGenerator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>async function * () { yield* [1, 2];} : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ yield* [1, 2]; >yield* [1, 2] : any @@ -160,8 +160,8 @@ const assignability3: () => AsyncIterableIterator = async function * () const assignability4: () => AsyncIterableIterator = async function * () { >assignability4 : () => AsyncIterableIterator > : ^^^^^^ ->async function * () { yield* [Promise.resolve(1)];} : () => AsyncGenerator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>async function * () { yield* [Promise.resolve(1)];} : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ yield* [Promise.resolve(1)]; >yield* [Promise.resolve(1)] : any @@ -234,8 +234,8 @@ const assignability7: () => AsyncIterable = async function * () { const assignability8: () => AsyncIterable = async function * () { >assignability8 : () => AsyncIterable > : ^^^^^^ ->async function * () { yield* [1, 2];} : () => AsyncGenerator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>async function * () { yield* [1, 2];} : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ yield* [1, 2]; >yield* [1, 2] : any @@ -250,8 +250,8 @@ const assignability8: () => AsyncIterable = async function * () { const assignability9: () => AsyncIterable = async function * () { >assignability9 : () => AsyncIterable > : ^^^^^^ ->async function * () { yield* [Promise.resolve(1)];} : () => AsyncGenerator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>async function * () { yield* [Promise.resolve(1)];} : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ yield* [Promise.resolve(1)]; >yield* [Promise.resolve(1)] : any @@ -324,8 +324,8 @@ const assignability12: () => AsyncIterator = async function * () { const assignability13: () => AsyncIterator = async function * () { >assignability13 : () => AsyncIterator > : ^^^^^^ ->async function * () { yield* [1, 2];} : () => AsyncGenerator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>async function * () { yield* [1, 2];} : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ yield* [1, 2]; >yield* [1, 2] : any @@ -340,8 +340,8 @@ const assignability13: () => AsyncIterator = async function * () { const assignability14: () => AsyncIterator = async function * () { >assignability14 : () => AsyncIterator > : ^^^^^^ ->async function * () { yield* [Promise.resolve(1)];} : () => AsyncGenerator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>async function * () { yield* [Promise.resolve(1)];} : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ yield* [Promise.resolve(1)]; >yield* [Promise.resolve(1)] : any diff --git a/tests/baselines/reference/types.asyncGenerators.es2018.2.errors.txt b/tests/baselines/reference/types.asyncGenerators.es2018.2.errors.txt index 4aa4491e4234b..130ef20c6f136 100644 --- a/tests/baselines/reference/types.asyncGenerators.es2018.2.errors.txt +++ b/tests/baselines/reference/types.asyncGenerators.es2018.2.errors.txt @@ -8,8 +8,8 @@ types.asyncGenerators.es2018.2.ts(10,7): error TS2322: Type '() => AsyncGenerato Type 'IteratorYieldResult' is not assignable to type 'IteratorResult'. Type 'IteratorYieldResult' is not assignable to type 'IteratorYieldResult'. Type 'string' is not assignable to type 'number'. -types.asyncGenerators.es2018.2.ts(13,7): error TS2322: Type '() => AsyncGenerator' is not assignable to type '() => AsyncIterableIterator'. - Call signature return types 'AsyncGenerator' and 'AsyncIterableIterator' are incompatible. +types.asyncGenerators.es2018.2.ts(13,7): error TS2322: Type '() => AsyncGenerator' is not assignable to type '() => AsyncIterableIterator'. + Call signature return types 'AsyncGenerator' and 'AsyncIterableIterator' are incompatible. The types returned by 'next(...)' are incompatible between these types. Type 'Promise>' is not assignable to type 'Promise>'. Type 'IteratorResult' is not assignable to type 'IteratorResult'. @@ -32,8 +32,8 @@ types.asyncGenerators.es2018.2.ts(19,7): error TS2322: Type '() => AsyncGenerato Type 'IteratorYieldResult' is not assignable to type 'IteratorResult'. Type 'IteratorYieldResult' is not assignable to type 'IteratorYieldResult'. Type 'string' is not assignable to type 'number'. -types.asyncGenerators.es2018.2.ts(22,7): error TS2322: Type '() => AsyncGenerator' is not assignable to type '() => AsyncIterable'. - Call signature return types 'AsyncGenerator' and 'AsyncIterable' are incompatible. +types.asyncGenerators.es2018.2.ts(22,7): error TS2322: Type '() => AsyncGenerator' is not assignable to type '() => AsyncIterable'. + Call signature return types 'AsyncGenerator' and 'AsyncIterable' are incompatible. The types returned by '[Symbol.asyncIterator]().next(...)' are incompatible between these types. Type 'Promise>' is not assignable to type 'Promise>'. Type 'IteratorResult' is not assignable to type 'IteratorResult'. @@ -56,8 +56,8 @@ types.asyncGenerators.es2018.2.ts(28,7): error TS2322: Type '() => AsyncGenerato Type 'IteratorYieldResult' is not assignable to type 'IteratorResult'. Type 'IteratorYieldResult' is not assignable to type 'IteratorYieldResult'. Type 'string' is not assignable to type 'number'. -types.asyncGenerators.es2018.2.ts(31,7): error TS2322: Type '() => AsyncGenerator' is not assignable to type '() => AsyncIterator'. - Call signature return types 'AsyncGenerator' and 'AsyncIterator' are incompatible. +types.asyncGenerators.es2018.2.ts(31,7): error TS2322: Type '() => AsyncGenerator' is not assignable to type '() => AsyncIterator'. + Call signature return types 'AsyncGenerator' and 'AsyncIterator' are incompatible. The types returned by 'next(...)' are incompatible between these types. Type 'Promise>' is not assignable to type 'Promise>'. Type 'IteratorResult' is not assignable to type 'IteratorResult'. @@ -118,8 +118,8 @@ types.asyncGenerators.es2018.2.ts(74,12): error TS2504: Type '{}' must have a '[ }; const assignability2: () => AsyncIterableIterator = async function * () { ~~~~~~~~~~~~~~ -!!! error TS2322: Type '() => AsyncGenerator' is not assignable to type '() => AsyncIterableIterator'. -!!! error TS2322: Call signature return types 'AsyncGenerator' and 'AsyncIterableIterator' are incompatible. +!!! error TS2322: Type '() => AsyncGenerator' is not assignable to type '() => AsyncIterableIterator'. +!!! error TS2322: Call signature return types 'AsyncGenerator' and 'AsyncIterableIterator' are incompatible. !!! error TS2322: The types returned by 'next(...)' are incompatible between these types. !!! error TS2322: Type 'Promise>' is not assignable to type 'Promise>'. !!! error TS2322: Type 'IteratorResult' is not assignable to type 'IteratorResult'. @@ -154,8 +154,8 @@ types.asyncGenerators.es2018.2.ts(74,12): error TS2504: Type '{}' must have a '[ }; const assignability5: () => AsyncIterable = async function * () { ~~~~~~~~~~~~~~ -!!! error TS2322: Type '() => AsyncGenerator' is not assignable to type '() => AsyncIterable'. -!!! error TS2322: Call signature return types 'AsyncGenerator' and 'AsyncIterable' are incompatible. +!!! error TS2322: Type '() => AsyncGenerator' is not assignable to type '() => AsyncIterable'. +!!! error TS2322: Call signature return types 'AsyncGenerator' and 'AsyncIterable' are incompatible. !!! error TS2322: The types returned by '[Symbol.asyncIterator]().next(...)' are incompatible between these types. !!! error TS2322: Type 'Promise>' is not assignable to type 'Promise>'. !!! error TS2322: Type 'IteratorResult' is not assignable to type 'IteratorResult'. @@ -190,8 +190,8 @@ types.asyncGenerators.es2018.2.ts(74,12): error TS2504: Type '{}' must have a '[ }; const assignability8: () => AsyncIterator = async function * () { ~~~~~~~~~~~~~~ -!!! error TS2322: Type '() => AsyncGenerator' is not assignable to type '() => AsyncIterator'. -!!! error TS2322: Call signature return types 'AsyncGenerator' and 'AsyncIterator' are incompatible. +!!! error TS2322: Type '() => AsyncGenerator' is not assignable to type '() => AsyncIterator'. +!!! error TS2322: Call signature return types 'AsyncGenerator' and 'AsyncIterator' are incompatible. !!! error TS2322: The types returned by 'next(...)' are incompatible between these types. !!! error TS2322: Type 'Promise>' is not assignable to type 'Promise>'. !!! error TS2322: Type 'IteratorResult' is not assignable to type 'IteratorResult'. diff --git a/tests/baselines/reference/types.asyncGenerators.es2018.2.types b/tests/baselines/reference/types.asyncGenerators.es2018.2.types index 1f65af986e913..466a9ef6e7039 100644 --- a/tests/baselines/reference/types.asyncGenerators.es2018.2.types +++ b/tests/baselines/reference/types.asyncGenerators.es2018.2.types @@ -61,8 +61,8 @@ const assignability1: () => AsyncIterableIterator = async function * () const assignability2: () => AsyncIterableIterator = async function * () { >assignability2 : () => AsyncIterableIterator > : ^^^^^^ ->async function * () { yield* ["a", "b"];} : () => AsyncGenerator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>async function * () { yield* ["a", "b"];} : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ yield* ["a", "b"]; >yield* ["a", "b"] : any @@ -112,8 +112,8 @@ const assignability4: () => AsyncIterable = async function * () { const assignability5: () => AsyncIterable = async function * () { >assignability5 : () => AsyncIterable > : ^^^^^^ ->async function * () { yield* ["a", "b"];} : () => AsyncGenerator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>async function * () { yield* ["a", "b"];} : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ yield* ["a", "b"]; >yield* ["a", "b"] : any @@ -163,8 +163,8 @@ const assignability7: () => AsyncIterator = async function * () { const assignability8: () => AsyncIterator = async function * () { >assignability8 : () => AsyncIterator > : ^^^^^^ ->async function * () { yield* ["a", "b"];} : () => AsyncGenerator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>async function * () { yield* ["a", "b"];} : () => AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ yield* ["a", "b"]; >yield* ["a", "b"] : any diff --git a/tests/baselines/reference/yieldExpressionInnerCommentEmit.types b/tests/baselines/reference/yieldExpressionInnerCommentEmit.types index bba612bd5c756..58f588f237f80 100644 --- a/tests/baselines/reference/yieldExpressionInnerCommentEmit.types +++ b/tests/baselines/reference/yieldExpressionInnerCommentEmit.types @@ -2,8 +2,8 @@ === yieldExpressionInnerCommentEmit.ts === function * foo2() { ->foo2 : () => Generator -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>foo2 : () => Generator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /*comment1*/ yield 1; >yield 1 : any diff --git a/tests/cases/compiler/builtinIterator.ts b/tests/cases/compiler/builtinIterator.ts index 3b20d9fe53dda..e80bda3e44ab1 100644 --- a/tests/cases/compiler/builtinIterator.ts +++ b/tests/cases/compiler/builtinIterator.ts @@ -72,5 +72,5 @@ class BadIterator3 extends Iterator { declare const g1: Generator; const iter1 = Iterator.from(g1); -declare const iter2: BuiltinIterator; +declare const iter2: IteratorObject; const iter3 = iter2.flatMap(() => g1); \ No newline at end of file diff --git a/tests/cases/compiler/iterableTReturnTNext.ts b/tests/cases/compiler/iterableTReturnTNext.ts index f51ecdbf019e4..f17276e4c6797 100644 --- a/tests/cases/compiler/iterableTReturnTNext.ts +++ b/tests/cases/compiler/iterableTReturnTNext.ts @@ -38,9 +38,9 @@ class MyMap implements Map { get(key: string): number | undefined { return undefined; } has(key: string): boolean { return false; } set(key: string, value: number): this { return this; } - entries(): BuiltinIterator<[string, number], BuiltinIteratorReturn> { throw new Error("Method not implemented."); } - keys(): BuiltinIterator { throw new Error("Method not implemented."); } - [Symbol.iterator](): BuiltinIterator<[string, number], BuiltinIteratorReturn> { throw new Error("Method not implemented."); } + entries(): MapIterator<[string, number]> { throw new Error("Method not implemented."); } + keys(): MapIterator { throw new Error("Method not implemented."); } + [Symbol.iterator](): MapIterator<[string, number]> { throw new Error("Method not implemented."); } // error when strictBuiltinIteratorReturn is true because values() has implicit `void` return, which isn't assignable to `undefined` * values() { diff --git a/tests/cases/conformance/es6/for-ofStatements/for-of14.ts b/tests/cases/conformance/es6/for-ofStatements/for-of14.ts index f79794d59d507..a20b564163c4b 100644 --- a/tests/cases/conformance/es6/for-ofStatements/for-of14.ts +++ b/tests/cases/conformance/es6/for-ofStatements/for-of14.ts @@ -1,9 +1,9 @@ //@target: ES6 -class StringIterator { +class MyStringIterator { next() { return ""; } } var v: string; -for (v of new StringIterator) { } // Should fail because the iterator is not iterable \ No newline at end of file +for (v of new MyStringIterator) { } // Should fail because the iterator is not iterable \ No newline at end of file diff --git a/tests/cases/conformance/es6/for-ofStatements/for-of15.ts b/tests/cases/conformance/es6/for-ofStatements/for-of15.ts index b2e788bdef247..7c30b32593b72 100644 --- a/tests/cases/conformance/es6/for-ofStatements/for-of15.ts +++ b/tests/cases/conformance/es6/for-ofStatements/for-of15.ts @@ -1,5 +1,5 @@ //@target: ES6 -class StringIterator { +class MyStringIterator { next() { return ""; } @@ -9,4 +9,4 @@ class StringIterator { } var v: string; -for (v of new StringIterator) { } // Should fail \ No newline at end of file +for (v of new MyStringIterator) { } // Should fail \ No newline at end of file diff --git a/tests/cases/conformance/es6/for-ofStatements/for-of16.ts b/tests/cases/conformance/es6/for-ofStatements/for-of16.ts index b63e061425ee9..a5918dd94062b 100644 --- a/tests/cases/conformance/es6/for-ofStatements/for-of16.ts +++ b/tests/cases/conformance/es6/for-ofStatements/for-of16.ts @@ -1,11 +1,11 @@ //@target: ES6 -class StringIterator { +class MyStringIterator { [Symbol.iterator]() { return this; } } var v: string; -for (v of new StringIterator) { } // Should fail +for (v of new MyStringIterator) { } // Should fail -for (v of new StringIterator) { } // Should still fail (related errors should still be shown even though type is cached). \ No newline at end of file +for (v of new MyStringIterator) { } // Should still fail (related errors should still be shown even though type is cached). \ No newline at end of file diff --git a/tests/cases/conformance/es6/for-ofStatements/for-of18.ts b/tests/cases/conformance/es6/for-ofStatements/for-of18.ts index 647ae314b4d86..88f18cc88c3b6 100644 --- a/tests/cases/conformance/es6/for-ofStatements/for-of18.ts +++ b/tests/cases/conformance/es6/for-ofStatements/for-of18.ts @@ -1,5 +1,5 @@ //@target: ES6 -class StringIterator { +class MyStringIterator { next() { return { value: "", @@ -12,4 +12,4 @@ class StringIterator { } var v: string; -for (v of new StringIterator) { } // Should succeed \ No newline at end of file +for (v of new MyStringIterator) { } // Should succeed \ No newline at end of file diff --git a/tests/cases/conformance/es6/for-ofStatements/for-of25.ts b/tests/cases/conformance/es6/for-ofStatements/for-of25.ts index 61e6a58ce30fd..f63137c6cfc4e 100644 --- a/tests/cases/conformance/es6/for-ofStatements/for-of25.ts +++ b/tests/cases/conformance/es6/for-ofStatements/for-of25.ts @@ -1,9 +1,9 @@ //@target: ES6 -class StringIterator { +class MyStringIterator { [Symbol.iterator]() { return x; } } var x: any; -for (var v of new StringIterator) { } \ No newline at end of file +for (var v of new MyStringIterator) { } \ No newline at end of file diff --git a/tests/cases/conformance/es6/for-ofStatements/for-of26.ts b/tests/cases/conformance/es6/for-ofStatements/for-of26.ts index 4414fdc1592a3..8dd94be99018f 100644 --- a/tests/cases/conformance/es6/for-ofStatements/for-of26.ts +++ b/tests/cases/conformance/es6/for-ofStatements/for-of26.ts @@ -1,5 +1,5 @@ //@target: ES6 -class StringIterator { +class MyStringIterator { next() { return x; } @@ -9,4 +9,4 @@ class StringIterator { } var x: any; -for (var v of new StringIterator) { } \ No newline at end of file +for (var v of new MyStringIterator) { } \ No newline at end of file diff --git a/tests/cases/conformance/es6/for-ofStatements/for-of27.ts b/tests/cases/conformance/es6/for-ofStatements/for-of27.ts index f7244eed34c22..a87960cd4411d 100644 --- a/tests/cases/conformance/es6/for-ofStatements/for-of27.ts +++ b/tests/cases/conformance/es6/for-ofStatements/for-of27.ts @@ -1,6 +1,6 @@ //@target: ES6 -class StringIterator { +class MyStringIterator { [Symbol.iterator]: any; } -for (var v of new StringIterator) { } \ No newline at end of file +for (var v of new MyStringIterator) { } \ No newline at end of file diff --git a/tests/cases/conformance/es6/for-ofStatements/for-of28.ts b/tests/cases/conformance/es6/for-ofStatements/for-of28.ts index e1b86f6135f05..bb241e389ac24 100644 --- a/tests/cases/conformance/es6/for-ofStatements/for-of28.ts +++ b/tests/cases/conformance/es6/for-ofStatements/for-of28.ts @@ -1,9 +1,9 @@ //@target: ES6 -class StringIterator { +class MyStringIterator { next: any; [Symbol.iterator]() { return this; } } -for (var v of new StringIterator) { } \ No newline at end of file +for (var v of new MyStringIterator) { } \ No newline at end of file diff --git a/tests/cases/conformance/es6/for-ofStatements/for-of30.ts b/tests/cases/conformance/es6/for-ofStatements/for-of30.ts index 3d8ac3a93af51..019f71a0f4cd1 100644 --- a/tests/cases/conformance/es6/for-ofStatements/for-of30.ts +++ b/tests/cases/conformance/es6/for-ofStatements/for-of30.ts @@ -1,5 +1,5 @@ //@target: ES6 -class StringIterator { +class MyStringIterator { next() { return { done: false, @@ -14,4 +14,4 @@ class StringIterator { } } -for (var v of new StringIterator) { } \ No newline at end of file +for (var v of new MyStringIterator) { } \ No newline at end of file diff --git a/tests/cases/conformance/es6/for-ofStatements/for-of31.ts b/tests/cases/conformance/es6/for-ofStatements/for-of31.ts index 1e8d7e106301b..847d7d0dd7cb1 100644 --- a/tests/cases/conformance/es6/for-ofStatements/for-of31.ts +++ b/tests/cases/conformance/es6/for-ofStatements/for-of31.ts @@ -1,5 +1,5 @@ //@target: ES6 -class StringIterator { +class MyStringIterator { next() { return { // no done property @@ -12,4 +12,4 @@ class StringIterator { } } -for (var v of new StringIterator) { } \ No newline at end of file +for (var v of new MyStringIterator) { } \ No newline at end of file diff --git a/tests/cases/conformance/es6/for-ofStatements/for-of33.ts b/tests/cases/conformance/es6/for-ofStatements/for-of33.ts index f0af5c4a40820..f952c23e09cd5 100644 --- a/tests/cases/conformance/es6/for-ofStatements/for-of33.ts +++ b/tests/cases/conformance/es6/for-ofStatements/for-of33.ts @@ -1,9 +1,9 @@ //@target: ES6 //@noImplicitAny: true -class StringIterator { +class MyStringIterator { [Symbol.iterator]() { return v; } } -for (var v of new StringIterator) { } \ No newline at end of file +for (var v of new MyStringIterator) { } \ No newline at end of file diff --git a/tests/cases/conformance/es6/for-ofStatements/for-of34.ts b/tests/cases/conformance/es6/for-ofStatements/for-of34.ts index b38a6a68bf663..d7cecf6a40f7e 100644 --- a/tests/cases/conformance/es6/for-ofStatements/for-of34.ts +++ b/tests/cases/conformance/es6/for-ofStatements/for-of34.ts @@ -1,6 +1,6 @@ //@target: ES6 //@noImplicitAny: true -class StringIterator { +class MyStringIterator { next() { return v; } @@ -10,4 +10,4 @@ class StringIterator { } } -for (var v of new StringIterator) { } \ No newline at end of file +for (var v of new MyStringIterator) { } \ No newline at end of file diff --git a/tests/cases/conformance/es6/for-ofStatements/for-of35.ts b/tests/cases/conformance/es6/for-ofStatements/for-of35.ts index 041f611699e2f..148260323f614 100644 --- a/tests/cases/conformance/es6/for-ofStatements/for-of35.ts +++ b/tests/cases/conformance/es6/for-ofStatements/for-of35.ts @@ -1,6 +1,6 @@ //@target: ES6 //@noImplicitAny: true -class StringIterator { +class MyStringIterator { next() { return { done: true, @@ -13,4 +13,4 @@ class StringIterator { } } -for (var v of new StringIterator) { } \ No newline at end of file +for (var v of new MyStringIterator) { } \ No newline at end of file diff --git a/tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck10.ts b/tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck10.ts index b832d57855ed2..f5f96e5c44a29 100644 --- a/tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck10.ts +++ b/tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck10.ts @@ -1,7 +1,7 @@ //@target: ES5 // In ES3/5, you cannot for...of over an arbitrary iterable. -class StringIterator { +class MyStringIterator { next() { return { done: true, @@ -13,4 +13,4 @@ class StringIterator { } } -for (var v of new StringIterator) { } \ No newline at end of file +for (var v of new MyStringIterator) { } \ No newline at end of file From 99878128f032786bd3ad1295402a04ca7002eeb2 Mon Sep 17 00:00:00 2001 From: Jake Bailey <5341706+jakebailey@users.noreply.github.com> Date: Tue, 6 Aug 2024 15:01:46 -0700 Subject: [PATCH 09/50] Don't treat an instantiation expression as an assertion in skipOuterExpressions (#59538) --- src/compiler/factory/nodeFactory.ts | 2 + src/compiler/factory/utilities.ts | 3 +- src/compiler/transformers/ts.ts | 2 +- src/compiler/types.ts | 6 +- tests/baselines/reference/api/typescript.d.ts | 5 +- ...gnmentToInstantiationExpression.errors.txt | 26 ++++++++ .../assignmentToInstantiationExpression.js | 23 +++++++ ...ssignmentToInstantiationExpression.symbols | 32 ++++++++++ .../assignmentToInstantiationExpression.types | 61 +++++++++++++++++++ .../assignmentToInstantiationExpression.ts | 12 ++++ 10 files changed, 166 insertions(+), 6 deletions(-) create mode 100644 tests/baselines/reference/assignmentToInstantiationExpression.errors.txt create mode 100644 tests/baselines/reference/assignmentToInstantiationExpression.js create mode 100644 tests/baselines/reference/assignmentToInstantiationExpression.symbols create mode 100644 tests/baselines/reference/assignmentToInstantiationExpression.types create mode 100644 tests/cases/compiler/assignmentToInstantiationExpression.ts diff --git a/src/compiler/factory/nodeFactory.ts b/src/compiler/factory/nodeFactory.ts index c90e4c71f19f5..8f3b15690f7e2 100644 --- a/src/compiler/factory/nodeFactory.ts +++ b/src/compiler/factory/nodeFactory.ts @@ -6553,6 +6553,8 @@ export function createNodeFactory(flags: NodeFactoryFlags, baseFactory: BaseNode return updateSatisfiesExpression(outerExpression, expression, outerExpression.type); case SyntaxKind.NonNullExpression: return updateNonNullExpression(outerExpression, expression); + case SyntaxKind.ExpressionWithTypeArguments: + return updateExpressionWithTypeArguments(outerExpression, expression, outerExpression.typeArguments); case SyntaxKind.PartiallyEmittedExpression: return updatePartiallyEmittedExpression(outerExpression, expression); } diff --git a/src/compiler/factory/utilities.ts b/src/compiler/factory/utilities.ts index 852017bd5012e..d6d0de9e515c1 100644 --- a/src/compiler/factory/utilities.ts +++ b/src/compiler/factory/utilities.ts @@ -630,9 +630,10 @@ export function isOuterExpression(node: Node, kinds = OuterExpressionKinds.All): return (kinds & OuterExpressionKinds.Parentheses) !== 0; case SyntaxKind.TypeAssertionExpression: case SyntaxKind.AsExpression: - case SyntaxKind.ExpressionWithTypeArguments: case SyntaxKind.SatisfiesExpression: return (kinds & OuterExpressionKinds.TypeAssertions) !== 0; + case SyntaxKind.ExpressionWithTypeArguments: + return (kinds & OuterExpressionKinds.ExpressionsWithTypeArguments) !== 0; case SyntaxKind.NonNullExpression: return (kinds & OuterExpressionKinds.NonNullAssertions) !== 0; case SyntaxKind.PartiallyEmittedExpression: diff --git a/src/compiler/transformers/ts.ts b/src/compiler/transformers/ts.ts index 668da90d8e696..d2b3e1121f406 100644 --- a/src/compiler/transformers/ts.ts +++ b/src/compiler/transformers/ts.ts @@ -1689,7 +1689,7 @@ export function transformTypeScript(context: TransformationContext) { } function visitParenthesizedExpression(node: ParenthesizedExpression): Expression { - const innerExpression = skipOuterExpressions(node.expression, ~OuterExpressionKinds.Assertions); + const innerExpression = skipOuterExpressions(node.expression, ~(OuterExpressionKinds.Assertions | OuterExpressionKinds.ExpressionsWithTypeArguments)); if (isAssertionExpression(innerExpression) || isSatisfiesExpression(innerExpression)) { // Make sure we consider all nested cast expressions, e.g.: // (-A).x; diff --git a/src/compiler/types.ts b/src/compiler/types.ts index 564fa64e1294c..9b0ab54b0aa0e 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -8476,11 +8476,12 @@ export const enum OuterExpressionKinds { TypeAssertions = 1 << 1, NonNullAssertions = 1 << 2, PartiallyEmittedExpressions = 1 << 3, + ExpressionsWithTypeArguments = 1 << 4, Assertions = TypeAssertions | NonNullAssertions, - All = Parentheses | Assertions | PartiallyEmittedExpressions, + All = Parentheses | Assertions | PartiallyEmittedExpressions | ExpressionsWithTypeArguments, - ExcludeJSDocTypeAssertion = 1 << 4, + ExcludeJSDocTypeAssertion = 1 << 31, } /** @internal */ @@ -8490,6 +8491,7 @@ export type OuterExpression = | SatisfiesExpression | AsExpression | NonNullExpression + | ExpressionWithTypeArguments | PartiallyEmittedExpression; /** @internal */ diff --git a/tests/baselines/reference/api/typescript.d.ts b/tests/baselines/reference/api/typescript.d.ts index 8275e4222820c..0e82d5ba67891 100644 --- a/tests/baselines/reference/api/typescript.d.ts +++ b/tests/baselines/reference/api/typescript.d.ts @@ -7346,9 +7346,10 @@ declare namespace ts { TypeAssertions = 2, NonNullAssertions = 4, PartiallyEmittedExpressions = 8, + ExpressionsWithTypeArguments = 16, Assertions = 6, - All = 15, - ExcludeJSDocTypeAssertion = 16, + All = 31, + ExcludeJSDocTypeAssertion = -2147483648, } type ImmediatelyInvokedFunctionExpression = CallExpression & { readonly expression: FunctionExpression; diff --git a/tests/baselines/reference/assignmentToInstantiationExpression.errors.txt b/tests/baselines/reference/assignmentToInstantiationExpression.errors.txt new file mode 100644 index 0000000000000..ba7138811a12b --- /dev/null +++ b/tests/baselines/reference/assignmentToInstantiationExpression.errors.txt @@ -0,0 +1,26 @@ +assignmentToInstantiationExpression.ts(2,1): error TS2364: The left-hand side of an assignment expression must be a variable or a property access. +assignmentToInstantiationExpression.ts(6,1): error TS2454: Variable 'getValue' is used before being assigned. +assignmentToInstantiationExpression.ts(6,1): error TS2364: The left-hand side of an assignment expression must be a variable or a property access. +assignmentToInstantiationExpression.ts(10,1): error TS2364: The left-hand side of an assignment expression must be a variable or a property access. + + +==== assignmentToInstantiationExpression.ts (4 errors) ==== + let obj: { fn?: () => T } = {}; + obj.fn = () => 1234; + ~~~~~~~~~~~~~~ +!!! error TS2364: The left-hand side of an assignment expression must be a variable or a property access. + + + let getValue: () => T; + getValue = () => 1234; + ~~~~~~~~ +!!! error TS2454: Variable 'getValue' is used before being assigned. + ~~~~~~~~~~~~~~~~ +!!! error TS2364: The left-hand side of an assignment expression must be a variable or a property access. + + + let getValue2!: () => T; + getValue2 = () => 1234; + ~~~~~~~~~~~~~~~~~ +!!! error TS2364: The left-hand side of an assignment expression must be a variable or a property access. + \ No newline at end of file diff --git a/tests/baselines/reference/assignmentToInstantiationExpression.js b/tests/baselines/reference/assignmentToInstantiationExpression.js new file mode 100644 index 0000000000000..e9a1d61ba0ff4 --- /dev/null +++ b/tests/baselines/reference/assignmentToInstantiationExpression.js @@ -0,0 +1,23 @@ +//// [tests/cases/compiler/assignmentToInstantiationExpression.ts] //// + +//// [assignmentToInstantiationExpression.ts] +let obj: { fn?: () => T } = {}; +obj.fn = () => 1234; + + +let getValue: () => T; +getValue = () => 1234; + + +let getValue2!: () => T; +getValue2 = () => 1234; + + +//// [assignmentToInstantiationExpression.js] +"use strict"; +var obj = {}; +(obj.fn) = function () { return 1234; }; +var getValue; +(getValue) = function () { return 1234; }; +var getValue2; +(getValue2) = function () { return 1234; }; diff --git a/tests/baselines/reference/assignmentToInstantiationExpression.symbols b/tests/baselines/reference/assignmentToInstantiationExpression.symbols new file mode 100644 index 0000000000000..9a4c902040af6 --- /dev/null +++ b/tests/baselines/reference/assignmentToInstantiationExpression.symbols @@ -0,0 +1,32 @@ +//// [tests/cases/compiler/assignmentToInstantiationExpression.ts] //// + +=== assignmentToInstantiationExpression.ts === +let obj: { fn?: () => T } = {}; +>obj : Symbol(obj, Decl(assignmentToInstantiationExpression.ts, 0, 3)) +>fn : Symbol(fn, Decl(assignmentToInstantiationExpression.ts, 0, 10)) +>T : Symbol(T, Decl(assignmentToInstantiationExpression.ts, 0, 17)) +>T : Symbol(T, Decl(assignmentToInstantiationExpression.ts, 0, 17)) + +obj.fn = () => 1234; +>obj.fn : Symbol(fn, Decl(assignmentToInstantiationExpression.ts, 0, 10)) +>obj : Symbol(obj, Decl(assignmentToInstantiationExpression.ts, 0, 3)) +>fn : Symbol(fn, Decl(assignmentToInstantiationExpression.ts, 0, 10)) + + +let getValue: () => T; +>getValue : Symbol(getValue, Decl(assignmentToInstantiationExpression.ts, 4, 3)) +>T : Symbol(T, Decl(assignmentToInstantiationExpression.ts, 4, 15)) +>T : Symbol(T, Decl(assignmentToInstantiationExpression.ts, 4, 15)) + +getValue = () => 1234; +>getValue : Symbol(getValue, Decl(assignmentToInstantiationExpression.ts, 4, 3)) + + +let getValue2!: () => T; +>getValue2 : Symbol(getValue2, Decl(assignmentToInstantiationExpression.ts, 8, 3)) +>T : Symbol(T, Decl(assignmentToInstantiationExpression.ts, 8, 17)) +>T : Symbol(T, Decl(assignmentToInstantiationExpression.ts, 8, 17)) + +getValue2 = () => 1234; +>getValue2 : Symbol(getValue2, Decl(assignmentToInstantiationExpression.ts, 8, 3)) + diff --git a/tests/baselines/reference/assignmentToInstantiationExpression.types b/tests/baselines/reference/assignmentToInstantiationExpression.types new file mode 100644 index 0000000000000..76db87269b4d8 --- /dev/null +++ b/tests/baselines/reference/assignmentToInstantiationExpression.types @@ -0,0 +1,61 @@ +//// [tests/cases/compiler/assignmentToInstantiationExpression.ts] //// + +=== assignmentToInstantiationExpression.ts === +let obj: { fn?: () => T } = {}; +>obj : { fn?: () => T; } +> : ^^^^^^^ ^^^ +>fn : (() => T) | undefined +> : ^^ ^^^^^^^ ^^^^^^^^^^^^^ +>{} : {} +> : ^^ + +obj.fn = () => 1234; +>obj.fn = () => 1234 : () => number +> : ^^^^^^^^^^^^ +>obj.fn : (() => number) | undefined +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^ +>obj.fn : (() => T) | undefined +> : ^^ ^^^^^^^ ^^^^^^^^^^^^^ +>obj : { fn?: () => T; } +> : ^^^^^^^ ^^^ +>fn : (() => T) | undefined +> : ^^ ^^^^^^^ ^^^^^^^^^^^^^ +>() => 1234 : () => number +> : ^^^^^^^^^^^^ +>1234 : 1234 +> : ^^^^ + + +let getValue: () => T; +>getValue : () => T +> : ^ ^^^^^^^ + +getValue = () => 1234; +>getValue = () => 1234 : () => number +> : ^^^^^^^^^^^^ +>getValue : () => number +> : ^^^^^^^^^^^^ +>getValue : () => T +> : ^ ^^^^^^^ +>() => 1234 : () => number +> : ^^^^^^^^^^^^ +>1234 : 1234 +> : ^^^^ + + +let getValue2!: () => T; +>getValue2 : () => T +> : ^ ^^^^^^^ + +getValue2 = () => 1234; +>getValue2 = () => 1234 : () => number +> : ^^^^^^^^^^^^ +>getValue2 : () => number +> : ^^^^^^^^^^^^ +>getValue2 : () => T +> : ^ ^^^^^^^ +>() => 1234 : () => number +> : ^^^^^^^^^^^^ +>1234 : 1234 +> : ^^^^ + diff --git a/tests/cases/compiler/assignmentToInstantiationExpression.ts b/tests/cases/compiler/assignmentToInstantiationExpression.ts new file mode 100644 index 0000000000000..1ebf1f4fbce9f --- /dev/null +++ b/tests/cases/compiler/assignmentToInstantiationExpression.ts @@ -0,0 +1,12 @@ +// @strict: true + +let obj: { fn?: () => T } = {}; +obj.fn = () => 1234; + + +let getValue: () => T; +getValue = () => 1234; + + +let getValue2!: () => T; +getValue2 = () => 1234; From 3cf708e179dfc81956d75cd919733c2cdf2160ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20Burzy=C5=84ski?= Date: Thu, 8 Aug 2024 17:58:20 +0200 Subject: [PATCH 10/50] Fixed types of properties of contextual filtering mapped types (#56201) --- src/compiler/checker.ts | 2 +- ...opertyOfGenericFilteringMappedType.symbols | 90 +++++++++++++ ...PropertyOfGenericFilteringMappedType.types | 127 ++++++++++++++++++ ...ualPropertyOfGenericFilteringMappedType.ts | 33 +++++ 4 files changed, 251 insertions(+), 1 deletion(-) create mode 100644 tests/baselines/reference/contextualPropertyOfGenericFilteringMappedType.symbols create mode 100644 tests/baselines/reference/contextualPropertyOfGenericFilteringMappedType.types create mode 100644 tests/cases/compiler/contextualPropertyOfGenericFilteringMappedType.ts diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 06346c66ba0ac..4cdd0531b1c04 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -31620,7 +31620,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { function getTypeOfPropertyOfContextualType(type: Type, name: __String, nameType?: Type) { return mapType(type, t => { - if (isGenericMappedType(t) && !t.declaration.nameType) { + if (isGenericMappedType(t) && getMappedTypeNameTypeKind(t) !== MappedTypeNameTypeKind.Remapping) { const constraint = getConstraintTypeFromMappedType(t); const constraintOfConstraint = getBaseConstraintOfType(constraint) || constraint; const propertyNameType = nameType || getStringLiteralType(unescapeLeadingUnderscores(name)); diff --git a/tests/baselines/reference/contextualPropertyOfGenericFilteringMappedType.symbols b/tests/baselines/reference/contextualPropertyOfGenericFilteringMappedType.symbols new file mode 100644 index 0000000000000..5bcaba07ec255 --- /dev/null +++ b/tests/baselines/reference/contextualPropertyOfGenericFilteringMappedType.symbols @@ -0,0 +1,90 @@ +//// [tests/cases/compiler/contextualPropertyOfGenericFilteringMappedType.ts] //// + +=== contextualPropertyOfGenericFilteringMappedType.ts === +declare function f1( +>f1 : Symbol(f1, Decl(contextualPropertyOfGenericFilteringMappedType.ts, 0, 0)) +>T : Symbol(T, Decl(contextualPropertyOfGenericFilteringMappedType.ts, 0, 20)) + + data: T, +>data : Symbol(data, Decl(contextualPropertyOfGenericFilteringMappedType.ts, 0, 38)) +>T : Symbol(T, Decl(contextualPropertyOfGenericFilteringMappedType.ts, 0, 20)) + + handlers: { [P in keyof T as P]: (value: T[P], prop: P) => void }, +>handlers : Symbol(handlers, Decl(contextualPropertyOfGenericFilteringMappedType.ts, 1, 10)) +>P : Symbol(P, Decl(contextualPropertyOfGenericFilteringMappedType.ts, 2, 15)) +>T : Symbol(T, Decl(contextualPropertyOfGenericFilteringMappedType.ts, 0, 20)) +>P : Symbol(P, Decl(contextualPropertyOfGenericFilteringMappedType.ts, 2, 15)) +>value : Symbol(value, Decl(contextualPropertyOfGenericFilteringMappedType.ts, 2, 36)) +>T : Symbol(T, Decl(contextualPropertyOfGenericFilteringMappedType.ts, 0, 20)) +>P : Symbol(P, Decl(contextualPropertyOfGenericFilteringMappedType.ts, 2, 15)) +>prop : Symbol(prop, Decl(contextualPropertyOfGenericFilteringMappedType.ts, 2, 48)) +>P : Symbol(P, Decl(contextualPropertyOfGenericFilteringMappedType.ts, 2, 15)) + +): void; + +f1( +>f1 : Symbol(f1, Decl(contextualPropertyOfGenericFilteringMappedType.ts, 0, 0)) + { + foo: 0, +>foo : Symbol(foo, Decl(contextualPropertyOfGenericFilteringMappedType.ts, 6, 3)) + + bar: "", +>bar : Symbol(bar, Decl(contextualPropertyOfGenericFilteringMappedType.ts, 7, 11)) + + }, + { + foo: (value, key) => {}, +>foo : Symbol(foo, Decl(contextualPropertyOfGenericFilteringMappedType.ts, 10, 3)) +>value : Symbol(value, Decl(contextualPropertyOfGenericFilteringMappedType.ts, 11, 10)) +>key : Symbol(key, Decl(contextualPropertyOfGenericFilteringMappedType.ts, 11, 16)) + + bar: (value, key) => {}, +>bar : Symbol(bar, Decl(contextualPropertyOfGenericFilteringMappedType.ts, 11, 28)) +>value : Symbol(value, Decl(contextualPropertyOfGenericFilteringMappedType.ts, 12, 10)) +>key : Symbol(key, Decl(contextualPropertyOfGenericFilteringMappedType.ts, 12, 16)) + + }, +); + +declare function f2( +>f2 : Symbol(f2, Decl(contextualPropertyOfGenericFilteringMappedType.ts, 14, 2)) +>T : Symbol(T, Decl(contextualPropertyOfGenericFilteringMappedType.ts, 16, 20)) + + data: T, +>data : Symbol(data, Decl(contextualPropertyOfGenericFilteringMappedType.ts, 16, 38)) +>T : Symbol(T, Decl(contextualPropertyOfGenericFilteringMappedType.ts, 16, 20)) + + handlers: { [P in keyof T as T[P] extends string ? P : never]: (value: T[P], prop: P) => void }, +>handlers : Symbol(handlers, Decl(contextualPropertyOfGenericFilteringMappedType.ts, 17, 10)) +>P : Symbol(P, Decl(contextualPropertyOfGenericFilteringMappedType.ts, 18, 15)) +>T : Symbol(T, Decl(contextualPropertyOfGenericFilteringMappedType.ts, 16, 20)) +>T : Symbol(T, Decl(contextualPropertyOfGenericFilteringMappedType.ts, 16, 20)) +>P : Symbol(P, Decl(contextualPropertyOfGenericFilteringMappedType.ts, 18, 15)) +>P : Symbol(P, Decl(contextualPropertyOfGenericFilteringMappedType.ts, 18, 15)) +>value : Symbol(value, Decl(contextualPropertyOfGenericFilteringMappedType.ts, 18, 66)) +>T : Symbol(T, Decl(contextualPropertyOfGenericFilteringMappedType.ts, 16, 20)) +>P : Symbol(P, Decl(contextualPropertyOfGenericFilteringMappedType.ts, 18, 15)) +>prop : Symbol(prop, Decl(contextualPropertyOfGenericFilteringMappedType.ts, 18, 78)) +>P : Symbol(P, Decl(contextualPropertyOfGenericFilteringMappedType.ts, 18, 15)) + +): void; + +f2( +>f2 : Symbol(f2, Decl(contextualPropertyOfGenericFilteringMappedType.ts, 14, 2)) + { + foo: 0, +>foo : Symbol(foo, Decl(contextualPropertyOfGenericFilteringMappedType.ts, 22, 3)) + + bar: "", +>bar : Symbol(bar, Decl(contextualPropertyOfGenericFilteringMappedType.ts, 23, 11)) + + }, + { + bar: (value, key) => {}, +>bar : Symbol(bar, Decl(contextualPropertyOfGenericFilteringMappedType.ts, 26, 3)) +>value : Symbol(value, Decl(contextualPropertyOfGenericFilteringMappedType.ts, 27, 10)) +>key : Symbol(key, Decl(contextualPropertyOfGenericFilteringMappedType.ts, 27, 16)) + + }, +); + diff --git a/tests/baselines/reference/contextualPropertyOfGenericFilteringMappedType.types b/tests/baselines/reference/contextualPropertyOfGenericFilteringMappedType.types new file mode 100644 index 0000000000000..b55c98f6f650f --- /dev/null +++ b/tests/baselines/reference/contextualPropertyOfGenericFilteringMappedType.types @@ -0,0 +1,127 @@ +//// [tests/cases/compiler/contextualPropertyOfGenericFilteringMappedType.ts] //// + +=== contextualPropertyOfGenericFilteringMappedType.ts === +declare function f1( +>f1 : (data: T, handlers: { [P in keyof T as P]: (value: T[P], prop: P) => void; }) => void +> : ^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^^^^ + + data: T, +>data : T +> : ^ + + handlers: { [P in keyof T as P]: (value: T[P], prop: P) => void }, +>handlers : { [P in keyof T as P]: (value: T[P], prop: P) => void; } +> : ^^^ ^^^^^^^^^^^^^^^^^^^^ ^^ ^^ ^^ ^^^^^ ^^^ +>value : T[P] +> : ^^^^ +>prop : P +> : ^ + +): void; + +f1( +>f1( { foo: 0, bar: "", }, { foo: (value, key) => {}, bar: (value, key) => {}, },) : void +> : ^^^^ +>f1 : (data: T, handlers: { [P in keyof T as P]: (value: T[P], prop: P) => void; }) => void +> : ^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^^^^ + { +>{ foo: 0, bar: "", } : { foo: number; bar: string; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + foo: 0, +>foo : number +> : ^^^^^^ +>0 : 0 +> : ^ + + bar: "", +>bar : string +> : ^^^^^^ +>"" : "" +> : ^^ + + }, + { +>{ foo: (value, key) => {}, bar: (value, key) => {}, } : { foo: (value: number, key: "foo") => void; bar: (value: string, key: "bar") => void; } +> : ^^^^^^^^ ^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^ + + foo: (value, key) => {}, +>foo : (value: number, key: "foo") => void +> : ^ ^^^^^^^^^^ ^^^^^^^^^^^^^^^^ +>(value, key) => {} : (value: number, key: "foo") => void +> : ^ ^^^^^^^^^^ ^^^^^^^^^^^^^^^^ +>value : number +> : ^^^^^^ +>key : "foo" +> : ^^^^^ + + bar: (value, key) => {}, +>bar : (value: string, key: "bar") => void +> : ^ ^^^^^^^^^^ ^^^^^^^^^^^^^^^^ +>(value, key) => {} : (value: string, key: "bar") => void +> : ^ ^^^^^^^^^^ ^^^^^^^^^^^^^^^^ +>value : string +> : ^^^^^^ +>key : "bar" +> : ^^^^^ + + }, +); + +declare function f2( +>f2 : (data: T, handlers: { [P in keyof T as T[P] extends string ? P : never]: (value: T[P], prop: P) => void; }) => void +> : ^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^^^^ + + data: T, +>data : T +> : ^ + + handlers: { [P in keyof T as T[P] extends string ? P : never]: (value: T[P], prop: P) => void }, +>handlers : { [P in keyof T as T[P] extends string ? P : never]: (value: T[P], prop: P) => void; } +> : ^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^ ^^ ^^^^^ ^^^ +>value : T[P] +> : ^^^^ +>prop : P +> : ^ + +): void; + +f2( +>f2( { foo: 0, bar: "", }, { bar: (value, key) => {}, },) : void +> : ^^^^ +>f2 : (data: T, handlers: { [P in keyof T as T[P] extends string ? P : never]: (value: T[P], prop: P) => void; }) => void +> : ^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^^^^ + { +>{ foo: 0, bar: "", } : { foo: number; bar: string; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + foo: 0, +>foo : number +> : ^^^^^^ +>0 : 0 +> : ^ + + bar: "", +>bar : string +> : ^^^^^^ +>"" : "" +> : ^^ + + }, + { +>{ bar: (value, key) => {}, } : { bar: (value: string, key: "bar") => void; } +> : ^^^^^^^^ ^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^ + + bar: (value, key) => {}, +>bar : (value: string, key: "bar") => void +> : ^ ^^^^^^^^^^ ^^^^^^^^^^^^^^^^ +>(value, key) => {} : (value: string, key: "bar") => void +> : ^ ^^^^^^^^^^ ^^^^^^^^^^^^^^^^ +>value : string +> : ^^^^^^ +>key : "bar" +> : ^^^^^ + + }, +); + diff --git a/tests/cases/compiler/contextualPropertyOfGenericFilteringMappedType.ts b/tests/cases/compiler/contextualPropertyOfGenericFilteringMappedType.ts new file mode 100644 index 0000000000000..824a6d554344c --- /dev/null +++ b/tests/cases/compiler/contextualPropertyOfGenericFilteringMappedType.ts @@ -0,0 +1,33 @@ +// @strict: true +// @noEmit: true + +declare function f1( + data: T, + handlers: { [P in keyof T as P]: (value: T[P], prop: P) => void }, +): void; + +f1( + { + foo: 0, + bar: "", + }, + { + foo: (value, key) => {}, + bar: (value, key) => {}, + }, +); + +declare function f2( + data: T, + handlers: { [P in keyof T as T[P] extends string ? P : never]: (value: T[P], prop: P) => void }, +): void; + +f2( + { + foo: 0, + bar: "", + }, + { + bar: (value, key) => {}, + }, +); From 67d0fc13cedbcbe47029270ffcfba2c9dbdc9a96 Mon Sep 17 00:00:00 2001 From: Ron Buckton Date: Thu, 8 Aug 2024 12:20:59 -0400 Subject: [PATCH 11/50] Use global `Iterator.prototype` for down-level generators (#59514) --- src/compiler/factory/emitHelpers.ts | 6 +-- .../unittests/evaluation/asyncGenerator.ts | 22 ++++++++ .../unittests/evaluation/generator.ts | 22 ++++++++ .../reference/asyncArrowFunction11_es5.js | 4 +- .../asyncAwaitIsolatedModules_es5.js | 4 +- tests/baselines/reference/asyncAwait_es5.js | 4 +- .../reference/asyncFunctionNoReturnType.js | 4 +- ...asyncFunctionReturnExpressionErrorSpans.js | 4 +- .../asyncFunctionTempVariableScoping.js | 4 +- ...ncFunctionWithForStatementNoInitializer.js | 4 +- .../reference/asyncImportNestedYield.js | 6 +-- .../reference/asyncImportedPromise_es5.js | 4 +- .../baselines/reference/asyncMultiFile_es5.js | 4 +- ...awaitUsingDeclarations.1(target=es2015).js | 2 +- ...awaitUsingDeclarations.1(target=es2017).js | 2 +- .../awaitUsingDeclarations.1(target=es5).js | 6 +-- .../awaitUsingDeclarations.2(target=es5).js | 4 +- .../awaitUsingDeclarations.3(target=es5).js | 4 +- ...awaitUsingDeclarationsInFor(target=es5).js | 4 +- ...ingDeclarationsInForAwaitOf(target=es5).js | 4 +- ...gDeclarationsInForAwaitOf.3(target=es5).js | 4 +- ...tUsingDeclarationsInForOf.1(target=es5).js | 4 +- ...tUsingDeclarationsInForOf.5(target=es5).js | 4 +- ...blockScopedBindingsInDownlevelGenerator.js | 4 +- .../blockScopedVariablesUseBeforeDef.js | 6 +-- tests/baselines/reference/castOfYield.js | 4 +- .../checkJsxSubtleSkipContextSensitiveBug.js | 4 +- .../baselines/reference/classStaticBlock6.js | 4 +- .../baselines/reference/classStaticBlock7.js | 4 +- .../reference/contextualReturnTypeOfIIFE.js | 4 +- .../controlFlowForCatchAndFinally.js | 4 +- .../reference/correctOrderOfPromiseMethod.js | 4 +- .../reference/declarationEmitPrivateAsync.js | 4 +- .../dependentDestructuredVariables.js | 2 +- .../destructureOfVariableSameAsShorthand.js | 4 +- .../destructuringControlFlowNoCrash.js | 4 +- ...tElaborateAssignabilityToTypeParameters.js | 4 +- ...ter.asyncGenerators.classMethods.es2015.js | 18 +++---- ...mitter.asyncGenerators.classMethods.es5.js | 54 +++++++++---------- ...cGenerators.functionDeclarations.es2015.js | 14 ++--- ...syncGenerators.functionDeclarations.es5.js | 42 +++++++-------- ...ncGenerators.functionExpressions.es2015.js | 14 ++--- ...asyncGenerators.functionExpressions.es5.js | 42 +++++++-------- ...cGenerators.objectLiteralMethods.es2015.js | 14 ++--- ...syncGenerators.objectLiteralMethods.es5.js | 42 +++++++-------- .../emitter.forAwait(target=es2015).js | 8 +-- .../emitter.forAwait(target=es2017).js | 8 +-- .../reference/emitter.forAwait(target=es5).js | 36 ++++++------- .../baselines/reference/es5-asyncFunction.js | 4 +- .../es5-asyncFunctionLongObjectLiteral.js | 4 +- .../es5-importHelpersAsyncFunctions.js | 4 +- .../exportDefaultFunctionInNamespace.js | 4 +- ...essionsForbiddenInParameterInitializers.js | 4 +- .../forAwaitPerIterationBindingDownlevel.js | 6 +-- .../baselines/reference/importAttributes7.js | 4 +- .../importCallExpressionAsyncES5AMD.js | 4 +- .../importCallExpressionAsyncES5CJS.js | 4 +- .../importCallExpressionAsyncES5System.js | 4 +- .../importCallExpressionAsyncES5UMD.js | 4 +- .../importCallExpressionNestedAMD2.js | 4 +- .../importCallExpressionNestedCJS2.js | 4 +- .../importCallExpressionNestedES20152.js | 4 +- .../importCallExpressionNestedES20202.js | 4 +- .../importCallExpressionNestedSystem2.js | 4 +- .../importCallExpressionNestedUMD2.js | 4 +- ...portCallExpressionNoModuleKindSpecified.js | 4 +- .../importMeta(module=commonjs,target=es5).js | 4 +- .../importMeta(module=es2020,target=es5).js | 4 +- .../importMeta(module=esnext,target=es5).js | 4 +- .../importMeta(module=system,target=es5).js | 4 +- .../invalidContinueInDownlevelAsync.js | 4 +- .../jsFileCompilationAwaitModifier.js | 4 +- tests/baselines/reference/jsxElementType.js | 4 +- .../reference/labeledStatementWithLabel.js | 4 +- ...lesExportsSpecifierGenerationConditions.js | 4 +- .../neverAsDiscriminantType(strict=false).js | 4 +- .../neverAsDiscriminantType(strict=true).js | 4 +- tests/baselines/reference/objectRestSpread.js | 2 +- .../operationsAvailableOnPromisedType.js | 4 +- .../parenthesizedAsyncArrowFunction.js | 4 +- .../privateNamesIncompatibleModifiers.js | 2 +- .../reference/promiseDefinitionTest.js | 4 +- ...uxLikeDeferredInferenceAllowsAssignment.js | 4 +- ...fParamsFromGeneratorMakesRequiredParams.js | 4 +- .../templateStringWithEmbeddedYieldKeyword.js | 4 +- .../transformNestedGeneratorsWithTry.js | 4 +- .../usingDeclarations.1(target=es2015).js | 2 +- .../usingDeclarations.1(target=es2017).js | 2 +- .../usingDeclarations.1(target=es5).js | 6 +-- ...ingDeclarationsInForAwaitOf(target=es5).js | 4 +- .../yieldInForInInDownlevelGenerator.js | 4 +- 91 files changed, 345 insertions(+), 301 deletions(-) diff --git a/src/compiler/factory/emitHelpers.ts b/src/compiler/factory/emitHelpers.ts index 3b3dc97ddb43f..8cc453299e3f8 100644 --- a/src/compiler/factory/emitHelpers.ts +++ b/src/compiler/factory/emitHelpers.ts @@ -836,7 +836,7 @@ const asyncGeneratorHelper: UnscopedEmitHelper = { var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var g = generator.apply(thisArg, _arguments || []), i, q = []; - return i = {}, verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; + return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; } function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } } function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } @@ -1102,8 +1102,8 @@ const generatorHelper: UnscopedEmitHelper = { priority: 6, text: ` var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); + return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; function verb(n) { return function (v) { return step([n, v]); }; } function step(op) { if (f) throw new TypeError("Generator is already executing."); diff --git a/src/testRunner/unittests/evaluation/asyncGenerator.ts b/src/testRunner/unittests/evaluation/asyncGenerator.ts index 78c54bde9238e..bcfff9215b0db 100644 --- a/src/testRunner/unittests/evaluation/asyncGenerator.ts +++ b/src/testRunner/unittests/evaluation/asyncGenerator.ts @@ -83,4 +83,26 @@ describe("unittests:: evaluation:: asyncGeneratorEvaluation", () => { { done: true, value: 2 }, ]); }); + it("Supports global `AsyncIterator.prototype` if present", () => { + class AsyncIterator {} + const { gen } = evaluator.evaluateTypeScript( + ` + export async function * gen() {} + `, + { target: ts.ScriptTarget.ES5 }, + { AsyncIterator }, + ); + const g = gen(); + assert.instanceOf(g, AsyncIterator); + }); + it("Ignores global `AsyncIterator.prototype` if missing", () => { + const { gen } = evaluator.evaluateTypeScript( + ` + export async function * gen() {} + `, + { target: ts.ScriptTarget.ES5 }, + { AsyncIterator: undefined }, + ); + gen(); + }); }); diff --git a/src/testRunner/unittests/evaluation/generator.ts b/src/testRunner/unittests/evaluation/generator.ts index 06f22c3680fa5..4b1e3a1ffd319 100644 --- a/src/testRunner/unittests/evaluation/generator.ts +++ b/src/testRunner/unittests/evaluation/generator.ts @@ -39,4 +39,26 @@ describe("unittests:: evaluation:: generatorEvaluation", () => { assert.deepEqual(g.next(), { value: undefined, done: true }); assert.deepEqual(output, []); }); + it("Supports global `Iterator.prototype` if present", () => { + class Iterator {} + const { gen } = evaluator.evaluateTypeScript( + ` + export function * gen() {} + `, + { target: ts.ScriptTarget.ES5 }, + { Iterator }, + ); + const g = gen(); + assert.instanceOf(g, Iterator); + }); + it("Ignores global `Iterator.prototype` if missing", () => { + const { gen } = evaluator.evaluateTypeScript( + ` + export function * gen() {} + `, + { target: ts.ScriptTarget.ES5 }, + { Iterator: undefined }, + ); + gen(); + }); }); diff --git a/tests/baselines/reference/asyncArrowFunction11_es5.js b/tests/baselines/reference/asyncArrowFunction11_es5.js index 3f1f3491d7aca..932079f3c83f9 100644 --- a/tests/baselines/reference/asyncArrowFunction11_es5.js +++ b/tests/baselines/reference/asyncArrowFunction11_es5.js @@ -20,8 +20,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }); }; var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); + return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; function verb(n) { return function (v) { return step([n, v]); }; } function step(op) { if (f) throw new TypeError("Generator is already executing."); diff --git a/tests/baselines/reference/asyncAwaitIsolatedModules_es5.js b/tests/baselines/reference/asyncAwaitIsolatedModules_es5.js index 7c763f9ecf8ab..c5e0e7aaa34f5 100644 --- a/tests/baselines/reference/asyncAwaitIsolatedModules_es5.js +++ b/tests/baselines/reference/asyncAwaitIsolatedModules_es5.js @@ -53,8 +53,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }); }; var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); + return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; function verb(n) { return function (v) { return step([n, v]); }; } function step(op) { if (f) throw new TypeError("Generator is already executing."); diff --git a/tests/baselines/reference/asyncAwait_es5.js b/tests/baselines/reference/asyncAwait_es5.js index 2fd12346bb883..8bc581f48de17 100644 --- a/tests/baselines/reference/asyncAwait_es5.js +++ b/tests/baselines/reference/asyncAwait_es5.js @@ -59,8 +59,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }); }; var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); + return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; function verb(n) { return function (v) { return step([n, v]); }; } function step(op) { if (f) throw new TypeError("Generator is already executing."); diff --git a/tests/baselines/reference/asyncFunctionNoReturnType.js b/tests/baselines/reference/asyncFunctionNoReturnType.js index fb4f9585cc2ae..ef0a529fcc5ad 100644 --- a/tests/baselines/reference/asyncFunctionNoReturnType.js +++ b/tests/baselines/reference/asyncFunctionNoReturnType.js @@ -18,8 +18,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }); }; var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); + return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; function verb(n) { return function (v) { return step([n, v]); }; } function step(op) { if (f) throw new TypeError("Generator is already executing."); diff --git a/tests/baselines/reference/asyncFunctionReturnExpressionErrorSpans.js b/tests/baselines/reference/asyncFunctionReturnExpressionErrorSpans.js index 523416cff6a76..2863404726a47 100644 --- a/tests/baselines/reference/asyncFunctionReturnExpressionErrorSpans.js +++ b/tests/baselines/reference/asyncFunctionReturnExpressionErrorSpans.js @@ -34,8 +34,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }); }; var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); + return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; function verb(n) { return function (v) { return step([n, v]); }; } function step(op) { if (f) throw new TypeError("Generator is already executing."); diff --git a/tests/baselines/reference/asyncFunctionTempVariableScoping.js b/tests/baselines/reference/asyncFunctionTempVariableScoping.js index 16b6afaf7a54d..a5a52a5c518b7 100644 --- a/tests/baselines/reference/asyncFunctionTempVariableScoping.js +++ b/tests/baselines/reference/asyncFunctionTempVariableScoping.js @@ -17,8 +17,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }); }; var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); + return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; function verb(n) { return function (v) { return step([n, v]); }; } function step(op) { if (f) throw new TypeError("Generator is already executing."); diff --git a/tests/baselines/reference/asyncFunctionWithForStatementNoInitializer.js b/tests/baselines/reference/asyncFunctionWithForStatementNoInitializer.js index ddc852cb93a92..8ea440e35cad1 100644 --- a/tests/baselines/reference/asyncFunctionWithForStatementNoInitializer.js +++ b/tests/baselines/reference/asyncFunctionWithForStatementNoInitializer.js @@ -37,8 +37,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }); }; var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); + return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; function verb(n) { return function (v) { return step([n, v]); }; } function step(op) { if (f) throw new TypeError("Generator is already executing."); diff --git a/tests/baselines/reference/asyncImportNestedYield.js b/tests/baselines/reference/asyncImportNestedYield.js index f7e42c3e3df25..a6251abe5203d 100644 --- a/tests/baselines/reference/asyncImportNestedYield.js +++ b/tests/baselines/reference/asyncImportNestedYield.js @@ -7,8 +7,8 @@ async function* foo() { //// [asyncImportNestedYield.js] var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); + return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; function verb(n) { return function (v) { return step([n, v]); }; } function step(op) { if (f) throw new TypeError("Generator is already executing."); @@ -37,7 +37,7 @@ var __await = (this && this.__await) || function (v) { return this instanceof __ var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var g = generator.apply(thisArg, _arguments || []), i, q = []; - return i = {}, verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; + return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; } function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } } function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } diff --git a/tests/baselines/reference/asyncImportedPromise_es5.js b/tests/baselines/reference/asyncImportedPromise_es5.js index aaaf4a95491f8..c6841ddd8a6f1 100644 --- a/tests/baselines/reference/asyncImportedPromise_es5.js +++ b/tests/baselines/reference/asyncImportedPromise_es5.js @@ -48,8 +48,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }); }; var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); + return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; function verb(n) { return function (v) { return step([n, v]); }; } function step(op) { if (f) throw new TypeError("Generator is already executing."); diff --git a/tests/baselines/reference/asyncMultiFile_es5.js b/tests/baselines/reference/asyncMultiFile_es5.js index 2dd73b8b6c76e..e022b1e864a6b 100644 --- a/tests/baselines/reference/asyncMultiFile_es5.js +++ b/tests/baselines/reference/asyncMultiFile_es5.js @@ -16,8 +16,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }); }; var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); + return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; function verb(n) { return function (v) { return step([n, v]); }; } function step(op) { if (f) throw new TypeError("Generator is already executing."); diff --git a/tests/baselines/reference/awaitUsingDeclarations.1(target=es2015).js b/tests/baselines/reference/awaitUsingDeclarations.1(target=es2015).js index 60d690d76bda0..6468ced72c728 100644 --- a/tests/baselines/reference/awaitUsingDeclarations.1(target=es2015).js +++ b/tests/baselines/reference/awaitUsingDeclarations.1(target=es2015).js @@ -165,7 +165,7 @@ var __await = (this && this.__await) || function (v) { return this instanceof __ var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var g = generator.apply(thisArg, _arguments || []), i, q = []; - return i = {}, verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; + return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; } function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } } function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } diff --git a/tests/baselines/reference/awaitUsingDeclarations.1(target=es2017).js b/tests/baselines/reference/awaitUsingDeclarations.1(target=es2017).js index 31b8b0bdf0b82..1277db5bcdd32 100644 --- a/tests/baselines/reference/awaitUsingDeclarations.1(target=es2017).js +++ b/tests/baselines/reference/awaitUsingDeclarations.1(target=es2017).js @@ -156,7 +156,7 @@ var __await = (this && this.__await) || function (v) { return this instanceof __ var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var g = generator.apply(thisArg, _arguments || []), i, q = []; - return i = {}, verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; + return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; } function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } } function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } diff --git a/tests/baselines/reference/awaitUsingDeclarations.1(target=es5).js b/tests/baselines/reference/awaitUsingDeclarations.1(target=es5).js index a34ff4098232c..eb4005130a99b 100644 --- a/tests/baselines/reference/awaitUsingDeclarations.1(target=es5).js +++ b/tests/baselines/reference/awaitUsingDeclarations.1(target=es5).js @@ -110,8 +110,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }); }; var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); + return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; function verb(n) { return function (v) { return step([n, v]); }; } function step(op) { if (f) throw new TypeError("Generator is already executing."); @@ -192,7 +192,7 @@ var __await = (this && this.__await) || function (v) { return this instanceof __ var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var g = generator.apply(thisArg, _arguments || []), i, q = []; - return i = {}, verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; + return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; } function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } } function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } diff --git a/tests/baselines/reference/awaitUsingDeclarations.2(target=es5).js b/tests/baselines/reference/awaitUsingDeclarations.2(target=es5).js index 80fa7d99ba97b..7241ac59bb64e 100644 --- a/tests/baselines/reference/awaitUsingDeclarations.2(target=es5).js +++ b/tests/baselines/reference/awaitUsingDeclarations.2(target=es5).js @@ -19,8 +19,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }); }; var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); + return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; function verb(n) { return function (v) { return step([n, v]); }; } function step(op) { if (f) throw new TypeError("Generator is already executing."); diff --git a/tests/baselines/reference/awaitUsingDeclarations.3(target=es5).js b/tests/baselines/reference/awaitUsingDeclarations.3(target=es5).js index 57e87730665f5..c774b207cdb52 100644 --- a/tests/baselines/reference/awaitUsingDeclarations.3(target=es5).js +++ b/tests/baselines/reference/awaitUsingDeclarations.3(target=es5).js @@ -21,8 +21,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }); }; var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); + return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; function verb(n) { return function (v) { return step([n, v]); }; } function step(op) { if (f) throw new TypeError("Generator is already executing."); diff --git a/tests/baselines/reference/awaitUsingDeclarationsInFor(target=es5).js b/tests/baselines/reference/awaitUsingDeclarationsInFor(target=es5).js index f01f673a98836..d8226409a5dac 100644 --- a/tests/baselines/reference/awaitUsingDeclarationsInFor(target=es5).js +++ b/tests/baselines/reference/awaitUsingDeclarationsInFor(target=es5).js @@ -20,8 +20,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }); }; var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); + return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; function verb(n) { return function (v) { return step([n, v]); }; } function step(op) { if (f) throw new TypeError("Generator is already executing."); diff --git a/tests/baselines/reference/awaitUsingDeclarationsInForAwaitOf(target=es5).js b/tests/baselines/reference/awaitUsingDeclarationsInForAwaitOf(target=es5).js index 2e401a484063b..4deda344151fc 100644 --- a/tests/baselines/reference/awaitUsingDeclarationsInForAwaitOf(target=es5).js +++ b/tests/baselines/reference/awaitUsingDeclarationsInForAwaitOf(target=es5).js @@ -17,8 +17,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }); }; var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); + return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; function verb(n) { return function (v) { return step([n, v]); }; } function step(op) { if (f) throw new TypeError("Generator is already executing."); diff --git a/tests/baselines/reference/awaitUsingDeclarationsInForAwaitOf.3(target=es5).js b/tests/baselines/reference/awaitUsingDeclarationsInForAwaitOf.3(target=es5).js index abe97e09c15d0..f929d3d0c6ced 100644 --- a/tests/baselines/reference/awaitUsingDeclarationsInForAwaitOf.3(target=es5).js +++ b/tests/baselines/reference/awaitUsingDeclarationsInForAwaitOf.3(target=es5).js @@ -24,8 +24,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }); }; var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); + return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; function verb(n) { return function (v) { return step([n, v]); }; } function step(op) { if (f) throw new TypeError("Generator is already executing."); diff --git a/tests/baselines/reference/awaitUsingDeclarationsInForOf.1(target=es5).js b/tests/baselines/reference/awaitUsingDeclarationsInForOf.1(target=es5).js index 3dab903ba3c89..b48951bbe6d5e 100644 --- a/tests/baselines/reference/awaitUsingDeclarationsInForOf.1(target=es5).js +++ b/tests/baselines/reference/awaitUsingDeclarationsInForOf.1(target=es5).js @@ -18,8 +18,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }); }; var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); + return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; function verb(n) { return function (v) { return step([n, v]); }; } function step(op) { if (f) throw new TypeError("Generator is already executing."); diff --git a/tests/baselines/reference/awaitUsingDeclarationsInForOf.5(target=es5).js b/tests/baselines/reference/awaitUsingDeclarationsInForOf.5(target=es5).js index 1b0ea1fd6307e..6b9e8308d45a9 100644 --- a/tests/baselines/reference/awaitUsingDeclarationsInForOf.5(target=es5).js +++ b/tests/baselines/reference/awaitUsingDeclarationsInForOf.5(target=es5).js @@ -24,8 +24,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }); }; var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); + return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; function verb(n) { return function (v) { return step([n, v]); }; } function step(op) { if (f) throw new TypeError("Generator is already executing."); diff --git a/tests/baselines/reference/blockScopedBindingsInDownlevelGenerator.js b/tests/baselines/reference/blockScopedBindingsInDownlevelGenerator.js index fa6167ff384bf..ca74ec4d9ddb1 100644 --- a/tests/baselines/reference/blockScopedBindingsInDownlevelGenerator.js +++ b/tests/baselines/reference/blockScopedBindingsInDownlevelGenerator.js @@ -10,8 +10,8 @@ function* a() { //// [blockScopedBindingsInDownlevelGenerator.js] var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); + return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; function verb(n) { return function (v) { return step([n, v]); }; } function step(op) { if (f) throw new TypeError("Generator is already executing."); diff --git a/tests/baselines/reference/blockScopedVariablesUseBeforeDef.js b/tests/baselines/reference/blockScopedVariablesUseBeforeDef.js index fa9bd38069f63..92f6719edaf89 100644 --- a/tests/baselines/reference/blockScopedVariablesUseBeforeDef.js +++ b/tests/baselines/reference/blockScopedVariablesUseBeforeDef.js @@ -164,8 +164,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }); }; var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); + return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; function verb(n) { return function (v) { return step([n, v]); }; } function step(op) { if (f) throw new TypeError("Generator is already executing."); @@ -198,7 +198,7 @@ var __await = (this && this.__await) || function (v) { return this instanceof __ var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var g = generator.apply(thisArg, _arguments || []), i, q = []; - return i = {}, verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; + return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; } function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } } function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } diff --git a/tests/baselines/reference/castOfYield.js b/tests/baselines/reference/castOfYield.js index 0392eb7e354fa..94de9e5dddfdd 100644 --- a/tests/baselines/reference/castOfYield.js +++ b/tests/baselines/reference/castOfYield.js @@ -10,8 +10,8 @@ function* f() { //// [castOfYield.js] var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); + return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; function verb(n) { return function (v) { return step([n, v]); }; } function step(op) { if (f) throw new TypeError("Generator is already executing."); diff --git a/tests/baselines/reference/checkJsxSubtleSkipContextSensitiveBug.js b/tests/baselines/reference/checkJsxSubtleSkipContextSensitiveBug.js index 0393f492811df..2eca8424cd89c 100644 --- a/tests/baselines/reference/checkJsxSubtleSkipContextSensitiveBug.js +++ b/tests/baselines/reference/checkJsxSubtleSkipContextSensitiveBug.js @@ -53,8 +53,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }); }; var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); + return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; function verb(n) { return function (v) { return step([n, v]); }; } function step(op) { if (f) throw new TypeError("Generator is already executing."); diff --git a/tests/baselines/reference/classStaticBlock6.js b/tests/baselines/reference/classStaticBlock6.js index ff75c42c44a50..be445fb7d4969 100644 --- a/tests/baselines/reference/classStaticBlock6.js +++ b/tests/baselines/reference/classStaticBlock6.js @@ -91,8 +91,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }); }; var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); + return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; function verb(n) { return function (v) { return step([n, v]); }; } function step(op) { if (f) throw new TypeError("Generator is already executing."); diff --git a/tests/baselines/reference/classStaticBlock7.js b/tests/baselines/reference/classStaticBlock7.js index 238a20e14297d..29d74bf42609d 100644 --- a/tests/baselines/reference/classStaticBlock7.js +++ b/tests/baselines/reference/classStaticBlock7.js @@ -57,8 +57,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }); }; var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); + return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; function verb(n) { return function (v) { return step([n, v]); }; } function step(op) { if (f) throw new TypeError("Generator is already executing."); diff --git a/tests/baselines/reference/contextualReturnTypeOfIIFE.js b/tests/baselines/reference/contextualReturnTypeOfIIFE.js index 74b82182ceb1b..7baee9f0d4c96 100644 --- a/tests/baselines/reference/contextualReturnTypeOfIIFE.js +++ b/tests/baselines/reference/contextualReturnTypeOfIIFE.js @@ -25,8 +25,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }); }; var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); + return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; function verb(n) { return function (v) { return step([n, v]); }; } function step(op) { if (f) throw new TypeError("Generator is already executing."); diff --git a/tests/baselines/reference/controlFlowForCatchAndFinally.js b/tests/baselines/reference/controlFlowForCatchAndFinally.js index 949a178f7e413..65f0fe897cc92 100644 --- a/tests/baselines/reference/controlFlowForCatchAndFinally.js +++ b/tests/baselines/reference/controlFlowForCatchAndFinally.js @@ -54,8 +54,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }); }; var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); + return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; function verb(n) { return function (v) { return step([n, v]); }; } function step(op) { if (f) throw new TypeError("Generator is already executing."); diff --git a/tests/baselines/reference/correctOrderOfPromiseMethod.js b/tests/baselines/reference/correctOrderOfPromiseMethod.js index 900ffee4fb9cc..4ae573b834198 100644 --- a/tests/baselines/reference/correctOrderOfPromiseMethod.js +++ b/tests/baselines/reference/correctOrderOfPromiseMethod.js @@ -43,8 +43,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }); }; var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); + return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; function verb(n) { return function (v) { return step([n, v]); }; } function step(op) { if (f) throw new TypeError("Generator is already executing."); diff --git a/tests/baselines/reference/declarationEmitPrivateAsync.js b/tests/baselines/reference/declarationEmitPrivateAsync.js index 336c908724ff4..b3da5fed3f089 100644 --- a/tests/baselines/reference/declarationEmitPrivateAsync.js +++ b/tests/baselines/reference/declarationEmitPrivateAsync.js @@ -19,8 +19,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }); }; var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); + return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; function verb(n) { return function (v) { return step([n, v]); }; } function step(op) { if (f) throw new TypeError("Generator is already executing."); diff --git a/tests/baselines/reference/dependentDestructuredVariables.js b/tests/baselines/reference/dependentDestructuredVariables.js index 7d32808909bf7..a91ecf55ada98 100644 --- a/tests/baselines/reference/dependentDestructuredVariables.js +++ b/tests/baselines/reference/dependentDestructuredVariables.js @@ -482,7 +482,7 @@ var __await = (this && this.__await) || function (v) { return this instanceof __ var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var g = generator.apply(thisArg, _arguments || []), i, q = []; - return i = {}, verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; + return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; } function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } } function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } diff --git a/tests/baselines/reference/destructureOfVariableSameAsShorthand.js b/tests/baselines/reference/destructureOfVariableSameAsShorthand.js index 26cf986a844e3..c8e0620ea8ae9 100644 --- a/tests/baselines/reference/destructureOfVariableSameAsShorthand.js +++ b/tests/baselines/reference/destructureOfVariableSameAsShorthand.js @@ -39,8 +39,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }); }; var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); + return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; function verb(n) { return function (v) { return step([n, v]); }; } function step(op) { if (f) throw new TypeError("Generator is already executing."); diff --git a/tests/baselines/reference/destructuringControlFlowNoCrash.js b/tests/baselines/reference/destructuringControlFlowNoCrash.js index 8335829ac4335..1cadd21894ac1 100644 --- a/tests/baselines/reference/destructuringControlFlowNoCrash.js +++ b/tests/baselines/reference/destructuringControlFlowNoCrash.js @@ -30,8 +30,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }); }; var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); + return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; function verb(n) { return function (v) { return step([n, v]); }; } function step(op) { if (f) throw new TypeError("Generator is already executing."); diff --git a/tests/baselines/reference/doNotElaborateAssignabilityToTypeParameters.js b/tests/baselines/reference/doNotElaborateAssignabilityToTypeParameters.js index 5d8d8ca8f4bb5..e0cc967c19563 100644 --- a/tests/baselines/reference/doNotElaborateAssignabilityToTypeParameters.js +++ b/tests/baselines/reference/doNotElaborateAssignabilityToTypeParameters.js @@ -25,8 +25,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }); }; var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); + return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; function verb(n) { return function (v) { return step([n, v]); }; } function step(op) { if (f) throw new TypeError("Generator is already executing."); diff --git a/tests/baselines/reference/emitter.asyncGenerators.classMethods.es2015.js b/tests/baselines/reference/emitter.asyncGenerators.classMethods.es2015.js index 5be6ad0fe3911..34333f4d0bc8e 100644 --- a/tests/baselines/reference/emitter.asyncGenerators.classMethods.es2015.js +++ b/tests/baselines/reference/emitter.asyncGenerators.classMethods.es2015.js @@ -65,7 +65,7 @@ var __await = (this && this.__await) || function (v) { return this instanceof __ var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var g = generator.apply(thisArg, _arguments || []), i, q = []; - return i = {}, verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; + return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; } function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } } function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } @@ -85,7 +85,7 @@ var __await = (this && this.__await) || function (v) { return this instanceof __ var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var g = generator.apply(thisArg, _arguments || []), i, q = []; - return i = {}, verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; + return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; } function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } } function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } @@ -106,7 +106,7 @@ var __await = (this && this.__await) || function (v) { return this instanceof __ var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var g = generator.apply(thisArg, _arguments || []), i, q = []; - return i = {}, verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; + return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; } function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } } function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } @@ -139,7 +139,7 @@ var __asyncDelegator = (this && this.__asyncDelegator) || function (o) { var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var g = generator.apply(thisArg, _arguments || []), i, q = []; - return i = {}, verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; + return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; } function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } } function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } @@ -160,7 +160,7 @@ var __await = (this && this.__await) || function (v) { return this instanceof __ var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var g = generator.apply(thisArg, _arguments || []), i, q = []; - return i = {}, verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; + return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; } function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } } function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } @@ -193,7 +193,7 @@ var __await = (this && this.__await) || function (v) { return this instanceof __ var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var g = generator.apply(thisArg, _arguments || []), i, q = []; - return i = {}, verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; + return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; } function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } } function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } @@ -214,7 +214,7 @@ var __await = (this && this.__await) || function (v) { return this instanceof __ var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var g = generator.apply(thisArg, _arguments || []), i, q = []; - return i = {}, verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; + return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; } function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } } function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } @@ -235,7 +235,7 @@ var __await = (this && this.__await) || function (v) { return this instanceof __ var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var g = generator.apply(thisArg, _arguments || []), i, q = []; - return i = {}, verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; + return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; } function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } } function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } @@ -258,7 +258,7 @@ var __await = (this && this.__await) || function (v) { return this instanceof __ var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var g = generator.apply(thisArg, _arguments || []), i, q = []; - return i = {}, verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; + return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; } function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } } function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } diff --git a/tests/baselines/reference/emitter.asyncGenerators.classMethods.es5.js b/tests/baselines/reference/emitter.asyncGenerators.classMethods.es5.js index 9bbe5eb71297e..d39903e283504 100644 --- a/tests/baselines/reference/emitter.asyncGenerators.classMethods.es5.js +++ b/tests/baselines/reference/emitter.asyncGenerators.classMethods.es5.js @@ -62,8 +62,8 @@ class C9 extends B9 { //// [C1.js] var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); + return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; function verb(n) { return function (v) { return step([n, v]); }; } function step(op) { if (f) throw new TypeError("Generator is already executing."); @@ -92,7 +92,7 @@ var __await = (this && this.__await) || function (v) { return this instanceof __ var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var g = generator.apply(thisArg, _arguments || []), i, q = []; - return i = {}, verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; + return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; } function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } } function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } @@ -115,8 +115,8 @@ var C1 = /** @class */ (function () { }()); //// [C2.js] var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); + return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; function verb(n) { return function (v) { return step([n, v]); }; } function step(op) { if (f) throw new TypeError("Generator is already executing."); @@ -145,7 +145,7 @@ var __await = (this && this.__await) || function (v) { return this instanceof __ var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var g = generator.apply(thisArg, _arguments || []), i, q = []; - return i = {}, verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; + return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; } function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } } function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } @@ -175,8 +175,8 @@ var C2 = /** @class */ (function () { }()); //// [C3.js] var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); + return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; function verb(n) { return function (v) { return step([n, v]); }; } function step(op) { if (f) throw new TypeError("Generator is already executing."); @@ -205,7 +205,7 @@ var __await = (this && this.__await) || function (v) { return this instanceof __ var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var g = generator.apply(thisArg, _arguments || []), i, q = []; - return i = {}, verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; + return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; } function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } } function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } @@ -235,8 +235,8 @@ var C3 = /** @class */ (function () { }()); //// [C4.js] var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); + return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; function verb(n) { return function (v) { return step([n, v]); }; } function step(op) { if (f) throw new TypeError("Generator is already executing."); @@ -277,7 +277,7 @@ var __asyncDelegator = (this && this.__asyncDelegator) || function (o) { var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var g = generator.apply(thisArg, _arguments || []), i, q = []; - return i = {}, verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; + return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; } function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } } function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } @@ -318,8 +318,8 @@ var C4 = /** @class */ (function () { }()); //// [C5.js] var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); + return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; function verb(n) { return function (v) { return step([n, v]); }; } function step(op) { if (f) throw new TypeError("Generator is already executing."); @@ -348,7 +348,7 @@ var __await = (this && this.__await) || function (v) { return this instanceof __ var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var g = generator.apply(thisArg, _arguments || []), i, q = []; - return i = {}, verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; + return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; } function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } } function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } @@ -409,8 +409,8 @@ var C5 = /** @class */ (function () { }()); //// [C6.js] var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); + return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; function verb(n) { return function (v) { return step([n, v]); }; } function step(op) { if (f) throw new TypeError("Generator is already executing."); @@ -439,7 +439,7 @@ var __await = (this && this.__await) || function (v) { return this instanceof __ var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var g = generator.apply(thisArg, _arguments || []), i, q = []; - return i = {}, verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; + return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; } function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } } function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } @@ -468,8 +468,8 @@ var C6 = /** @class */ (function () { }()); //// [C7.js] var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); + return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; function verb(n) { return function (v) { return step([n, v]); }; } function step(op) { if (f) throw new TypeError("Generator is already executing."); @@ -498,7 +498,7 @@ var __await = (this && this.__await) || function (v) { return this instanceof __ var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var g = generator.apply(thisArg, _arguments || []), i, q = []; - return i = {}, verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; + return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; } function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } } function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } @@ -524,8 +524,8 @@ var C7 = /** @class */ (function () { }()); //// [C8.js] var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); + return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; function verb(n) { return function (v) { return step([n, v]); }; } function step(op) { if (f) throw new TypeError("Generator is already executing."); @@ -554,7 +554,7 @@ var __await = (this && this.__await) || function (v) { return this instanceof __ var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var g = generator.apply(thisArg, _arguments || []), i, q = []; - return i = {}, verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; + return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; } function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } } function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } @@ -595,8 +595,8 @@ var __extends = (this && this.__extends) || (function () { }; })(); var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); + return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; function verb(n) { return function (v) { return step([n, v]); }; } function step(op) { if (f) throw new TypeError("Generator is already executing."); @@ -625,7 +625,7 @@ var __await = (this && this.__await) || function (v) { return this instanceof __ var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var g = generator.apply(thisArg, _arguments || []), i, q = []; - return i = {}, verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; + return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; } function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } } function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } diff --git a/tests/baselines/reference/emitter.asyncGenerators.functionDeclarations.es2015.js b/tests/baselines/reference/emitter.asyncGenerators.functionDeclarations.es2015.js index bebb30336dbb2..2271510771807 100644 --- a/tests/baselines/reference/emitter.asyncGenerators.functionDeclarations.es2015.js +++ b/tests/baselines/reference/emitter.asyncGenerators.functionDeclarations.es2015.js @@ -34,7 +34,7 @@ var __await = (this && this.__await) || function (v) { return this instanceof __ var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var g = generator.apply(thisArg, _arguments || []), i, q = []; - return i = {}, verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; + return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; } function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } } function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } @@ -52,7 +52,7 @@ var __await = (this && this.__await) || function (v) { return this instanceof __ var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var g = generator.apply(thisArg, _arguments || []), i, q = []; - return i = {}, verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; + return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; } function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } } function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } @@ -71,7 +71,7 @@ var __await = (this && this.__await) || function (v) { return this instanceof __ var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var g = generator.apply(thisArg, _arguments || []), i, q = []; - return i = {}, verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; + return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; } function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } } function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } @@ -102,7 +102,7 @@ var __asyncDelegator = (this && this.__asyncDelegator) || function (o) { var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var g = generator.apply(thisArg, _arguments || []), i, q = []; - return i = {}, verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; + return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; } function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } } function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } @@ -121,7 +121,7 @@ var __await = (this && this.__await) || function (v) { return this instanceof __ var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var g = generator.apply(thisArg, _arguments || []), i, q = []; - return i = {}, verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; + return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; } function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } } function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } @@ -152,7 +152,7 @@ var __await = (this && this.__await) || function (v) { return this instanceof __ var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var g = generator.apply(thisArg, _arguments || []), i, q = []; - return i = {}, verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; + return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; } function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } } function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } @@ -171,7 +171,7 @@ var __await = (this && this.__await) || function (v) { return this instanceof __ var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var g = generator.apply(thisArg, _arguments || []), i, q = []; - return i = {}, verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; + return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; } function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } } function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } diff --git a/tests/baselines/reference/emitter.asyncGenerators.functionDeclarations.es5.js b/tests/baselines/reference/emitter.asyncGenerators.functionDeclarations.es5.js index 04b4bc949ac78..a129d13003af0 100644 --- a/tests/baselines/reference/emitter.asyncGenerators.functionDeclarations.es5.js +++ b/tests/baselines/reference/emitter.asyncGenerators.functionDeclarations.es5.js @@ -31,8 +31,8 @@ async function * f7() { //// [F1.js] var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); + return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; function verb(n) { return function (v) { return step([n, v]); }; } function step(op) { if (f) throw new TypeError("Generator is already executing."); @@ -61,7 +61,7 @@ var __await = (this && this.__await) || function (v) { return this instanceof __ var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var g = generator.apply(thisArg, _arguments || []), i, q = []; - return i = {}, verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; + return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; } function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } } function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } @@ -79,8 +79,8 @@ function f1() { } //// [F2.js] var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); + return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; function verb(n) { return function (v) { return step([n, v]); }; } function step(op) { if (f) throw new TypeError("Generator is already executing."); @@ -109,7 +109,7 @@ var __await = (this && this.__await) || function (v) { return this instanceof __ var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var g = generator.apply(thisArg, _arguments || []), i, q = []; - return i = {}, verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; + return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; } function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } } function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } @@ -134,8 +134,8 @@ function f2() { } //// [F3.js] var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); + return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; function verb(n) { return function (v) { return step([n, v]); }; } function step(op) { if (f) throw new TypeError("Generator is already executing."); @@ -164,7 +164,7 @@ var __await = (this && this.__await) || function (v) { return this instanceof __ var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var g = generator.apply(thisArg, _arguments || []), i, q = []; - return i = {}, verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; + return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; } function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } } function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } @@ -189,8 +189,8 @@ function f3() { } //// [F4.js] var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); + return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; function verb(n) { return function (v) { return step([n, v]); }; } function step(op) { if (f) throw new TypeError("Generator is already executing."); @@ -231,7 +231,7 @@ var __asyncDelegator = (this && this.__asyncDelegator) || function (o) { var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var g = generator.apply(thisArg, _arguments || []), i, q = []; - return i = {}, verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; + return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; } function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } } function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } @@ -267,8 +267,8 @@ function f4() { } //// [F5.js] var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); + return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; function verb(n) { return function (v) { return step([n, v]); }; } function step(op) { if (f) throw new TypeError("Generator is already executing."); @@ -297,7 +297,7 @@ var __await = (this && this.__await) || function (v) { return this instanceof __ var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var g = generator.apply(thisArg, _arguments || []), i, q = []; - return i = {}, verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; + return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; } function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } } function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } @@ -353,8 +353,8 @@ function f5() { } //// [F6.js] var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); + return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; function verb(n) { return function (v) { return step([n, v]); }; } function step(op) { if (f) throw new TypeError("Generator is already executing."); @@ -383,7 +383,7 @@ var __await = (this && this.__await) || function (v) { return this instanceof __ var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var g = generator.apply(thisArg, _arguments || []), i, q = []; - return i = {}, verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; + return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; } function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } } function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } @@ -407,8 +407,8 @@ function f6() { } //// [F7.js] var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); + return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; function verb(n) { return function (v) { return step([n, v]); }; } function step(op) { if (f) throw new TypeError("Generator is already executing."); @@ -437,7 +437,7 @@ var __await = (this && this.__await) || function (v) { return this instanceof __ var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var g = generator.apply(thisArg, _arguments || []), i, q = []; - return i = {}, verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; + return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; } function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } } function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } diff --git a/tests/baselines/reference/emitter.asyncGenerators.functionExpressions.es2015.js b/tests/baselines/reference/emitter.asyncGenerators.functionExpressions.es2015.js index e89e9b9d6a89f..88ae6f0e40597 100644 --- a/tests/baselines/reference/emitter.asyncGenerators.functionExpressions.es2015.js +++ b/tests/baselines/reference/emitter.asyncGenerators.functionExpressions.es2015.js @@ -34,7 +34,7 @@ var __await = (this && this.__await) || function (v) { return this instanceof __ var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var g = generator.apply(thisArg, _arguments || []), i, q = []; - return i = {}, verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; + return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; } function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } } function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } @@ -52,7 +52,7 @@ var __await = (this && this.__await) || function (v) { return this instanceof __ var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var g = generator.apply(thisArg, _arguments || []), i, q = []; - return i = {}, verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; + return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; } function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } } function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } @@ -71,7 +71,7 @@ var __await = (this && this.__await) || function (v) { return this instanceof __ var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var g = generator.apply(thisArg, _arguments || []), i, q = []; - return i = {}, verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; + return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; } function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } } function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } @@ -102,7 +102,7 @@ var __asyncDelegator = (this && this.__asyncDelegator) || function (o) { var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var g = generator.apply(thisArg, _arguments || []), i, q = []; - return i = {}, verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; + return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; } function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } } function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } @@ -121,7 +121,7 @@ var __await = (this && this.__await) || function (v) { return this instanceof __ var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var g = generator.apply(thisArg, _arguments || []), i, q = []; - return i = {}, verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; + return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; } function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } } function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } @@ -152,7 +152,7 @@ var __await = (this && this.__await) || function (v) { return this instanceof __ var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var g = generator.apply(thisArg, _arguments || []), i, q = []; - return i = {}, verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; + return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; } function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } } function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } @@ -171,7 +171,7 @@ var __await = (this && this.__await) || function (v) { return this instanceof __ var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var g = generator.apply(thisArg, _arguments || []), i, q = []; - return i = {}, verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; + return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; } function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } } function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } diff --git a/tests/baselines/reference/emitter.asyncGenerators.functionExpressions.es5.js b/tests/baselines/reference/emitter.asyncGenerators.functionExpressions.es5.js index 699df6cff0b1b..e4076be6c7a0b 100644 --- a/tests/baselines/reference/emitter.asyncGenerators.functionExpressions.es5.js +++ b/tests/baselines/reference/emitter.asyncGenerators.functionExpressions.es5.js @@ -31,8 +31,8 @@ const f7 = async function * () { //// [F1.js] var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); + return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; function verb(n) { return function (v) { return step([n, v]); }; } function step(op) { if (f) throw new TypeError("Generator is already executing."); @@ -61,7 +61,7 @@ var __await = (this && this.__await) || function (v) { return this instanceof __ var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var g = generator.apply(thisArg, _arguments || []), i, q = []; - return i = {}, verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; + return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; } function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } } function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } @@ -79,8 +79,8 @@ var f1 = function () { }; //// [F2.js] var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); + return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; function verb(n) { return function (v) { return step([n, v]); }; } function step(op) { if (f) throw new TypeError("Generator is already executing."); @@ -109,7 +109,7 @@ var __await = (this && this.__await) || function (v) { return this instanceof __ var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var g = generator.apply(thisArg, _arguments || []), i, q = []; - return i = {}, verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; + return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; } function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } } function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } @@ -134,8 +134,8 @@ var f2 = function () { }; //// [F3.js] var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); + return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; function verb(n) { return function (v) { return step([n, v]); }; } function step(op) { if (f) throw new TypeError("Generator is already executing."); @@ -164,7 +164,7 @@ var __await = (this && this.__await) || function (v) { return this instanceof __ var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var g = generator.apply(thisArg, _arguments || []), i, q = []; - return i = {}, verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; + return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; } function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } } function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } @@ -189,8 +189,8 @@ var f3 = function () { }; //// [F4.js] var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); + return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; function verb(n) { return function (v) { return step([n, v]); }; } function step(op) { if (f) throw new TypeError("Generator is already executing."); @@ -231,7 +231,7 @@ var __asyncDelegator = (this && this.__asyncDelegator) || function (o) { var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var g = generator.apply(thisArg, _arguments || []), i, q = []; - return i = {}, verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; + return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; } function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } } function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } @@ -267,8 +267,8 @@ var f4 = function () { }; //// [F5.js] var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); + return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; function verb(n) { return function (v) { return step([n, v]); }; } function step(op) { if (f) throw new TypeError("Generator is already executing."); @@ -297,7 +297,7 @@ var __await = (this && this.__await) || function (v) { return this instanceof __ var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var g = generator.apply(thisArg, _arguments || []), i, q = []; - return i = {}, verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; + return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; } function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } } function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } @@ -353,8 +353,8 @@ var f5 = function () { }; //// [F6.js] var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); + return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; function verb(n) { return function (v) { return step([n, v]); }; } function step(op) { if (f) throw new TypeError("Generator is already executing."); @@ -383,7 +383,7 @@ var __await = (this && this.__await) || function (v) { return this instanceof __ var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var g = generator.apply(thisArg, _arguments || []), i, q = []; - return i = {}, verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; + return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; } function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } } function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } @@ -407,8 +407,8 @@ var f6 = function () { }; //// [F7.js] var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); + return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; function verb(n) { return function (v) { return step([n, v]); }; } function step(op) { if (f) throw new TypeError("Generator is already executing."); @@ -437,7 +437,7 @@ var __await = (this && this.__await) || function (v) { return this instanceof __ var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var g = generator.apply(thisArg, _arguments || []), i, q = []; - return i = {}, verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; + return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; } function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } } function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } diff --git a/tests/baselines/reference/emitter.asyncGenerators.objectLiteralMethods.es2015.js b/tests/baselines/reference/emitter.asyncGenerators.objectLiteralMethods.es2015.js index 97ea27906a2c4..e24410353e555 100644 --- a/tests/baselines/reference/emitter.asyncGenerators.objectLiteralMethods.es2015.js +++ b/tests/baselines/reference/emitter.asyncGenerators.objectLiteralMethods.es2015.js @@ -48,7 +48,7 @@ var __await = (this && this.__await) || function (v) { return this instanceof __ var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var g = generator.apply(thisArg, _arguments || []), i, q = []; - return i = {}, verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; + return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; } function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } } function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } @@ -68,7 +68,7 @@ var __await = (this && this.__await) || function (v) { return this instanceof __ var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var g = generator.apply(thisArg, _arguments || []), i, q = []; - return i = {}, verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; + return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; } function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } } function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } @@ -89,7 +89,7 @@ var __await = (this && this.__await) || function (v) { return this instanceof __ var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var g = generator.apply(thisArg, _arguments || []), i, q = []; - return i = {}, verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; + return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; } function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } } function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } @@ -122,7 +122,7 @@ var __asyncDelegator = (this && this.__asyncDelegator) || function (o) { var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var g = generator.apply(thisArg, _arguments || []), i, q = []; - return i = {}, verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; + return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; } function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } } function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } @@ -143,7 +143,7 @@ var __await = (this && this.__await) || function (v) { return this instanceof __ var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var g = generator.apply(thisArg, _arguments || []), i, q = []; - return i = {}, verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; + return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; } function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } } function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } @@ -176,7 +176,7 @@ var __await = (this && this.__await) || function (v) { return this instanceof __ var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var g = generator.apply(thisArg, _arguments || []), i, q = []; - return i = {}, verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; + return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; } function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } } function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } @@ -197,7 +197,7 @@ var __await = (this && this.__await) || function (v) { return this instanceof __ var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var g = generator.apply(thisArg, _arguments || []), i, q = []; - return i = {}, verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; + return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; } function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } } function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } diff --git a/tests/baselines/reference/emitter.asyncGenerators.objectLiteralMethods.es5.js b/tests/baselines/reference/emitter.asyncGenerators.objectLiteralMethods.es5.js index f65bf2d3caea3..194c26f59da1f 100644 --- a/tests/baselines/reference/emitter.asyncGenerators.objectLiteralMethods.es5.js +++ b/tests/baselines/reference/emitter.asyncGenerators.objectLiteralMethods.es5.js @@ -45,8 +45,8 @@ const o7 = { //// [O1.js] var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); + return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; function verb(n) { return function (v) { return step([n, v]); }; } function step(op) { if (f) throw new TypeError("Generator is already executing."); @@ -75,7 +75,7 @@ var __await = (this && this.__await) || function (v) { return this instanceof __ var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var g = generator.apply(thisArg, _arguments || []), i, q = []; - return i = {}, verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; + return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; } function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } } function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } @@ -95,8 +95,8 @@ var o1 = { }; //// [O2.js] var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); + return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; function verb(n) { return function (v) { return step([n, v]); }; } function step(op) { if (f) throw new TypeError("Generator is already executing."); @@ -125,7 +125,7 @@ var __await = (this && this.__await) || function (v) { return this instanceof __ var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var g = generator.apply(thisArg, _arguments || []), i, q = []; - return i = {}, verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; + return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; } function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } } function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } @@ -152,8 +152,8 @@ var o2 = { }; //// [O3.js] var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); + return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; function verb(n) { return function (v) { return step([n, v]); }; } function step(op) { if (f) throw new TypeError("Generator is already executing."); @@ -182,7 +182,7 @@ var __await = (this && this.__await) || function (v) { return this instanceof __ var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var g = generator.apply(thisArg, _arguments || []), i, q = []; - return i = {}, verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; + return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; } function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } } function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } @@ -209,8 +209,8 @@ var o3 = { }; //// [O4.js] var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); + return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; function verb(n) { return function (v) { return step([n, v]); }; } function step(op) { if (f) throw new TypeError("Generator is already executing."); @@ -251,7 +251,7 @@ var __asyncDelegator = (this && this.__asyncDelegator) || function (o) { var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var g = generator.apply(thisArg, _arguments || []), i, q = []; - return i = {}, verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; + return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; } function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } } function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } @@ -289,8 +289,8 @@ var o4 = { }; //// [O5.js] var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); + return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; function verb(n) { return function (v) { return step([n, v]); }; } function step(op) { if (f) throw new TypeError("Generator is already executing."); @@ -319,7 +319,7 @@ var __await = (this && this.__await) || function (v) { return this instanceof __ var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var g = generator.apply(thisArg, _arguments || []), i, q = []; - return i = {}, verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; + return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; } function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } } function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } @@ -377,8 +377,8 @@ var o5 = { }; //// [O6.js] var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); + return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; function verb(n) { return function (v) { return step([n, v]); }; } function step(op) { if (f) throw new TypeError("Generator is already executing."); @@ -407,7 +407,7 @@ var __await = (this && this.__await) || function (v) { return this instanceof __ var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var g = generator.apply(thisArg, _arguments || []), i, q = []; - return i = {}, verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; + return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; } function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } } function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } @@ -433,8 +433,8 @@ var o6 = { }; //// [O7.js] var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); + return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; function verb(n) { return function (v) { return step([n, v]); }; } function step(op) { if (f) throw new TypeError("Generator is already executing."); @@ -463,7 +463,7 @@ var __await = (this && this.__await) || function (v) { return this instanceof __ var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var g = generator.apply(thisArg, _arguments || []), i, q = []; - return i = {}, verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; + return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; } function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } } function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } diff --git a/tests/baselines/reference/emitter.forAwait(target=es2015).js b/tests/baselines/reference/emitter.forAwait(target=es2015).js index 5e77358f5efab..1fe4ae6da47bd 100644 --- a/tests/baselines/reference/emitter.forAwait(target=es2015).js +++ b/tests/baselines/reference/emitter.forAwait(target=es2015).js @@ -136,7 +136,7 @@ var __await = (this && this.__await) || function (v) { return this instanceof __ var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var g = generator.apply(thisArg, _arguments || []), i, q = []; - return i = {}, verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; + return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; } function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } } function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } @@ -177,7 +177,7 @@ var __await = (this && this.__await) || function (v) { return this instanceof __ var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var g = generator.apply(thisArg, _arguments || []), i, q = []; - return i = {}, verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; + return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; } function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } } function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } @@ -257,7 +257,7 @@ var __await = (this && this.__await) || function (v) { return this instanceof __ var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var g = generator.apply(thisArg, _arguments || []), i, q = []; - return i = {}, verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; + return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; } function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } } function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } @@ -300,7 +300,7 @@ var __await = (this && this.__await) || function (v) { return this instanceof __ var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var g = generator.apply(thisArg, _arguments || []), i, q = []; - return i = {}, verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; + return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; } function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } } function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } diff --git a/tests/baselines/reference/emitter.forAwait(target=es2017).js b/tests/baselines/reference/emitter.forAwait(target=es2017).js index 9477434034b60..76499a01b26fe 100644 --- a/tests/baselines/reference/emitter.forAwait(target=es2017).js +++ b/tests/baselines/reference/emitter.forAwait(target=es2017).js @@ -114,7 +114,7 @@ var __await = (this && this.__await) || function (v) { return this instanceof __ var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var g = generator.apply(thisArg, _arguments || []), i, q = []; - return i = {}, verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; + return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; } function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } } function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } @@ -155,7 +155,7 @@ var __await = (this && this.__await) || function (v) { return this instanceof __ var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var g = generator.apply(thisArg, _arguments || []), i, q = []; - return i = {}, verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; + return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; } function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } } function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } @@ -224,7 +224,7 @@ var __await = (this && this.__await) || function (v) { return this instanceof __ var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var g = generator.apply(thisArg, _arguments || []), i, q = []; - return i = {}, verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; + return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; } function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } } function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } @@ -267,7 +267,7 @@ var __await = (this && this.__await) || function (v) { return this instanceof __ var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var g = generator.apply(thisArg, _arguments || []), i, q = []; - return i = {}, verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; + return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; } function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } } function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } diff --git a/tests/baselines/reference/emitter.forAwait(target=es5).js b/tests/baselines/reference/emitter.forAwait(target=es5).js index da767cdc76492..212f6b4eeb990 100644 --- a/tests/baselines/reference/emitter.forAwait(target=es5).js +++ b/tests/baselines/reference/emitter.forAwait(target=es5).js @@ -61,8 +61,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }); }; var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); + return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; function verb(n) { return function (v) { return step([n, v]); }; } function step(op) { if (f) throw new TypeError("Generator is already executing."); @@ -147,8 +147,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }); }; var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); + return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; function verb(n) { return function (v) { return step([n, v]); }; } function step(op) { if (f) throw new TypeError("Generator is already executing."); @@ -224,8 +224,8 @@ function f2() { } //// [file3.js] var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); + return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; function verb(n) { return function (v) { return step([n, v]); }; } function step(op) { if (f) throw new TypeError("Generator is already executing."); @@ -261,7 +261,7 @@ var __await = (this && this.__await) || function (v) { return this instanceof __ var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var g = generator.apply(thisArg, _arguments || []), i, q = []; - return i = {}, verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; + return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; } function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } } function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } @@ -314,8 +314,8 @@ function f3() { } //// [file4.js] var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); + return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; function verb(n) { return function (v) { return step([n, v]); }; } function step(op) { if (f) throw new TypeError("Generator is already executing."); @@ -351,7 +351,7 @@ var __await = (this && this.__await) || function (v) { return this instanceof __ var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var g = generator.apply(thisArg, _arguments || []), i, q = []; - return i = {}, verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; + return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; } function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } } function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } @@ -413,8 +413,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }); }; var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); + return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; function verb(n) { return function (v) { return step([n, v]); }; } function step(op) { if (f) throw new TypeError("Generator is already executing."); @@ -491,8 +491,8 @@ function f5() { } //// [file6.js] var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); + return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; function verb(n) { return function (v) { return step([n, v]); }; } function step(op) { if (f) throw new TypeError("Generator is already executing."); @@ -528,7 +528,7 @@ var __await = (this && this.__await) || function (v) { return this instanceof __ var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var g = generator.apply(thisArg, _arguments || []), i, q = []; - return i = {}, verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; + return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; } function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } } function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } @@ -582,8 +582,8 @@ function f6() { } //// [file7.js] var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); + return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; function verb(n) { return function (v) { return step([n, v]); }; } function step(op) { if (f) throw new TypeError("Generator is already executing."); @@ -619,7 +619,7 @@ var __await = (this && this.__await) || function (v) { return this instanceof __ var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var g = generator.apply(thisArg, _arguments || []), i, q = []; - return i = {}, verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; + return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; } function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } } function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } diff --git a/tests/baselines/reference/es5-asyncFunction.js b/tests/baselines/reference/es5-asyncFunction.js index df6b0627cd566..9b262e16c8844 100644 --- a/tests/baselines/reference/es5-asyncFunction.js +++ b/tests/baselines/reference/es5-asyncFunction.js @@ -21,8 +21,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }); }; var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); + return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; function verb(n) { return function (v) { return step([n, v]); }; } function step(op) { if (f) throw new TypeError("Generator is already executing."); diff --git a/tests/baselines/reference/es5-asyncFunctionLongObjectLiteral.js b/tests/baselines/reference/es5-asyncFunctionLongObjectLiteral.js index 76cbea45560a7..48fdc5eb3600e 100644 --- a/tests/baselines/reference/es5-asyncFunctionLongObjectLiteral.js +++ b/tests/baselines/reference/es5-asyncFunctionLongObjectLiteral.js @@ -41,8 +41,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }); }; var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); + return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; function verb(n) { return function (v) { return step([n, v]); }; } function step(op) { if (f) throw new TypeError("Generator is already executing."); diff --git a/tests/baselines/reference/es5-importHelpersAsyncFunctions.js b/tests/baselines/reference/es5-importHelpersAsyncFunctions.js index 472c206c08ef1..03a239f92195d 100644 --- a/tests/baselines/reference/es5-importHelpersAsyncFunctions.js +++ b/tests/baselines/reference/es5-importHelpersAsyncFunctions.js @@ -40,8 +40,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }); }; var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); + return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; function verb(n) { return function (v) { return step([n, v]); }; } function step(op) { if (f) throw new TypeError("Generator is already executing."); diff --git a/tests/baselines/reference/exportDefaultFunctionInNamespace.js b/tests/baselines/reference/exportDefaultFunctionInNamespace.js index 0ef66b3be8402..a0746a0e49282 100644 --- a/tests/baselines/reference/exportDefaultFunctionInNamespace.js +++ b/tests/baselines/reference/exportDefaultFunctionInNamespace.js @@ -21,8 +21,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }); }; var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); + return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; function verb(n) { return function (v) { return step([n, v]); }; } function step(op) { if (f) throw new TypeError("Generator is already executing."); diff --git a/tests/baselines/reference/expressionsForbiddenInParameterInitializers.js b/tests/baselines/reference/expressionsForbiddenInParameterInitializers.js index 851d68ec37295..986f220e6572f 100644 --- a/tests/baselines/reference/expressionsForbiddenInParameterInitializers.js +++ b/tests/baselines/reference/expressionsForbiddenInParameterInitializers.js @@ -20,8 +20,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }); }; var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); + return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; function verb(n) { return function (v) { return step([n, v]); }; } function step(op) { if (f) throw new TypeError("Generator is already executing."); diff --git a/tests/baselines/reference/forAwaitPerIterationBindingDownlevel.js b/tests/baselines/reference/forAwaitPerIterationBindingDownlevel.js index 0f14a1b85df58..b9d78e748190a 100644 --- a/tests/baselines/reference/forAwaitPerIterationBindingDownlevel.js +++ b/tests/baselines/reference/forAwaitPerIterationBindingDownlevel.js @@ -37,8 +37,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }); }; var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); + return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; function verb(n) { return function (v) { return step([n, v]); }; } function step(op) { if (f) throw new TypeError("Generator is already executing."); @@ -67,7 +67,7 @@ var __await = (this && this.__await) || function (v) { return this instanceof __ var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var g = generator.apply(thisArg, _arguments || []), i, q = []; - return i = {}, verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; + return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; } function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } } function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } diff --git a/tests/baselines/reference/importAttributes7.js b/tests/baselines/reference/importAttributes7.js index 66ff33e5bc507..30f45f2386d47 100644 --- a/tests/baselines/reference/importAttributes7.js +++ b/tests/baselines/reference/importAttributes7.js @@ -35,8 +35,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }); }; var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); + return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; function verb(n) { return function (v) { return step([n, v]); }; } function step(op) { if (f) throw new TypeError("Generator is already executing."); diff --git a/tests/baselines/reference/importCallExpressionAsyncES5AMD.js b/tests/baselines/reference/importCallExpressionAsyncES5AMD.js index 44a3dcc0619ff..4a458837a45ac 100644 --- a/tests/baselines/reference/importCallExpressionAsyncES5AMD.js +++ b/tests/baselines/reference/importCallExpressionAsyncES5AMD.js @@ -41,8 +41,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }); }; var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); + return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; function verb(n) { return function (v) { return step([n, v]); }; } function step(op) { if (f) throw new TypeError("Generator is already executing."); diff --git a/tests/baselines/reference/importCallExpressionAsyncES5CJS.js b/tests/baselines/reference/importCallExpressionAsyncES5CJS.js index a816ecf6e46d0..4f2657547fe75 100644 --- a/tests/baselines/reference/importCallExpressionAsyncES5CJS.js +++ b/tests/baselines/reference/importCallExpressionAsyncES5CJS.js @@ -42,8 +42,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }); }; var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); + return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; function verb(n) { return function (v) { return step([n, v]); }; } function step(op) { if (f) throw new TypeError("Generator is already executing."); diff --git a/tests/baselines/reference/importCallExpressionAsyncES5System.js b/tests/baselines/reference/importCallExpressionAsyncES5System.js index f701d06d2d4b8..352be31696e94 100644 --- a/tests/baselines/reference/importCallExpressionAsyncES5System.js +++ b/tests/baselines/reference/importCallExpressionAsyncES5System.js @@ -43,8 +43,8 @@ System.register([], function (exports_1, context_1) { }); }; var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); + return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; function verb(n) { return function (v) { return step([n, v]); }; } function step(op) { if (f) throw new TypeError("Generator is already executing."); diff --git a/tests/baselines/reference/importCallExpressionAsyncES5UMD.js b/tests/baselines/reference/importCallExpressionAsyncES5UMD.js index 707b41f01ee3b..799fb08ad48dc 100644 --- a/tests/baselines/reference/importCallExpressionAsyncES5UMD.js +++ b/tests/baselines/reference/importCallExpressionAsyncES5UMD.js @@ -41,8 +41,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }); }; var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); + return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; function verb(n) { return function (v) { return step([n, v]); }; } function step(op) { if (f) throw new TypeError("Generator is already executing."); diff --git a/tests/baselines/reference/importCallExpressionNestedAMD2.js b/tests/baselines/reference/importCallExpressionNestedAMD2.js index 3200a5831d936..4f90f4e7732a2 100644 --- a/tests/baselines/reference/importCallExpressionNestedAMD2.js +++ b/tests/baselines/reference/importCallExpressionNestedAMD2.js @@ -25,8 +25,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }); }; var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); + return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; function verb(n) { return function (v) { return step([n, v]); }; } function step(op) { if (f) throw new TypeError("Generator is already executing."); diff --git a/tests/baselines/reference/importCallExpressionNestedCJS2.js b/tests/baselines/reference/importCallExpressionNestedCJS2.js index a40cf58f67480..5d2371ea723d5 100644 --- a/tests/baselines/reference/importCallExpressionNestedCJS2.js +++ b/tests/baselines/reference/importCallExpressionNestedCJS2.js @@ -23,8 +23,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }); }; var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); + return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; function verb(n) { return function (v) { return step([n, v]); }; } function step(op) { if (f) throw new TypeError("Generator is already executing."); diff --git a/tests/baselines/reference/importCallExpressionNestedES20152.js b/tests/baselines/reference/importCallExpressionNestedES20152.js index 7d52515fd233b..07e9f0ced120e 100644 --- a/tests/baselines/reference/importCallExpressionNestedES20152.js +++ b/tests/baselines/reference/importCallExpressionNestedES20152.js @@ -21,8 +21,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }); }; var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); + return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; function verb(n) { return function (v) { return step([n, v]); }; } function step(op) { if (f) throw new TypeError("Generator is already executing."); diff --git a/tests/baselines/reference/importCallExpressionNestedES20202.js b/tests/baselines/reference/importCallExpressionNestedES20202.js index 619b9b105a5c0..999f8ce28e6be 100644 --- a/tests/baselines/reference/importCallExpressionNestedES20202.js +++ b/tests/baselines/reference/importCallExpressionNestedES20202.js @@ -22,8 +22,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }); }; var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); + return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; function verb(n) { return function (v) { return step([n, v]); }; } function step(op) { if (f) throw new TypeError("Generator is already executing."); diff --git a/tests/baselines/reference/importCallExpressionNestedSystem2.js b/tests/baselines/reference/importCallExpressionNestedSystem2.js index 62dc40ce6ac20..1490a4690022d 100644 --- a/tests/baselines/reference/importCallExpressionNestedSystem2.js +++ b/tests/baselines/reference/importCallExpressionNestedSystem2.js @@ -31,8 +31,8 @@ System.register([], function (exports_1, context_1) { }); }; var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); + return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; function verb(n) { return function (v) { return step([n, v]); }; } function step(op) { if (f) throw new TypeError("Generator is already executing."); diff --git a/tests/baselines/reference/importCallExpressionNestedUMD2.js b/tests/baselines/reference/importCallExpressionNestedUMD2.js index 812cf0aa1c62f..c74e8d9eda23e 100644 --- a/tests/baselines/reference/importCallExpressionNestedUMD2.js +++ b/tests/baselines/reference/importCallExpressionNestedUMD2.js @@ -33,8 +33,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }); }; var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); + return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; function verb(n) { return function (v) { return step([n, v]); }; } function step(op) { if (f) throw new TypeError("Generator is already executing."); diff --git a/tests/baselines/reference/importCallExpressionNoModuleKindSpecified.js b/tests/baselines/reference/importCallExpressionNoModuleKindSpecified.js index 08338407d4134..e7bf6909ce642 100644 --- a/tests/baselines/reference/importCallExpressionNoModuleKindSpecified.js +++ b/tests/baselines/reference/importCallExpressionNoModuleKindSpecified.js @@ -55,8 +55,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }); }; var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); + return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; function verb(n) { return function (v) { return step([n, v]); }; } function step(op) { if (f) throw new TypeError("Generator is already executing."); diff --git a/tests/baselines/reference/importMeta(module=commonjs,target=es5).js b/tests/baselines/reference/importMeta(module=commonjs,target=es5).js index f2728bb75ae20..6d5e4033ca07c 100644 --- a/tests/baselines/reference/importMeta(module=commonjs,target=es5).js +++ b/tests/baselines/reference/importMeta(module=commonjs,target=es5).js @@ -50,8 +50,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }); }; var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); + return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; function verb(n) { return function (v) { return step([n, v]); }; } function step(op) { if (f) throw new TypeError("Generator is already executing."); diff --git a/tests/baselines/reference/importMeta(module=es2020,target=es5).js b/tests/baselines/reference/importMeta(module=es2020,target=es5).js index 7cdf12ba8fe0a..03e7011012f38 100644 --- a/tests/baselines/reference/importMeta(module=es2020,target=es5).js +++ b/tests/baselines/reference/importMeta(module=es2020,target=es5).js @@ -49,8 +49,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }); }; var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); + return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; function verb(n) { return function (v) { return step([n, v]); }; } function step(op) { if (f) throw new TypeError("Generator is already executing."); diff --git a/tests/baselines/reference/importMeta(module=esnext,target=es5).js b/tests/baselines/reference/importMeta(module=esnext,target=es5).js index 7cdf12ba8fe0a..03e7011012f38 100644 --- a/tests/baselines/reference/importMeta(module=esnext,target=es5).js +++ b/tests/baselines/reference/importMeta(module=esnext,target=es5).js @@ -49,8 +49,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }); }; var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); + return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; function verb(n) { return function (v) { return step([n, v]); }; } function step(op) { if (f) throw new TypeError("Generator is already executing."); diff --git a/tests/baselines/reference/importMeta(module=system,target=es5).js b/tests/baselines/reference/importMeta(module=system,target=es5).js index 2be9428dee726..b854483f66f5c 100644 --- a/tests/baselines/reference/importMeta(module=system,target=es5).js +++ b/tests/baselines/reference/importMeta(module=system,target=es5).js @@ -51,8 +51,8 @@ System.register([], function (exports_1, context_1) { }); }; var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); + return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; function verb(n) { return function (v) { return step([n, v]); }; } function step(op) { if (f) throw new TypeError("Generator is already executing."); diff --git a/tests/baselines/reference/invalidContinueInDownlevelAsync.js b/tests/baselines/reference/invalidContinueInDownlevelAsync.js index 1bf7a7a88e549..7aa96b7fc6c1c 100644 --- a/tests/baselines/reference/invalidContinueInDownlevelAsync.js +++ b/tests/baselines/reference/invalidContinueInDownlevelAsync.js @@ -21,8 +21,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }); }; var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); + return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; function verb(n) { return function (v) { return step([n, v]); }; } function step(op) { if (f) throw new TypeError("Generator is already executing."); diff --git a/tests/baselines/reference/jsFileCompilationAwaitModifier.js b/tests/baselines/reference/jsFileCompilationAwaitModifier.js index 148037d7006df..92361660afc56 100644 --- a/tests/baselines/reference/jsFileCompilationAwaitModifier.js +++ b/tests/baselines/reference/jsFileCompilationAwaitModifier.js @@ -23,8 +23,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }); }; var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); + return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; function verb(n) { return function (v) { return step([n, v]); }; } function step(op) { if (f) throw new TypeError("Generator is already executing."); diff --git a/tests/baselines/reference/jsxElementType.js b/tests/baselines/reference/jsxElementType.js index b2864d2740ce0..6d8349d54728a 100644 --- a/tests/baselines/reference/jsxElementType.js +++ b/tests/baselines/reference/jsxElementType.js @@ -141,8 +141,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }); }; var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); + return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; function verb(n) { return function (v) { return step([n, v]); }; } function step(op) { if (f) throw new TypeError("Generator is already executing."); diff --git a/tests/baselines/reference/labeledStatementWithLabel.js b/tests/baselines/reference/labeledStatementWithLabel.js index ba62abb97dbf1..f384e217dbb20 100644 --- a/tests/baselines/reference/labeledStatementWithLabel.js +++ b/tests/baselines/reference/labeledStatementWithLabel.js @@ -27,8 +27,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }); }; var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); + return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; function verb(n) { return function (v) { return step([n, v]); }; } function step(op) { if (f) throw new TypeError("Generator is already executing."); diff --git a/tests/baselines/reference/legacyNodeModulesExportsSpecifierGenerationConditions.js b/tests/baselines/reference/legacyNodeModulesExportsSpecifierGenerationConditions.js index b78501533ba4c..b942776c84403 100644 --- a/tests/baselines/reference/legacyNodeModulesExportsSpecifierGenerationConditions.js +++ b/tests/baselines/reference/legacyNodeModulesExportsSpecifierGenerationConditions.js @@ -43,8 +43,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }); }; var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); + return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; function verb(n) { return function (v) { return step([n, v]); }; } function step(op) { if (f) throw new TypeError("Generator is already executing."); diff --git a/tests/baselines/reference/neverAsDiscriminantType(strict=false).js b/tests/baselines/reference/neverAsDiscriminantType(strict=false).js index df00f302ae753..61e0670ff721d 100644 --- a/tests/baselines/reference/neverAsDiscriminantType(strict=false).js +++ b/tests/baselines/reference/neverAsDiscriminantType(strict=false).js @@ -79,8 +79,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }); }; var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); + return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; function verb(n) { return function (v) { return step([n, v]); }; } function step(op) { if (f) throw new TypeError("Generator is already executing."); diff --git a/tests/baselines/reference/neverAsDiscriminantType(strict=true).js b/tests/baselines/reference/neverAsDiscriminantType(strict=true).js index df00f302ae753..61e0670ff721d 100644 --- a/tests/baselines/reference/neverAsDiscriminantType(strict=true).js +++ b/tests/baselines/reference/neverAsDiscriminantType(strict=true).js @@ -79,8 +79,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }); }; var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); + return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; function verb(n) { return function (v) { return step([n, v]); }; } function step(op) { if (f) throw new TypeError("Generator is already executing."); diff --git a/tests/baselines/reference/objectRestSpread.js b/tests/baselines/reference/objectRestSpread.js index 5908b8d2d419e..a689b3f57614a 100644 --- a/tests/baselines/reference/objectRestSpread.js +++ b/tests/baselines/reference/objectRestSpread.js @@ -40,7 +40,7 @@ var __await = (this && this.__await) || function (v) { return this instanceof __ var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var g = generator.apply(thisArg, _arguments || []), i, q = []; - return i = {}, verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; + return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; } function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } } function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } diff --git a/tests/baselines/reference/operationsAvailableOnPromisedType.js b/tests/baselines/reference/operationsAvailableOnPromisedType.js index 8ba23a7a47c6e..c84b83aed12d3 100644 --- a/tests/baselines/reference/operationsAvailableOnPromisedType.js +++ b/tests/baselines/reference/operationsAvailableOnPromisedType.js @@ -42,8 +42,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }); }; var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); + return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; function verb(n) { return function (v) { return step([n, v]); }; } function step(op) { if (f) throw new TypeError("Generator is already executing."); diff --git a/tests/baselines/reference/parenthesizedAsyncArrowFunction.js b/tests/baselines/reference/parenthesizedAsyncArrowFunction.js index 522b34f977925..e4fd9b3826362 100644 --- a/tests/baselines/reference/parenthesizedAsyncArrowFunction.js +++ b/tests/baselines/reference/parenthesizedAsyncArrowFunction.js @@ -18,8 +18,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }); }; var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); + return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; function verb(n) { return function (v) { return step([n, v]); }; } function step(op) { if (f) throw new TypeError("Generator is already executing."); diff --git a/tests/baselines/reference/privateNamesIncompatibleModifiers.js b/tests/baselines/reference/privateNamesIncompatibleModifiers.js index 6b6c916a43b37..7db58dd9ddb69 100644 --- a/tests/baselines/reference/privateNamesIncompatibleModifiers.js +++ b/tests/baselines/reference/privateNamesIncompatibleModifiers.js @@ -51,7 +51,7 @@ var __await = (this && this.__await) || function (v) { return this instanceof __ var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var g = generator.apply(thisArg, _arguments || []), i, q = []; - return i = {}, verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; + return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; } function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } } function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } diff --git a/tests/baselines/reference/promiseDefinitionTest.js b/tests/baselines/reference/promiseDefinitionTest.js index f2d4d10dfe92e..ef7cd20fd9ef2 100644 --- a/tests/baselines/reference/promiseDefinitionTest.js +++ b/tests/baselines/reference/promiseDefinitionTest.js @@ -17,8 +17,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }); }; var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); + return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; function verb(n) { return function (v) { return step([n, v]); }; } function step(op) { if (f) throw new TypeError("Generator is already executing."); diff --git a/tests/baselines/reference/reactReduxLikeDeferredInferenceAllowsAssignment.js b/tests/baselines/reference/reactReduxLikeDeferredInferenceAllowsAssignment.js index 6283c4097c898..b000368f44808 100644 --- a/tests/baselines/reference/reactReduxLikeDeferredInferenceAllowsAssignment.js +++ b/tests/baselines/reference/reactReduxLikeDeferredInferenceAllowsAssignment.js @@ -176,8 +176,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }); }; var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); + return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; function verb(n) { return function (v) { return step([n, v]); }; } function step(op) { if (f) throw new TypeError("Generator is already executing."); diff --git a/tests/baselines/reference/spreadOfParamsFromGeneratorMakesRequiredParams.js b/tests/baselines/reference/spreadOfParamsFromGeneratorMakesRequiredParams.js index 429f2bf360800..18694bfa14cb4 100644 --- a/tests/baselines/reference/spreadOfParamsFromGeneratorMakesRequiredParams.js +++ b/tests/baselines/reference/spreadOfParamsFromGeneratorMakesRequiredParams.js @@ -10,8 +10,8 @@ call(function* (a: 'a') { }); // error, 2nd argument required //// [spreadOfParamsFromGeneratorMakesRequiredParams.js] var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); + return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; function verb(n) { return function (v) { return step([n, v]); }; } function step(op) { if (f) throw new TypeError("Generator is already executing."); diff --git a/tests/baselines/reference/templateStringWithEmbeddedYieldKeyword.js b/tests/baselines/reference/templateStringWithEmbeddedYieldKeyword.js index 9165eaf7d05d0..3c767adb91b29 100644 --- a/tests/baselines/reference/templateStringWithEmbeddedYieldKeyword.js +++ b/tests/baselines/reference/templateStringWithEmbeddedYieldKeyword.js @@ -9,8 +9,8 @@ function* gen { //// [templateStringWithEmbeddedYieldKeyword.js] var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); + return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; function verb(n) { return function (v) { return step([n, v]); }; } function step(op) { if (f) throw new TypeError("Generator is already executing."); diff --git a/tests/baselines/reference/transformNestedGeneratorsWithTry.js b/tests/baselines/reference/transformNestedGeneratorsWithTry.js index fafab23513f62..03e601481e87c 100644 --- a/tests/baselines/reference/transformNestedGeneratorsWithTry.js +++ b/tests/baselines/reference/transformNestedGeneratorsWithTry.js @@ -34,8 +34,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }); }; var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); + return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; function verb(n) { return function (v) { return step([n, v]); }; } function step(op) { if (f) throw new TypeError("Generator is already executing."); diff --git a/tests/baselines/reference/usingDeclarations.1(target=es2015).js b/tests/baselines/reference/usingDeclarations.1(target=es2015).js index a32dd5c254fb5..e007092478438 100644 --- a/tests/baselines/reference/usingDeclarations.1(target=es2015).js +++ b/tests/baselines/reference/usingDeclarations.1(target=es2015).js @@ -219,7 +219,7 @@ var __await = (this && this.__await) || function (v) { return this instanceof __ var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var g = generator.apply(thisArg, _arguments || []), i, q = []; - return i = {}, verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; + return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; } function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } } function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } diff --git a/tests/baselines/reference/usingDeclarations.1(target=es2017).js b/tests/baselines/reference/usingDeclarations.1(target=es2017).js index afc9c8a3d9d92..6759e29ae4561 100644 --- a/tests/baselines/reference/usingDeclarations.1(target=es2017).js +++ b/tests/baselines/reference/usingDeclarations.1(target=es2017).js @@ -210,7 +210,7 @@ var __await = (this && this.__await) || function (v) { return this instanceof __ var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var g = generator.apply(thisArg, _arguments || []), i, q = []; - return i = {}, verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; + return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; } function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } } function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } diff --git a/tests/baselines/reference/usingDeclarations.1(target=es5).js b/tests/baselines/reference/usingDeclarations.1(target=es5).js index 96d3e7e0311e7..d9a8c2e561e93 100644 --- a/tests/baselines/reference/usingDeclarations.1(target=es5).js +++ b/tests/baselines/reference/usingDeclarations.1(target=es5).js @@ -179,8 +179,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }); }; var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); + return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; function verb(n) { return function (v) { return step([n, v]); }; } function step(op) { if (f) throw new TypeError("Generator is already executing."); @@ -261,7 +261,7 @@ var __await = (this && this.__await) || function (v) { return this instanceof __ var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var g = generator.apply(thisArg, _arguments || []), i, q = []; - return i = {}, verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; + return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; } function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } } function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } diff --git a/tests/baselines/reference/usingDeclarationsInForAwaitOf(target=es5).js b/tests/baselines/reference/usingDeclarationsInForAwaitOf(target=es5).js index 73e60e2988694..31d3c5ab036bb 100644 --- a/tests/baselines/reference/usingDeclarationsInForAwaitOf(target=es5).js +++ b/tests/baselines/reference/usingDeclarationsInForAwaitOf(target=es5).js @@ -18,8 +18,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }); }; var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); + return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; function verb(n) { return function (v) { return step([n, v]); }; } function step(op) { if (f) throw new TypeError("Generator is already executing."); diff --git a/tests/baselines/reference/yieldInForInInDownlevelGenerator.js b/tests/baselines/reference/yieldInForInInDownlevelGenerator.js index 205d535ba8569..db5011137f0fc 100644 --- a/tests/baselines/reference/yieldInForInInDownlevelGenerator.js +++ b/tests/baselines/reference/yieldInForInInDownlevelGenerator.js @@ -12,8 +12,8 @@ function* gen() { //// [yieldInForInInDownlevelGenerator.js] var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); + return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; function verb(n) { return function (v) { return step([n, v]); }; } function step(op) { if (f) throw new TypeError("Generator is already executing."); From 1f54d0a9356d92e6f2fe63d5991c50e7892f3f12 Mon Sep 17 00:00:00 2001 From: "Oleksandr T." Date: Thu, 8 Aug 2024 19:37:57 +0300 Subject: [PATCH 12/50] fix(59484): Constructor overload still present in emitted JS (#59491) --- src/compiler/factory/nodeFactory.ts | 13 +++++--- .../reference/constructorOverloads9.js | 19 ++++++++++++ .../reference/constructorOverloads9.symbols | 21 +++++++++++++ .../reference/constructorOverloads9.types | 30 +++++++++++++++++++ tests/cases/compiler/constructorOverloads9.ts | 8 +++++ 5 files changed, 87 insertions(+), 4 deletions(-) create mode 100644 tests/baselines/reference/constructorOverloads9.js create mode 100644 tests/baselines/reference/constructorOverloads9.symbols create mode 100644 tests/baselines/reference/constructorOverloads9.types create mode 100644 tests/cases/compiler/constructorOverloads9.ts diff --git a/src/compiler/factory/nodeFactory.ts b/src/compiler/factory/nodeFactory.ts index 8f3b15690f7e2..90b9071efe594 100644 --- a/src/compiler/factory/nodeFactory.ts +++ b/src/compiler/factory/nodeFactory.ts @@ -1985,10 +1985,15 @@ export function createNodeFactory(flags: NodeFactoryFlags, baseFactory: BaseNode node.parameters = createNodeArray(parameters); node.body = body; - node.transformFlags = propagateChildrenFlags(node.modifiers) | - propagateChildrenFlags(node.parameters) | - (propagateChildFlags(node.body) & ~TransformFlags.ContainsPossibleTopLevelAwait) | - TransformFlags.ContainsES2015; + if (!node.body) { + node.transformFlags = TransformFlags.ContainsTypeScript; + } + else { + node.transformFlags = propagateChildrenFlags(node.modifiers) | + propagateChildrenFlags(node.parameters) | + (propagateChildFlags(node.body) & ~TransformFlags.ContainsPossibleTopLevelAwait) | + TransformFlags.ContainsES2015; + } node.typeParameters = undefined; // initialized by parser for grammar errors node.type = undefined; // initialized by parser for grammar errors diff --git a/tests/baselines/reference/constructorOverloads9.js b/tests/baselines/reference/constructorOverloads9.js new file mode 100644 index 0000000000000..868263711d818 --- /dev/null +++ b/tests/baselines/reference/constructorOverloads9.js @@ -0,0 +1,19 @@ +//// [tests/cases/compiler/constructorOverloads9.ts] //// + +//// [constructorOverloads9.ts] +export class C { + a; + constructor(); + constructor(x = '') { + this.a = x; + } +} + + +//// [constructorOverloads9.js] +export class C { + a; + constructor(x = '') { + this.a = x; + } +} diff --git a/tests/baselines/reference/constructorOverloads9.symbols b/tests/baselines/reference/constructorOverloads9.symbols new file mode 100644 index 0000000000000..27527a8d823dd --- /dev/null +++ b/tests/baselines/reference/constructorOverloads9.symbols @@ -0,0 +1,21 @@ +//// [tests/cases/compiler/constructorOverloads9.ts] //// + +=== constructorOverloads9.ts === +export class C { +>C : Symbol(C, Decl(constructorOverloads9.ts, 0, 0)) + + a; +>a : Symbol(C.a, Decl(constructorOverloads9.ts, 0, 16)) + + constructor(); + constructor(x = '') { +>x : Symbol(x, Decl(constructorOverloads9.ts, 3, 16)) + + this.a = x; +>this.a : Symbol(C.a, Decl(constructorOverloads9.ts, 0, 16)) +>this : Symbol(C, Decl(constructorOverloads9.ts, 0, 0)) +>a : Symbol(C.a, Decl(constructorOverloads9.ts, 0, 16)) +>x : Symbol(x, Decl(constructorOverloads9.ts, 3, 16)) + } +} + diff --git a/tests/baselines/reference/constructorOverloads9.types b/tests/baselines/reference/constructorOverloads9.types new file mode 100644 index 0000000000000..0f5459e0d816a --- /dev/null +++ b/tests/baselines/reference/constructorOverloads9.types @@ -0,0 +1,30 @@ +//// [tests/cases/compiler/constructorOverloads9.ts] //// + +=== constructorOverloads9.ts === +export class C { +>C : C +> : ^ + + a; +>a : any + + constructor(); + constructor(x = '') { +>x : string +> : ^^^^^^ +>'' : "" +> : ^^ + + this.a = x; +>this.a = x : string +> : ^^^^^^ +>this.a : any +>this : this +> : ^^^^ +>a : any +> : ^^^ +>x : string +> : ^^^^^^ + } +} + diff --git a/tests/cases/compiler/constructorOverloads9.ts b/tests/cases/compiler/constructorOverloads9.ts new file mode 100644 index 0000000000000..3ac84ad8964db --- /dev/null +++ b/tests/cases/compiler/constructorOverloads9.ts @@ -0,0 +1,8 @@ +// @target: esnext +export class C { + a; + constructor(); + constructor(x = '') { + this.a = x; + } +} From 5e9e6ad2953e8097cb2e90283f656988f2ddd563 Mon Sep 17 00:00:00 2001 From: Jake Bailey <5341706+jakebailey@users.noreply.github.com> Date: Thu, 8 Aug 2024 09:38:10 -0700 Subject: [PATCH 13/50] Fix accidental relative imports from non namespace barrels (#59544) --- eslint.config.mjs | 8 ++ scripts/eslint/rules/no-direct-import.cjs | 81 +++++++++++++++++++ .../fixMissingTypeAnnotationOnExports.ts | 21 +++-- src/services/pasteEdits.ts | 16 ++-- src/services/refactors/moveToFile.ts | 10 ++- src/services/stringCompletions.ts | 3 +- 6 files changed, 113 insertions(+), 26 deletions(-) create mode 100644 scripts/eslint/rules/no-direct-import.cjs diff --git a/eslint.config.mjs b/eslint.config.mjs index 13729d3ee83be..f2566c3b631f8 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -210,12 +210,20 @@ export default tseslint.config( { name: "clearImmediate" }, { name: "performance" }, ], + "local/no-direct-import": "error", }, }, { files: ["src/harness/**", "src/testRunner/**"], rules: { "no-restricted-globals": "off", + "local/no-direct-import": "off", + }, + }, + { + files: ["src/**/_namespaces/**"], + rules: { + "local/no-direct-import": "off", }, }, { diff --git a/scripts/eslint/rules/no-direct-import.cjs b/scripts/eslint/rules/no-direct-import.cjs new file mode 100644 index 0000000000000..614e67db30be3 --- /dev/null +++ b/scripts/eslint/rules/no-direct-import.cjs @@ -0,0 +1,81 @@ +const { createRule } = require("./utils.cjs"); +const path = require("path"); + +/** @import { TSESTree } from "@typescript-eslint/utils" */ +void 0; + +module.exports = createRule({ + name: "no-direct-import", + meta: { + docs: { + description: ``, + }, + messages: { + noDirectImport: `This import relatively references another project; did you mean to import from a local _namespace module?`, + }, + schema: [], + type: "problem", + }, + defaultOptions: [], + + create(context) { + const containingFileName = context.filename; + const containingDirectory = path.dirname(containingFileName); + + /** @type {(node: TSESTree.ImportDeclaration | TSESTree.TSImportEqualsDeclaration) => void} */ + const check = node => { + let source; + if (node.type === "TSImportEqualsDeclaration") { + const moduleReference = node.moduleReference; + if ( + moduleReference.type === "TSExternalModuleReference" + && moduleReference.expression.type === "Literal" + && typeof moduleReference.expression.value === "string" + ) { + source = moduleReference.expression; + } + } + else { + source = node.source; + } + + if (!source) return; + + const p = source.value; + + // These appear in place of public API imports. + if (p.endsWith("../typescript/typescript.js")) return; + + // The below is similar to https://github.com/microsoft/DefinitelyTyped-tools/blob/main/packages/eslint-plugin/src/rules/no-bad-reference.ts + + // Any relative path that goes to the wrong place will contain "..". + if (!p.includes("..")) return; + + const parts = p.split("/"); + let cwd = containingDirectory; + for (const part of parts) { + if (part === "" || part === ".") { + continue; + } + if (part === "..") { + cwd = path.dirname(cwd); + } + else { + cwd = path.join(cwd, part); + } + + if (path.basename(cwd) === "src") { + context.report({ + messageId: "noDirectImport", + node: source, + }); + } + } + }; + + return { + ImportDeclaration: check, + TSImportEqualsDeclaration: check, + }; + }, +}); diff --git a/src/services/codefixes/fixMissingTypeAnnotationOnExports.ts b/src/services/codefixes/fixMissingTypeAnnotationOnExports.ts index db117935dea2d..deea661f2e72a 100644 --- a/src/services/codefixes/fixMissingTypeAnnotationOnExports.ts +++ b/src/services/codefixes/fixMissingTypeAnnotationOnExports.ts @@ -1,3 +1,12 @@ +import { + createCodeFixAction, + createCombinedCodeActions, + createImportAdder, + eachDiagnostic, + registerCodeFix, + typePredicateToAutoImportableTypeNode, + typeToAutoImportableTypeNode, +} from "../_namespaces/ts.codefix.js"; import { ArrayBindingPattern, ArrayLiteralExpression, @@ -97,17 +106,7 @@ import { VariableStatement, walkUpParenthesizedExpressions, } from "../_namespaces/ts.js"; - -import { - createCodeFixAction, - createCombinedCodeActions, - createImportAdder, - eachDiagnostic, - registerCodeFix, - typePredicateToAutoImportableTypeNode, - typeToAutoImportableTypeNode, -} from "../_namespaces/ts.codefix.js"; -import { getIdentifierForNode } from "../refactors/helpers.js"; +import { getIdentifierForNode } from "../_namespaces/ts.refactor.js"; const fixId = "fixMissingTypeAnnotationOnExports"; diff --git a/src/services/pasteEdits.ts b/src/services/pasteEdits.ts index f3b350816781e..e39a51bf45076 100644 --- a/src/services/pasteEdits.ts +++ b/src/services/pasteEdits.ts @@ -1,22 +1,20 @@ -import { findIndex } from "../compiler/core.js"; import { CancellationToken, - Program, - SourceFile, - Statement, - SymbolFlags, - TextRange, - UserPreferences, -} from "../compiler/types.js"; -import { codefix, Debug, fileShouldUseJavaScriptRequire, + findIndex, forEachChild, formatting, getQuotePreference, isIdentifier, + Program, + SourceFile, + Statement, + SymbolFlags, textChanges, + TextRange, + UserPreferences, } from "./_namespaces/ts.js"; import { addTargetFileImports } from "./refactors/helpers.js"; import { diff --git a/src/services/refactors/moveToFile.ts b/src/services/refactors/moveToFile.ts index da6d806a06f30..85c040013edcb 100644 --- a/src/services/refactors/moveToFile.ts +++ b/src/services/refactors/moveToFile.ts @@ -1,4 +1,3 @@ -import { getModuleSpecifier } from "../../compiler/_namespaces/ts.moduleSpecifiers.js"; import { ApplicableRefactorInfo, arrayFrom, @@ -118,6 +117,7 @@ import { ModifierLike, ModuleDeclaration, ModuleKind, + moduleSpecifiers, moduleSpecifierToValidIdentifier, NamedImportBindings, Node, @@ -157,8 +157,10 @@ import { VariableDeclarationList, VariableStatement, } from "../_namespaces/ts.js"; -import { addTargetFileImports } from "../_namespaces/ts.refactor.js"; -import { registerRefactor } from "../refactorProvider.js"; +import { + addTargetFileImports, + registerRefactor, +} from "../_namespaces/ts.refactor.js"; const refactorNameForMoveToFile = "Move to file"; const description = getLocaleSpecificMessage(Diagnostics.Move_to_file); @@ -358,7 +360,7 @@ function updateImportsInOtherFiles( if (getStringComparer(!program.useCaseSensitiveFileNames())(pathToTargetFileWithExtension, sourceFile.fileName) === Comparison.EqualTo) return; - const newModuleSpecifier = getModuleSpecifier(program.getCompilerOptions(), sourceFile, sourceFile.fileName, pathToTargetFileWithExtension, createModuleSpecifierResolutionHost(program, host)); + const newModuleSpecifier = moduleSpecifiers.getModuleSpecifier(program.getCompilerOptions(), sourceFile, sourceFile.fileName, pathToTargetFileWithExtension, createModuleSpecifierResolutionHost(program, host)); const newImportDeclaration = filterImport(importNode, makeStringLiteral(newModuleSpecifier, quotePreference), shouldMove); if (newImportDeclaration) changes.insertNodeAfter(sourceFile, statement, newImportDeclaration); diff --git a/src/services/stringCompletions.ts b/src/services/stringCompletions.ts index a26959d57f2dc..667cdf24ca8aa 100644 --- a/src/services/stringCompletions.ts +++ b/src/services/stringCompletions.ts @@ -1,4 +1,3 @@ -import { getModuleSpecifierPreferences } from "../compiler/moduleSpecifiers.js"; import { CompletionKind, createCompletionDetails, @@ -823,7 +822,7 @@ function getFilenameWithExtensionOption(name: string, program: Program, extensio return { name, extension: tryGetExtensionFromPath(name) }; } - let allowedEndings = getModuleSpecifierPreferences( + let allowedEndings = moduleSpecifiers.getModuleSpecifierPreferences( { importModuleSpecifierEnding: extensionOptions.endingPreference }, program, program.getCompilerOptions(), From aa8a2c0bb45a84d59f5837a488669561517d9b13 Mon Sep 17 00:00:00 2001 From: Jake Bailey <5341706+jakebailey@users.noreply.github.com> Date: Thu, 8 Aug 2024 10:04:34 -0700 Subject: [PATCH 14/50] Remove unused variable in ts transform (#59467) --- src/compiler/transformers/ts.ts | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/compiler/transformers/ts.ts b/src/compiler/transformers/ts.ts index d2b3e1121f406..9549d5b322f5e 100644 --- a/src/compiler/transformers/ts.ts +++ b/src/compiler/transformers/ts.ts @@ -60,7 +60,6 @@ import { getStrictOptionValue, getTextOfNode, hasDecorators, - hasStaticModifier, hasSyntacticModifier, HeritageClause, Identifier, @@ -266,7 +265,6 @@ export function transformTypeScript(context: TransformationContext) { let currentNamespaceContainerName: Identifier; let currentLexicalScope: SourceFile | Block | ModuleBlock | CaseBlock; let currentScopeFirstDeclarationsOfName: Map<__String, Node> | undefined; - let currentClassHasParameterProperties: boolean | undefined; /** * Keeps track of whether expression substitution has been enabled for specific edge cases. @@ -323,7 +321,6 @@ export function transformTypeScript(context: TransformationContext) { // Save state const savedCurrentScope = currentLexicalScope; const savedCurrentScopeFirstDeclarationsOfName = currentScopeFirstDeclarationsOfName; - const savedCurrentClassHasParameterProperties = currentClassHasParameterProperties; // Handle state changes before visiting a node. onBeforeVisitNode(node); @@ -336,7 +333,6 @@ export function transformTypeScript(context: TransformationContext) { } currentLexicalScope = savedCurrentScope; - currentClassHasParameterProperties = savedCurrentClassHasParameterProperties; return visited; } @@ -1239,10 +1235,8 @@ export function transformTypeScript(context: TransformationContext) { function visitPropertyNameOfClassElement(member: ClassElement): PropertyName { const name = member.name!; // Computed property names need to be transformed into a hoisted variable when they are used more than once. - // The names are used more than once when: - // - the property is non-static and its initializer is moved to the constructor (when there are parameter property assignments). - // - the property has a decorator. - if (isComputedPropertyName(name) && ((!hasStaticModifier(member) && currentClassHasParameterProperties) || hasDecorators(member) && legacyDecorators)) { + // The names are used more than once when the property has a decorator. + if (legacyDecorators && isComputedPropertyName(name) && hasDecorators(member)) { const expression = visitNode(name.expression, visitor, isExpression); Debug.assert(expression); const innerExpression = skipPartiallyEmittedExpressions(expression); From 5f79e16d33aff625258d5e018f6d1ba9c98b3307 Mon Sep 17 00:00:00 2001 From: Armando Aguirre Date: Thu, 8 Aug 2024 13:19:24 -0700 Subject: [PATCH 15/50] Refactored node builder flags and tests (#59440) Co-authored-by: Armando Aguirre Sepulveda --- src/compiler/checker.ts | 150 ++++++++++-------- src/compiler/transformers/declarations.ts | 16 +- src/compiler/types.ts | 33 ++-- src/harness/typeWriter.ts | 2 +- .../codefixes/fixAddMissingConstraint.ts | 2 +- src/services/codefixes/fixAddMissingMember.ts | 7 +- src/services/codefixes/fixAddMissingParam.ts | 3 +- .../fixClassIncorrectlyImplementsInterface.ts | 2 +- .../fixMissingTypeAnnotationOnExports.ts | 10 +- src/services/codefixes/helpers.ts | 26 +-- src/services/completions.ts | 2 +- src/services/refactors/extractSymbol.ts | 15 +- .../refactors/inferFunctionReturnType.ts | 5 +- src/services/utilities.ts | 3 +- 14 files changed, 156 insertions(+), 120 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 4cdd0531b1c04..3c6713a826280 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -447,6 +447,7 @@ import { InterfaceDeclaration, InterfaceType, InterfaceTypeWithDeclaredMembers, + InternalNodeBuilderFlags, InternalSymbolName, IntersectionFlags, IntersectionType, @@ -5916,6 +5917,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { function symbolToString(symbol: Symbol, enclosingDeclaration?: Node, meaning?: SymbolFlags, flags: SymbolFormatFlags = SymbolFormatFlags.AllowAnyNodeKind, writer?: EmitTextWriter): string { let nodeFlags = NodeBuilderFlags.IgnoreErrors; + let internalNodeFlags = InternalNodeBuilderFlags.None; if (flags & SymbolFormatFlags.UseOnlyExternalAliasing) { nodeFlags |= NodeBuilderFlags.UseOnlyExternalAliasing; } @@ -5926,16 +5928,16 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { nodeFlags |= NodeBuilderFlags.UseAliasDefinedOutsideCurrentScope; } if (flags & SymbolFormatFlags.DoNotIncludeSymbolChain) { - nodeFlags |= NodeBuilderFlags.DoNotIncludeSymbolChain; + internalNodeFlags |= InternalNodeBuilderFlags.DoNotIncludeSymbolChain; } if (flags & SymbolFormatFlags.WriteComputedProps) { - nodeFlags |= NodeBuilderFlags.WriteComputedProps; + internalNodeFlags |= InternalNodeBuilderFlags.WriteComputedProps; } const builder = flags & SymbolFormatFlags.AllowAnyNodeKind ? nodeBuilder.symbolToNode : nodeBuilder.symbolToEntityName; return writer ? symbolToStringWorker(writer).getText() : usingSingleLineStringWriter(symbolToStringWorker); function symbolToStringWorker(writer: EmitTextWriter) { - const entity = builder(symbol, meaning!, enclosingDeclaration, nodeFlags)!; // TODO: GH#18217 + const entity = builder(symbol, meaning!, enclosingDeclaration, nodeFlags, internalNodeFlags)!; // TODO: GH#18217 // add neverAsciiEscape for GH#39027 const printer = enclosingDeclaration?.kind === SyntaxKind.SourceFile ? createPrinterWithRemoveCommentsNeverAsciiEscape() @@ -5967,7 +5969,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { function typeToString(type: Type, enclosingDeclaration?: Node, flags: TypeFormatFlags = TypeFormatFlags.AllowUniqueESSymbolType | TypeFormatFlags.UseAliasDefinedOutsideCurrentScope, writer: EmitTextWriter = createTextWriter("")): string { const noTruncation = compilerOptions.noErrorTruncation || flags & TypeFormatFlags.NoTruncation; - const typeNode = nodeBuilder.typeToTypeNode(type, enclosingDeclaration, toNodeBuilderFlags(flags) | NodeBuilderFlags.IgnoreErrors | (noTruncation ? NodeBuilderFlags.NoTruncation : 0)); + const typeNode = nodeBuilder.typeToTypeNode(type, enclosingDeclaration, toNodeBuilderFlags(flags) | NodeBuilderFlags.IgnoreErrors | (noTruncation ? NodeBuilderFlags.NoTruncation : NodeBuilderFlags.None), /*internalFlags*/ undefined); if (typeNode === undefined) return Debug.fail("should always get typenode"); // The unresolved type gets a synthesized comment on `any` to hint to users that it's not a plain `any`. // Otherwise, we always strip comments out. @@ -6018,20 +6020,20 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { } function createNodeBuilder() { return { - typeToTypeNode: (type: Type, enclosingDeclaration?: Node, flags?: NodeBuilderFlags, tracker?: SymbolTracker) => withContext(enclosingDeclaration, flags, tracker, context => typeToTypeNodeHelper(type, context)), - typePredicateToTypePredicateNode: (typePredicate: TypePredicate, enclosingDeclaration?: Node, flags?: NodeBuilderFlags, tracker?: SymbolTracker) => withContext(enclosingDeclaration, flags, tracker, context => typePredicateToTypePredicateNodeHelper(typePredicate, context)), - expressionOrTypeToTypeNode: (expr: Expression | JsxAttributeValue | undefined, type: Type, addUndefined?: boolean, enclosingDeclaration?: Node, flags?: NodeBuilderFlags, tracker?: SymbolTracker) => withContext(enclosingDeclaration, flags, tracker, context => expressionOrTypeToTypeNode(context, expr, type, addUndefined)), - serializeTypeForDeclaration: (declaration: Declaration, type: Type, symbol: Symbol, enclosingDeclaration?: Node, flags?: NodeBuilderFlags, tracker?: SymbolTracker) => withContext(enclosingDeclaration, flags, tracker, context => serializeTypeForDeclaration(context, declaration, type, symbol)), - serializeReturnTypeForSignature: (signature: Signature, enclosingDeclaration?: Node, flags?: NodeBuilderFlags, tracker?: SymbolTracker) => withContext(enclosingDeclaration, flags, tracker, context => serializeReturnTypeForSignature(context, signature)), - indexInfoToIndexSignatureDeclaration: (indexInfo: IndexInfo, enclosingDeclaration?: Node, flags?: NodeBuilderFlags, tracker?: SymbolTracker) => withContext(enclosingDeclaration, flags, tracker, context => indexInfoToIndexSignatureDeclarationHelper(indexInfo, context, /*typeNode*/ undefined)), - signatureToSignatureDeclaration: (signature: Signature, kind: SignatureDeclaration["kind"], enclosingDeclaration?: Node, flags?: NodeBuilderFlags, tracker?: SymbolTracker) => withContext(enclosingDeclaration, flags, tracker, context => signatureToSignatureDeclarationHelper(signature, kind, context)), - symbolToEntityName: (symbol: Symbol, meaning: SymbolFlags, enclosingDeclaration?: Node, flags?: NodeBuilderFlags, tracker?: SymbolTracker) => withContext(enclosingDeclaration, flags, tracker, context => symbolToName(symbol, context, meaning, /*expectsIdentifier*/ false)), - symbolToExpression: (symbol: Symbol, meaning: SymbolFlags, enclosingDeclaration?: Node, flags?: NodeBuilderFlags, tracker?: SymbolTracker) => withContext(enclosingDeclaration, flags, tracker, context => symbolToExpression(symbol, context, meaning)), - symbolToTypeParameterDeclarations: (symbol: Symbol, enclosingDeclaration?: Node, flags?: NodeBuilderFlags, tracker?: SymbolTracker) => withContext(enclosingDeclaration, flags, tracker, context => typeParametersToTypeParameterDeclarations(symbol, context)), - symbolToParameterDeclaration: (symbol: Symbol, enclosingDeclaration?: Node, flags?: NodeBuilderFlags, tracker?: SymbolTracker) => withContext(enclosingDeclaration, flags, tracker, context => symbolToParameterDeclaration(symbol, context)), - typeParameterToDeclaration: (parameter: TypeParameter, enclosingDeclaration?: Node, flags?: NodeBuilderFlags, tracker?: SymbolTracker) => withContext(enclosingDeclaration, flags, tracker, context => typeParameterToDeclaration(parameter, context)), - symbolTableToDeclarationStatements: (symbolTable: SymbolTable, enclosingDeclaration?: Node, flags?: NodeBuilderFlags, tracker?: SymbolTracker) => withContext(enclosingDeclaration, flags, tracker, context => symbolTableToDeclarationStatements(symbolTable, context)), - symbolToNode: (symbol: Symbol, meaning: SymbolFlags, enclosingDeclaration?: Node, flags?: NodeBuilderFlags, tracker?: SymbolTracker) => withContext(enclosingDeclaration, flags, tracker, context => symbolToNode(symbol, context, meaning)), + typeToTypeNode: (type: Type, enclosingDeclaration?: Node, flags?: NodeBuilderFlags, internalFlags?: InternalNodeBuilderFlags, tracker?: SymbolTracker) => withContext(enclosingDeclaration, flags, internalFlags, tracker, context => typeToTypeNodeHelper(type, context)), + typePredicateToTypePredicateNode: (typePredicate: TypePredicate, enclosingDeclaration?: Node, flags?: NodeBuilderFlags, internalFlags?: InternalNodeBuilderFlags, tracker?: SymbolTracker) => withContext(enclosingDeclaration, flags, internalFlags, tracker, context => typePredicateToTypePredicateNodeHelper(typePredicate, context)), + expressionOrTypeToTypeNode: (expr: Expression | JsxAttributeValue | undefined, type: Type, addUndefined?: boolean, enclosingDeclaration?: Node, flags?: NodeBuilderFlags, internalFlags?: InternalNodeBuilderFlags, tracker?: SymbolTracker) => withContext(enclosingDeclaration, flags, internalFlags, tracker, context => expressionOrTypeToTypeNode(context, expr, type, addUndefined)), + serializeTypeForDeclaration: (declaration: Declaration, type: Type, symbol: Symbol, enclosingDeclaration?: Node, flags?: NodeBuilderFlags, internalFlags?: InternalNodeBuilderFlags, tracker?: SymbolTracker) => withContext(enclosingDeclaration, flags, internalFlags, tracker, context => serializeTypeForDeclaration(context, declaration, type, symbol)), + serializeReturnTypeForSignature: (signature: Signature, enclosingDeclaration?: Node, flags?: NodeBuilderFlags, internalFlags?: InternalNodeBuilderFlags, tracker?: SymbolTracker) => withContext(enclosingDeclaration, flags, internalFlags, tracker, context => serializeReturnTypeForSignature(context, signature)), + indexInfoToIndexSignatureDeclaration: (indexInfo: IndexInfo, enclosingDeclaration?: Node, flags?: NodeBuilderFlags, internalFlags?: InternalNodeBuilderFlags, tracker?: SymbolTracker) => withContext(enclosingDeclaration, flags, internalFlags, tracker, context => indexInfoToIndexSignatureDeclarationHelper(indexInfo, context, /*typeNode*/ undefined)), + signatureToSignatureDeclaration: (signature: Signature, kind: SignatureDeclaration["kind"], enclosingDeclaration?: Node, flags?: NodeBuilderFlags, internalFlags?: InternalNodeBuilderFlags, tracker?: SymbolTracker) => withContext(enclosingDeclaration, flags, internalFlags, tracker, context => signatureToSignatureDeclarationHelper(signature, kind, context)), + symbolToEntityName: (symbol: Symbol, meaning: SymbolFlags, enclosingDeclaration?: Node, flags?: NodeBuilderFlags, internalFlags?: InternalNodeBuilderFlags, tracker?: SymbolTracker) => withContext(enclosingDeclaration, flags, internalFlags, tracker, context => symbolToName(symbol, context, meaning, /*expectsIdentifier*/ false)), + symbolToExpression: (symbol: Symbol, meaning: SymbolFlags, enclosingDeclaration?: Node, flags?: NodeBuilderFlags, internalFlags?: InternalNodeBuilderFlags, tracker?: SymbolTracker) => withContext(enclosingDeclaration, flags, internalFlags, tracker, context => symbolToExpression(symbol, context, meaning)), + symbolToTypeParameterDeclarations: (symbol: Symbol, enclosingDeclaration?: Node, flags?: NodeBuilderFlags, internalFlags?: InternalNodeBuilderFlags, tracker?: SymbolTracker) => withContext(enclosingDeclaration, flags, internalFlags, tracker, context => typeParametersToTypeParameterDeclarations(symbol, context)), + symbolToParameterDeclaration: (symbol: Symbol, enclosingDeclaration?: Node, flags?: NodeBuilderFlags, internalFlags?: InternalNodeBuilderFlags, tracker?: SymbolTracker) => withContext(enclosingDeclaration, flags, internalFlags, tracker, context => symbolToParameterDeclaration(symbol, context)), + typeParameterToDeclaration: (parameter: TypeParameter, enclosingDeclaration?: Node, flags?: NodeBuilderFlags, internalFlags?: InternalNodeBuilderFlags, tracker?: SymbolTracker) => withContext(enclosingDeclaration, flags, internalFlags, tracker, context => typeParameterToDeclaration(parameter, context)), + symbolTableToDeclarationStatements: (symbolTable: SymbolTable, enclosingDeclaration?: Node, flags?: NodeBuilderFlags, internalFlags?: InternalNodeBuilderFlags, tracker?: SymbolTracker) => withContext(enclosingDeclaration, flags, internalFlags, tracker, context => symbolTableToDeclarationStatements(symbolTable, context)), + symbolToNode: (symbol: Symbol, meaning: SymbolFlags, enclosingDeclaration?: Node, flags?: NodeBuilderFlags, internalFlags?: InternalNodeBuilderFlags, tracker?: SymbolTracker) => withContext(enclosingDeclaration, flags, internalFlags, tracker, context => symbolToNode(symbol, context, meaning)), }; function getTypeFromTypeNode(context: NodeBuilderContext, node: TypeNode, noMappedTypes?: false): Type; @@ -6071,13 +6073,13 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { * Same as expressionOrTypeToTypeNodeHelper, but also checks if the expression can be syntactically typed. */ function expressionOrTypeToTypeNode(context: NodeBuilderContext, expr: Expression | JsxAttributeValue | undefined, type: Type, addUndefined?: boolean) { - const oldFlags = context.flags; - if (expr && !(context.flags & NodeBuilderFlags.NoSyntacticPrinter)) { + const restoreFlags = saveRestoreFlags(context); + if (expr && !(context.internalFlags & InternalNodeBuilderFlags.NoSyntacticPrinter)) { syntacticNodeBuilder.serializeTypeOfExpression(expr, context, addUndefined); } - context.flags |= NodeBuilderFlags.NoSyntacticPrinter; + context.internalFlags |= InternalNodeBuilderFlags.NoSyntacticPrinter; const result = expressionOrTypeToTypeNodeHelper(context, expr, type, addUndefined); - context.flags = oldFlags; + restoreFlags(); return result; } function expressionOrTypeToTypeNodeHelper(context: NodeBuilderContext, expr: Expression | JsxAttributeValue | undefined, type: Type, addUndefined?: boolean) { @@ -6145,7 +6147,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { } function symbolToNode(symbol: Symbol, context: NodeBuilderContext, meaning: SymbolFlags) { - if (context.flags & NodeBuilderFlags.WriteComputedProps) { + if (context.internalFlags & InternalNodeBuilderFlags.WriteComputedProps) { if (symbol.valueDeclaration) { const name = getNameOfDeclaration(symbol.valueDeclaration); if (name && isComputedPropertyName(name)) return name; @@ -6159,14 +6161,15 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { return symbolToExpression(symbol, context, meaning); } - function withContext(enclosingDeclaration: Node | undefined, flags: NodeBuilderFlags | undefined, tracker: SymbolTracker | undefined, cb: (context: NodeBuilderContext) => T): T | undefined { + function withContext(enclosingDeclaration: Node | undefined, flags: NodeBuilderFlags | undefined, internalFlags: InternalNodeBuilderFlags | undefined, tracker: SymbolTracker | undefined, cb: (context: NodeBuilderContext) => T): T | undefined { const moduleResolverHost = tracker?.trackSymbol ? tracker.moduleResolverHost : - flags! & NodeBuilderFlags.DoNotIncludeSymbolChain ? createBasicNodeBuilderModuleSpecifierResolutionHost(host) : + (internalFlags || InternalNodeBuilderFlags.None) & InternalNodeBuilderFlags.DoNotIncludeSymbolChain ? createBasicNodeBuilderModuleSpecifierResolutionHost(host) : undefined; const context: NodeBuilderContext = { enclosingDeclaration, enclosingFile: enclosingDeclaration && getSourceFileOfNode(enclosingDeclaration), flags: flags || NodeBuilderFlags.None, + internalFlags: internalFlags || InternalNodeBuilderFlags.None, tracker: undefined!, encounteredError: false, reportedDiagnostic: false, @@ -6197,15 +6200,27 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { return context.encounteredError ? undefined : resultingNode; } + function saveRestoreFlags(context: NodeBuilderContext) { + const flags = context.flags; + const internalFlags = context.internalFlags; + + return restore; + + function restore() { + context.flags = flags; + context.internalFlags = internalFlags; + } + } + function checkTruncationLength(context: NodeBuilderContext): boolean { if (context.truncating) return context.truncating; return context.truncating = context.approximateLength > ((context.flags & NodeBuilderFlags.NoTruncation) ? noTruncationMaximumTruncationLength : defaultMaximumTruncationLength); } function typeToTypeNodeHelper(type: Type, context: NodeBuilderContext): TypeNode { - const savedFlags = context.flags; + const restoreFlags = saveRestoreFlags(context); const typeNode = typeToTypeNodeWorker(type, context); - context.flags = savedFlags; + restoreFlags(); return typeNode; } @@ -6682,7 +6697,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { } const links = context.enclosingDeclaration && getNodeLinks(context.enclosingDeclaration); - const key = `${getTypeId(type)}|${context.flags}`; + const key = `${getTypeId(type)}|${context.flags}|${context.internalFlags}`; if (links) { links.serializedTypes ||= new Map(); } @@ -6803,10 +6818,10 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { return typeToTypeNodeHelper(getIntersectionType(types), context); } - const savedFlags = context.flags; + const restoreFlags = saveRestoreFlags(context); context.flags |= NodeBuilderFlags.InObjectTypeLiteral; const members = createTypeNodesFromResolvedType(resolved); - context.flags = savedFlags; + restoreFlags(); const typeLiteralNode = factory.createTypeLiteralNode(members); context.approximateLength += 2; setEmitFlags(typeLiteralNode, (context.flags & NodeBuilderFlags.MultilineObjectLiterals) ? 0 : EmitFlags.SingleLine); @@ -6887,10 +6902,10 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { // the default outer type arguments), we don't show the group. if (!rangeEquals(outerTypeParameters, typeArguments, start, i)) { const typeArgumentSlice = mapToTypeNodes(typeArguments.slice(start, i), context); - const flags = context.flags; + const restoreFlags = saveRestoreFlags(context); context.flags |= NodeBuilderFlags.ForbidIndexedAccessSymbolReferences; const ref = symbolToTypeNode(parent, context, SymbolFlags.Type, typeArgumentSlice) as TypeReferenceNode | ImportTypeNode; - context.flags = flags; + restoreFlags(); resultType = !resultType ? ref : appendReferenceToType(resultType, ref as TypeReferenceNode); } } @@ -6930,10 +6945,10 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { typeArgumentNodes = mapToTypeNodes(typeArguments.slice(i, typeParameterCount), context); } - const flags = context.flags; + const restoreFlags = saveRestoreFlags(context); context.flags |= NodeBuilderFlags.ForbidIndexedAccessSymbolReferences; const finalRef = symbolToTypeNode(type.symbol, context, SymbolFlags.Type, typeArgumentNodes); - context.flags = flags; + restoreFlags(); return !resultType ? finalRef : appendReferenceToType(resultType, finalRef as TypeReferenceNode); } } @@ -7260,7 +7275,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { // once while referring to different types. If so, regenerate the // type node for each entry by that name with the // `UseFullyQualifiedType` flag enabled. - const saveContextFlags = context.flags; + const restoreFlags = saveRestoreFlags(context); context.flags |= NodeBuilderFlags.UseFullyQualifiedType; seenNames.forEach(types => { if (!arrayIsHomogeneous(types, ([a], [b]) => typesAreSameReference(a, b))) { @@ -7269,7 +7284,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { } } }); - context.flags = saveContextFlags; + restoreFlags(); } return result; @@ -7329,7 +7344,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { typeParameters = signature.typeParameters && signature.typeParameters.map(parameter => typeParameterToDeclaration(parameter, context)); } - const flags = context.flags; + const restoreFlags = saveRestoreFlags(context); context.flags &= ~NodeBuilderFlags.SuppressAnyReturnType; // SuppressAnyReturnType should only apply to the signature `return` position // If the expanded parameter list had a variadic in a non-trailing position, don't expand it const parameters = (some(expandedParams, p => p !== expandedParams[expandedParams.length - 1] && !!(getCheckFlags(p) & CheckFlags.RestParameter)) ? signature.parameters : expandedParams).map(parameter => symbolToParameterDeclaration(parameter, context, kind === SyntaxKind.Constructor)); @@ -7337,7 +7352,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { if (thisParameter) { parameters.unshift(thisParameter); } - context.flags = flags; + restoreFlags(); const returnTypeNode = serializeReturnTypeForSignature(context, signature); @@ -7576,13 +7591,13 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { } function typeParameterToDeclarationWithConstraint(type: TypeParameter, context: NodeBuilderContext, constraintNode: TypeNode | undefined): TypeParameterDeclaration { - const savedContextFlags = context.flags; + const restoreFlags = saveRestoreFlags(context); context.flags &= ~NodeBuilderFlags.WriteTypeParametersInQualifiedName; // Avoids potential infinite loop when building for a claimspace with a generic const modifiers = factory.createModifiersFromModifierFlags(getTypeParameterModifiers(type)); const name = typeParameterToName(type, context); const defaultParameter = getDefaultFromTypeParameter(type); const defaultParameterNode = defaultParameter && typeToTypeNodeHelper(defaultParameter, context); - context.flags = savedContextFlags; + restoreFlags(); return factory.createTypeParameterDeclaration(modifiers, name, constraintNode, defaultParameterNode); } @@ -7691,7 +7706,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { // Try to get qualified name if the symbol is not a type parameter and there is an enclosing declaration. let chain: Symbol[]; const isTypeParameter = symbol.flags & SymbolFlags.TypeParameter; - if (!isTypeParameter && (context.enclosingDeclaration || context.flags & NodeBuilderFlags.UseFullyQualifiedType) && !(context.flags & NodeBuilderFlags.DoNotIncludeSymbolChain)) { + if (!isTypeParameter && (context.enclosingDeclaration || context.flags & NodeBuilderFlags.UseFullyQualifiedType) && !(context.internalFlags & InternalNodeBuilderFlags.DoNotIncludeSymbolChain)) { chain = Debug.checkDefined(getSymbolChain(symbol, meaning, /*endOfChain*/ true)); Debug.assert(chain && chain.length > 0); } @@ -8303,12 +8318,12 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { function serializeTypeForDeclaration(context: NodeBuilderContext, declaration: Declaration | undefined, type: Type, symbol: Symbol) { const addUndefinedForParameter = declaration && (isParameter(declaration) || isJSDocParameterTag(declaration)) && requiresAddingImplicitUndefined(declaration); const enclosingDeclaration = context.enclosingDeclaration; - const oldFlags = context.flags; - if (declaration && hasInferredType(declaration) && !(context.flags & NodeBuilderFlags.NoSyntacticPrinter)) { + const restoreFlags = saveRestoreFlags(context); + if (declaration && hasInferredType(declaration) && !(context.internalFlags & InternalNodeBuilderFlags.NoSyntacticPrinter)) { syntacticNodeBuilder.serializeTypeOfDeclaration(declaration, context); } - context.flags |= NodeBuilderFlags.NoSyntacticPrinter; - if (enclosingDeclaration && (!isErrorType(type) || (context.flags & NodeBuilderFlags.AllowUnresolvedNames))) { + context.internalFlags |= InternalNodeBuilderFlags.NoSyntacticPrinter; + if (enclosingDeclaration && (!isErrorType(type) || (context.internalFlags & InternalNodeBuilderFlags.AllowUnresolvedNames))) { const declWithExistingAnnotation = declaration && getNonlocalEffectiveTypeAnnotationNode(declaration) ? declaration : getDeclarationWithTypeAnnotation(symbol); @@ -8319,7 +8334,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { const addUndefined = addUndefinedForParameter || !!(symbol.flags & SymbolFlags.Property && symbol.flags & SymbolFlags.Optional && isOptionalDeclaration(declWithExistingAnnotation) && (symbol as MappedSymbol).links?.mappedType && containsNonMissingUndefinedType(type)); const result = !isTypePredicateNode(existing) && tryReuseExistingTypeNode(context, existing, type, declWithExistingAnnotation, addUndefined); if (result) { - context.flags = oldFlags; + restoreFlags(); return result; } } @@ -8335,7 +8350,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { const expr = decl && isDeclarationWithPossibleInnerTypeNodeReuse(decl) ? getPossibleTypeNodeReuseExpression(decl) : undefined; const result = expressionOrTypeToTypeNode(context, expr, type, addUndefinedForParameter); - context.flags = oldFlags; + restoreFlags(); return result; } @@ -8351,28 +8366,28 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { function serializeReturnTypeForSignature(context: NodeBuilderContext, signature: Signature) { const suppressAny = context.flags & NodeBuilderFlags.SuppressAnyReturnType; - const flags = context.flags; + const restoreFlags = saveRestoreFlags(context); if (suppressAny) context.flags &= ~NodeBuilderFlags.SuppressAnyReturnType; // suppress only toplevel `any`s let returnTypeNode: TypeNode | undefined; const returnType = getReturnTypeOfSignature(signature); if (returnType && !(suppressAny && isTypeAny(returnType))) { - if (signature.declaration && !(context.flags & NodeBuilderFlags.NoSyntacticPrinter)) { + if (signature.declaration && !(context.internalFlags & InternalNodeBuilderFlags.NoSyntacticPrinter)) { syntacticNodeBuilder.serializeReturnTypeForSignature(signature.declaration, context); } - context.flags |= NodeBuilderFlags.NoSyntacticPrinter; + context.internalFlags |= InternalNodeBuilderFlags.NoSyntacticPrinter; returnTypeNode = serializeReturnTypeForSignatureWorker(context, signature); } else if (!suppressAny) { returnTypeNode = factory.createKeywordTypeNode(SyntaxKind.AnyKeyword); } - context.flags = flags; + restoreFlags(); return returnTypeNode; } function serializeReturnTypeForSignatureWorker(context: NodeBuilderContext, signature: Signature) { const typePredicate = getTypePredicateOfSignature(signature); const type = getReturnTypeOfSignature(signature); - if (context.enclosingDeclaration && (!isErrorType(type) || (context.flags & NodeBuilderFlags.AllowUnresolvedNames)) && signature.declaration && !nodeIsSynthesized(signature.declaration)) { + if (context.enclosingDeclaration && (!isErrorType(type) || (context.internalFlags & InternalNodeBuilderFlags.AllowUnresolvedNames)) && signature.declaration && !nodeIsSynthesized(signature.declaration)) { const annotation = getNonlocalEffectiveReturnTypeAnnotationNode(signature.declaration); if (annotation) { const result = tryReuseExistingTypeNode(context, annotation, type, context.enclosingDeclaration); @@ -8891,7 +8906,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { if (!hasDynamicName(node)) { return visitEachChild(node, visitExistingNodeTreeSymbols); } - if (!(context.flags & NodeBuilderFlags.AllowUnresolvedNames && isEntityNameExpression(node.name.expression) && checkComputedPropertyName(node.name).flags & TypeFlags.Any)) { + if (!(context.internalFlags & InternalNodeBuilderFlags.AllowUnresolvedNames && isEntityNameExpression(node.name.expression) && checkComputedPropertyName(node.name).flags & TypeFlags.Any)) { return undefined; } } @@ -9623,7 +9638,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { const typeParamDecls = map(typeParams, p => typeParameterToDeclaration(p, context)); const jsdocAliasDecl = symbol.declarations?.find(isJSDocTypeAlias); const commentText = getTextOfJSDocComment(jsdocAliasDecl ? jsdocAliasDecl.comment || jsdocAliasDecl.parent.comment : undefined); - const oldFlags = context.flags; + const restoreFlags = saveRestoreFlags(context); context.flags |= NodeBuilderFlags.InTypeAlias; const oldEnclosingDecl = context.enclosingDeclaration; context.enclosingDeclaration = jsdocAliasDecl; @@ -9638,7 +9653,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { ), modifierFlags, ); - context.flags = oldFlags; + restoreFlags(); context.enclosingDeclaration = oldEnclosingDecl; } @@ -10651,10 +10666,10 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { function getNameCandidateWorker(symbol: Symbol, localName: string) { if (localName === InternalSymbolName.Default || localName === InternalSymbolName.Class || localName === InternalSymbolName.Function) { - const flags = context.flags; + const restoreFlags = saveRestoreFlags(context); context.flags |= NodeBuilderFlags.InInitialEntityName; const nameCandidate = getNameOfSymbolAsWritten(symbol, context); - context.flags = flags; + restoreFlags(); localName = nameCandidate.length > 0 && isSingleOrDoubleQuote(nameCandidate.charCodeAt(0)) ? stripQuotes(nameCandidate) : nameCandidate; } if (localName === InternalSymbolName.Default) { @@ -49879,7 +49894,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { } } - function createTypeOfDeclaration(declarationIn: AccessorDeclaration | VariableLikeDeclaration | PropertyAccessExpression, enclosingDeclaration: Node, flags: NodeBuilderFlags, tracker: SymbolTracker) { + function createTypeOfDeclaration(declarationIn: AccessorDeclaration | VariableLikeDeclaration | PropertyAccessExpression, enclosingDeclaration: Node, flags: NodeBuilderFlags, internalFlags: InternalNodeBuilderFlags, tracker: SymbolTracker) { const declaration = getParseTreeNode(declarationIn, isVariableLikeOrAccessor); if (!declaration) { return factory.createToken(SyntaxKind.AnyKeyword) as KeywordTypeNode; @@ -49890,7 +49905,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { ? getWidenedLiteralType(getTypeOfSymbol(symbol)) : errorType; - return nodeBuilder.serializeTypeForDeclaration(declaration, type, symbol, enclosingDeclaration, flags | NodeBuilderFlags.MultilineObjectLiterals, tracker); + return nodeBuilder.serializeTypeForDeclaration(declaration, type, symbol, enclosingDeclaration, flags | NodeBuilderFlags.MultilineObjectLiterals, internalFlags, tracker); } type DeclarationWithPotentialInnerNodeReuse = @@ -49956,21 +49971,21 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { return candidateExpr; } - function createReturnTypeOfSignatureDeclaration(signatureDeclarationIn: SignatureDeclaration, enclosingDeclaration: Node, flags: NodeBuilderFlags, tracker: SymbolTracker) { + function createReturnTypeOfSignatureDeclaration(signatureDeclarationIn: SignatureDeclaration, enclosingDeclaration: Node, flags: NodeBuilderFlags, internalFlags: InternalNodeBuilderFlags, tracker: SymbolTracker) { const signatureDeclaration = getParseTreeNode(signatureDeclarationIn, isFunctionLike); if (!signatureDeclaration) { return factory.createToken(SyntaxKind.AnyKeyword) as KeywordTypeNode; } - return nodeBuilder.serializeReturnTypeForSignature(getSignatureFromDeclaration(signatureDeclaration), enclosingDeclaration, flags | NodeBuilderFlags.MultilineObjectLiterals, tracker); + return nodeBuilder.serializeReturnTypeForSignature(getSignatureFromDeclaration(signatureDeclaration), enclosingDeclaration, flags | NodeBuilderFlags.MultilineObjectLiterals, internalFlags, tracker); } - function createTypeOfExpression(exprIn: Expression, enclosingDeclaration: Node, flags: NodeBuilderFlags, tracker: SymbolTracker) { + function createTypeOfExpression(exprIn: Expression, enclosingDeclaration: Node, flags: NodeBuilderFlags, internalFlags: InternalNodeBuilderFlags, tracker: SymbolTracker) { const expr = getParseTreeNode(exprIn, isExpression); if (!expr) { return factory.createToken(SyntaxKind.AnyKeyword) as KeywordTypeNode; } const type = getWidenedType(getRegularTypeOfExpression(expr)); - return nodeBuilder.expressionOrTypeToTypeNode(expr, type, /*addUndefined*/ undefined, enclosingDeclaration, flags | NodeBuilderFlags.MultilineObjectLiterals, tracker); + return nodeBuilder.expressionOrTypeToTypeNode(expr, type, /*addUndefined*/ undefined, enclosingDeclaration, flags | NodeBuilderFlags.MultilineObjectLiterals, internalFlags, tracker); } function hasGlobalName(name: string): boolean { @@ -50078,7 +50093,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { } function literalTypeToNode(type: FreshableType, enclosing: Node, tracker: SymbolTracker): Expression { - const enumResult = type.flags & TypeFlags.EnumLike ? nodeBuilder.symbolToExpression(type.symbol, SymbolFlags.Value, enclosing, /*flags*/ undefined, tracker) + const enumResult = type.flags & TypeFlags.EnumLike ? nodeBuilder.symbolToExpression(type.symbol, SymbolFlags.Value, enclosing, /*flags*/ undefined, /*internalFlags*/ undefined, tracker) : type === trueType ? factory.createTrue() : type === falseType && factory.createFalse(); if (enumResult) return enumResult; const literalValue = (type as LiteralType).value; @@ -50218,15 +50233,15 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { const parseDecl = getParseTreeNode(decl); return !!parseNode && !!parseDecl && (isVariableDeclaration(parseDecl) || isBindingElement(parseDecl)) && isBindingCapturedByNode(parseNode, parseDecl); }, - getDeclarationStatementsForSourceFile: (node, flags, tracker) => { + getDeclarationStatementsForSourceFile: (node, flags, internalFlags, tracker) => { const n = getParseTreeNode(node) as SourceFile; Debug.assert(n && n.kind === SyntaxKind.SourceFile, "Non-sourcefile node passed into getDeclarationsForSourceFile"); const sym = getSymbolOfDeclaration(node); if (!sym) { - return !node.locals ? [] : nodeBuilder.symbolTableToDeclarationStatements(node.locals, node, flags, tracker); + return !node.locals ? [] : nodeBuilder.symbolTableToDeclarationStatements(node.locals, node, flags, internalFlags, tracker); } resolveExternalModuleSymbol(sym); // ensures cjs export assignment is setup - return !sym.exports ? [] : nodeBuilder.symbolTableToDeclarationStatements(sym.exports, node, flags, tracker); + return !sym.exports ? [] : nodeBuilder.symbolTableToDeclarationStatements(sym.exports, node, flags, internalFlags, tracker); }, isImportRequiredByAugmentation, isDefinitelyReferenceToGlobalSymbolObject, @@ -52553,6 +52568,7 @@ interface NodeBuilderContext { */ enclosingFile: SourceFile | undefined; flags: NodeBuilderFlags; + internalFlags: InternalNodeBuilderFlags; tracker: SymbolTrackerImpl; // State diff --git a/src/compiler/transformers/declarations.ts b/src/compiler/transformers/declarations.ts index 166431a745069..536e0cf5d9c22 100644 --- a/src/compiler/transformers/declarations.ts +++ b/src/compiler/transformers/declarations.ts @@ -87,6 +87,7 @@ import { ImportTypeNode, IndexSignatureDeclaration, InterfaceDeclaration, + InternalNodeBuilderFlags, isAmbientModule, isArray, isArrayBindingElement, @@ -239,10 +240,11 @@ const declarationEmitNodeBuilderFlags = NodeBuilderFlags.MultilineObjectLiterals NodeBuilderFlags.UseTypeOfFunction | NodeBuilderFlags.UseStructuralFallback | NodeBuilderFlags.AllowEmptyTuple | - NodeBuilderFlags.AllowUnresolvedNames | NodeBuilderFlags.GenerateNamesForShadowedTypeParams | NodeBuilderFlags.NoTruncation; +const declarationEmitInternalNodeBuilderFlags = InternalNodeBuilderFlags.AllowUnresolvedNames; + /** * Transforms a ts file into a .d.ts file * This process requires type information, which is retrieved through the emit resolver. Because of this, @@ -429,7 +431,7 @@ export function transformDeclarations(context: TransformationContext) { : Diagnostics.Declaration_emit_for_this_file_requires_using_private_name_0_An_explicit_type_annotation_may_unblock_declaration_emit, errorNode: s.errorNode || sourceFile, })); - const result = resolver.getDeclarationStatementsForSourceFile(sourceFile, declarationEmitNodeBuilderFlags, symbolTracker); + const result = resolver.getDeclarationStatementsForSourceFile(sourceFile, declarationEmitNodeBuilderFlags, declarationEmitInternalNodeBuilderFlags, symbolTracker); getSymbolAccessibilityDiagnostic = oldDiag; return result; } @@ -696,7 +698,7 @@ export function transformDeclarations(context: TransformationContext) { case SyntaxKind.PropertyDeclaration: case SyntaxKind.BindingElement: case SyntaxKind.VariableDeclaration: - typeNode = resolver.createTypeOfDeclaration(node, enclosingDeclaration, declarationEmitNodeBuilderFlags, symbolTracker); + typeNode = resolver.createTypeOfDeclaration(node, enclosingDeclaration, declarationEmitNodeBuilderFlags, declarationEmitInternalNodeBuilderFlags, symbolTracker); break; case SyntaxKind.FunctionDeclaration: case SyntaxKind.ConstructSignature: @@ -704,7 +706,7 @@ export function transformDeclarations(context: TransformationContext) { case SyntaxKind.MethodDeclaration: case SyntaxKind.GetAccessor: case SyntaxKind.CallSignature: - typeNode = resolver.createReturnTypeOfSignatureDeclaration(node, enclosingDeclaration, declarationEmitNodeBuilderFlags, symbolTracker); + typeNode = resolver.createReturnTypeOfSignatureDeclaration(node, enclosingDeclaration, declarationEmitNodeBuilderFlags, declarationEmitInternalNodeBuilderFlags, symbolTracker); break; default: Debug.assertNever(node); @@ -1329,7 +1331,7 @@ export function transformDeclarations(context: TransformationContext) { errorNode: input, }); errorFallbackNode = input; - const varDecl = factory.createVariableDeclaration(newId, /*exclamationToken*/ undefined, resolver.createTypeOfExpression(input.expression, input, declarationEmitNodeBuilderFlags, symbolTracker), /*initializer*/ undefined); + const varDecl = factory.createVariableDeclaration(newId, /*exclamationToken*/ undefined, resolver.createTypeOfExpression(input.expression, input, declarationEmitNodeBuilderFlags, declarationEmitInternalNodeBuilderFlags, symbolTracker), /*initializer*/ undefined); errorFallbackNode = undefined; const statement = factory.createVariableStatement(needsDeclare ? [factory.createModifier(SyntaxKind.DeclareKeyword)] : [], factory.createVariableDeclarationList([varDecl], NodeFlags.Const)); @@ -1471,7 +1473,7 @@ export function transformDeclarations(context: TransformationContext) { return undefined; // unique symbol or non-identifier name - omit, since there's no syntax that can preserve it } getSymbolAccessibilityDiagnostic = createGetSymbolAccessibilityDiagnosticForNode(p.valueDeclaration); - const type = resolver.createTypeOfDeclaration(p.valueDeclaration, fakespace, declarationEmitNodeBuilderFlags | NodeBuilderFlags.NoSyntacticPrinter, symbolTracker); + const type = resolver.createTypeOfDeclaration(p.valueDeclaration, fakespace, declarationEmitNodeBuilderFlags, declarationEmitInternalNodeBuilderFlags | InternalNodeBuilderFlags.NoSyntacticPrinter, symbolTracker); getSymbolAccessibilityDiagnostic = oldDiag; const isNonContextualKeywordName = isStringANonContextualKeyword(nameStr); const name = isNonContextualKeywordName ? factory.getGeneratedNameForNode(p.valueDeclaration) : factory.createIdentifier(nameStr); @@ -1666,7 +1668,7 @@ export function transformDeclarations(context: TransformationContext) { errorNode: extendsClause, typeName: input.name, }); - const varDecl = factory.createVariableDeclaration(newId, /*exclamationToken*/ undefined, resolver.createTypeOfExpression(extendsClause.expression, input, declarationEmitNodeBuilderFlags, symbolTracker), /*initializer*/ undefined); + const varDecl = factory.createVariableDeclaration(newId, /*exclamationToken*/ undefined, resolver.createTypeOfExpression(extendsClause.expression, input, declarationEmitNodeBuilderFlags, declarationEmitInternalNodeBuilderFlags, symbolTracker), /*initializer*/ undefined); const statement = factory.createVariableStatement(needsDeclare ? [factory.createModifier(SyntaxKind.DeclareKeyword)] : [], factory.createVariableDeclarationList([varDecl], NodeFlags.Const)); const heritageClauses = factory.createNodeArray(map(input.heritageClauses, clause => { if (clause.token === SyntaxKind.ExtendsKeyword) { diff --git a/src/compiler/types.ts b/src/compiler/types.ts index 9b0ab54b0aa0e..3f5306cec0383 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -5073,14 +5073,14 @@ export interface TypeChecker { // TODO: GH#18217 `xToDeclaration` calls are frequently asserted as defined. /** Note that the resulting nodes cannot be checked. */ typeToTypeNode(type: Type, enclosingDeclaration: Node | undefined, flags: NodeBuilderFlags | undefined): TypeNode | undefined; - /** @internal */ typeToTypeNode(type: Type, enclosingDeclaration: Node | undefined, flags: NodeBuilderFlags | undefined, tracker?: SymbolTracker): TypeNode | undefined; // eslint-disable-line @typescript-eslint/unified-signatures - /** @internal */ typePredicateToTypePredicateNode(typePredicate: TypePredicate, enclosingDeclaration: Node | undefined, flags: NodeBuilderFlags | undefined, tracker?: SymbolTracker): TypePredicateNode | undefined; + /** @internal */ typeToTypeNode(type: Type, enclosingDeclaration: Node | undefined, flags: NodeBuilderFlags | undefined, internalFlags?: InternalNodeBuilderFlags | undefined, tracker?: SymbolTracker): TypeNode | undefined; // eslint-disable-line @typescript-eslint/unified-signatures + /** @internal */ typePredicateToTypePredicateNode(typePredicate: TypePredicate, enclosingDeclaration: Node | undefined, flags: NodeBuilderFlags | undefined, internalFlags?: InternalNodeBuilderFlags | undefined, tracker?: SymbolTracker): TypePredicateNode | undefined; /** Note that the resulting nodes cannot be checked. */ signatureToSignatureDeclaration(signature: Signature, kind: SyntaxKind, enclosingDeclaration: Node | undefined, flags: NodeBuilderFlags | undefined): SignatureDeclaration & { typeArguments?: NodeArray; } | undefined; - /** @internal */ signatureToSignatureDeclaration(signature: Signature, kind: SyntaxKind, enclosingDeclaration: Node | undefined, flags: NodeBuilderFlags | undefined, tracker?: SymbolTracker): SignatureDeclaration & { typeArguments?: NodeArray; } | undefined; // eslint-disable-line @typescript-eslint/unified-signatures + /** @internal */ signatureToSignatureDeclaration(signature: Signature, kind: SyntaxKind, enclosingDeclaration: Node | undefined, flags: NodeBuilderFlags | undefined, internalFlags?: InternalNodeBuilderFlags | undefined, tracker?: SymbolTracker): SignatureDeclaration & { typeArguments?: NodeArray; } | undefined; // eslint-disable-line @typescript-eslint/unified-signatures /** Note that the resulting nodes cannot be checked. */ indexInfoToIndexSignatureDeclaration(indexInfo: IndexInfo, enclosingDeclaration: Node | undefined, flags: NodeBuilderFlags | undefined): IndexSignatureDeclaration | undefined; - /** @internal */ indexInfoToIndexSignatureDeclaration(indexInfo: IndexInfo, enclosingDeclaration: Node | undefined, flags: NodeBuilderFlags | undefined, tracker?: SymbolTracker): IndexSignatureDeclaration | undefined; // eslint-disable-line @typescript-eslint/unified-signatures + /** @internal */ indexInfoToIndexSignatureDeclaration(indexInfo: IndexInfo, enclosingDeclaration: Node | undefined, flags: NodeBuilderFlags | undefined, internalFlags?: InternalNodeBuilderFlags | undefined, tracker?: SymbolTracker): IndexSignatureDeclaration | undefined; // eslint-disable-line @typescript-eslint/unified-signatures /** Note that the resulting nodes cannot be checked. */ symbolToEntityName(symbol: Symbol, meaning: SymbolFlags, enclosingDeclaration: Node | undefined, flags: NodeBuilderFlags | undefined): EntityName | undefined; /** Note that the resulting nodes cannot be checked. */ @@ -5090,7 +5090,7 @@ export interface TypeChecker { * * @internal */ - symbolToNode(symbol: Symbol, meaning: SymbolFlags, enclosingDeclaration: Node | undefined, flags: NodeBuilderFlags | undefined): Node | undefined; + symbolToNode(symbol: Symbol, meaning: SymbolFlags, enclosingDeclaration: Node | undefined, flags: NodeBuilderFlags | undefined, internalFlags: InternalNodeBuilderFlags | undefined): Node | undefined; /** Note that the resulting nodes cannot be checked. */ symbolToTypeParameterDeclarations(symbol: Symbol, enclosingDeclaration: Node | undefined, flags: NodeBuilderFlags | undefined): NodeArray | undefined; /** Note that the resulting nodes cannot be checked. */ @@ -5459,12 +5459,9 @@ export const enum NodeBuilderFlags { AllowEmptyTuple = 1 << 19, AllowUniqueESSymbolType = 1 << 20, AllowEmptyIndexInfoType = 1 << 21, - /** @internal */ WriteComputedProps = 1 << 30, // { [E.A]: 1 } - /** @internal */ NoSyntacticPrinter = 1 << 31, // Errors (cont.) AllowNodeModulesRelativePaths = 1 << 26, - /** @internal */ DoNotIncludeSymbolChain = 1 << 27, // Skip looking up and printing an accessible symbol chain - /** @internal */ AllowUnresolvedNames = 1 << 32, + IgnoreErrors = AllowThisInObjectLiteral | AllowQualifiedNameInPlaceOfIdentifier | AllowAnonymousIdentifier | AllowEmptyUnionOrIntersection | AllowEmptyTuple | AllowEmptyIndexInfoType | AllowNodeModulesRelativePaths, @@ -5474,6 +5471,16 @@ export const enum NodeBuilderFlags { InInitialEntityName = 1 << 24, // Set when writing the LHS of an entity name or entity name expression } +/** @internal */ +// dprint-ignore +export const enum InternalNodeBuilderFlags { + None = 0, + WriteComputedProps = 1 << 0, // { [E.A]: 1 } + NoSyntacticPrinter = 1 << 1, + DoNotIncludeSymbolChain = 1 << 2, // Skip looking up and printing an accessible symbol chain + AllowUnresolvedNames = 1 << 3, +} + // Ensure the shared flags between this and `NodeBuilderFlags` stay in alignment // dprint-ignore export const enum TypeFormatFlags { @@ -5810,9 +5817,9 @@ export interface EmitResolver { requiresAddingImplicitUndefined(node: ParameterDeclaration): boolean; isExpandoFunctionDeclaration(node: FunctionDeclaration | VariableDeclaration): boolean; getPropertiesOfContainerFunction(node: Declaration): Symbol[]; - createTypeOfDeclaration(declaration: AccessorDeclaration | VariableLikeDeclaration | PropertyAccessExpression | ElementAccessExpression | BinaryExpression, enclosingDeclaration: Node, flags: NodeBuilderFlags, tracker: SymbolTracker): TypeNode | undefined; - createReturnTypeOfSignatureDeclaration(signatureDeclaration: SignatureDeclaration, enclosingDeclaration: Node, flags: NodeBuilderFlags, tracker: SymbolTracker): TypeNode | undefined; - createTypeOfExpression(expr: Expression, enclosingDeclaration: Node, flags: NodeBuilderFlags, tracker: SymbolTracker): TypeNode | undefined; + createTypeOfDeclaration(declaration: AccessorDeclaration | VariableLikeDeclaration | PropertyAccessExpression | ElementAccessExpression | BinaryExpression, enclosingDeclaration: Node, flags: NodeBuilderFlags, internalFlags: InternalNodeBuilderFlags, tracker: SymbolTracker): TypeNode | undefined; + createReturnTypeOfSignatureDeclaration(signatureDeclaration: SignatureDeclaration, enclosingDeclaration: Node, flags: NodeBuilderFlags, internalFlags: InternalNodeBuilderFlags, tracker: SymbolTracker): TypeNode | undefined; + createTypeOfExpression(expr: Expression, enclosingDeclaration: Node, flags: NodeBuilderFlags, internalFlags: InternalNodeBuilderFlags, tracker: SymbolTracker): TypeNode | undefined; createLiteralConstValue(node: VariableDeclaration | PropertyDeclaration | PropertySignature | ParameterDeclaration, tracker: SymbolTracker): Expression; isSymbolAccessible(symbol: Symbol, enclosingDeclaration: Node | undefined, meaning: SymbolFlags | undefined, shouldComputeAliasToMarkVisible: boolean): SymbolAccessibilityResult; isEntityNameVisible(entityName: EntityNameOrEntityNameExpression, enclosingDeclaration: Node): SymbolVisibilityResult; @@ -5829,7 +5836,7 @@ export interface EmitResolver { getJsxFactoryEntity(location?: Node): EntityName | undefined; getJsxFragmentFactoryEntity(location?: Node): EntityName | undefined; isBindingCapturedByNode(node: Node, decl: VariableDeclaration | BindingElement): boolean; - getDeclarationStatementsForSourceFile(node: SourceFile, flags: NodeBuilderFlags, tracker: SymbolTracker): Statement[] | undefined; + getDeclarationStatementsForSourceFile(node: SourceFile, flags: NodeBuilderFlags, internalFlags: InternalNodeBuilderFlags, tracker: SymbolTracker): Statement[] | undefined; isImportRequiredByAugmentation(decl: ImportDeclaration): boolean; isDefinitelyReferenceToGlobalSymbolObject(node: Node): boolean; } diff --git a/src/harness/typeWriter.ts b/src/harness/typeWriter.ts index e09f8bd56a272..96bd527077d8e 100644 --- a/src/harness/typeWriter.ts +++ b/src/harness/typeWriter.ts @@ -279,7 +279,7 @@ export class TypeWriterWalker { } else { const typeFormatFlags = ts.TypeFormatFlags.NoTruncation | ts.TypeFormatFlags.AllowUniqueESSymbolType | ts.TypeFormatFlags.GenerateNamesForShadowedTypeParams; - let typeNode = this.checker.typeToTypeNode(type, node.parent, (typeFormatFlags & ts.TypeFormatFlags.NodeBuilderFlagsMask) | ts.NodeBuilderFlags.IgnoreErrors)!; + let typeNode = this.checker.typeToTypeNode(type, node.parent, (typeFormatFlags & ts.TypeFormatFlags.NodeBuilderFlagsMask) | ts.NodeBuilderFlags.IgnoreErrors, ts.InternalNodeBuilderFlags.AllowUnresolvedNames)!; if (ts.isIdentifier(node) && ts.isTypeAliasDeclaration(node.parent) && node.parent.name === node && ts.isIdentifier(typeNode) && ts.idText(typeNode) === ts.idText(node)) { // for a complex type alias `type T = ...`, showing "T : T" isn't very helpful for type tests. When the type produced is the same as // the name of the type alias, recreate the type string without reusing the alias name diff --git a/src/services/codefixes/fixAddMissingConstraint.ts b/src/services/codefixes/fixAddMissingConstraint.ts index fad9a8f003a5c..ba1e7aa0279c2 100644 --- a/src/services/codefixes/fixAddMissingConstraint.ts +++ b/src/services/codefixes/fixAddMissingConstraint.ts @@ -123,7 +123,7 @@ function addMissingConstraint(changes: textChanges.ChangeTracker, program: Progr const scriptTarget = getEmitScriptTarget(program.getCompilerOptions()); const tracker = getNoopSymbolTrackerWithResolver({ program, host }); const importAdder = createImportAdder(sourceFile, program, preferences, host); - const typeNode = typeToAutoImportableTypeNode(checker, importAdder, constraint, /*contextNode*/ undefined, scriptTarget, /*flags*/ undefined, tracker); + const typeNode = typeToAutoImportableTypeNode(checker, importAdder, constraint, /*contextNode*/ undefined, scriptTarget, /*flags*/ undefined, /*internalFlags*/ undefined, tracker); if (typeNode) { changes.replaceNode(sourceFile, declaration, factory.updateTypeParameterDeclaration(declaration, /*modifiers*/ undefined, declaration.name, typeNode, declaration.default)); importAdder.writeFixes(changes); diff --git a/src/services/codefixes/fixAddMissingMember.ts b/src/services/codefixes/fixAddMissingMember.ts index 190fba39043c0..77bec1ed7f173 100644 --- a/src/services/codefixes/fixAddMissingMember.ts +++ b/src/services/codefixes/fixAddMissingMember.ts @@ -55,6 +55,7 @@ import { Identifier, idText, InterfaceDeclaration, + InternalNodeBuilderFlags, isCallExpression, isClassLike, isComputedPropertyName, @@ -493,11 +494,11 @@ function getTypeNode(checker: TypeChecker, node: ClassLikeDeclaration | Interfac const binaryExpression = token.parent.parent as BinaryExpression; const otherExpression = token.parent === binaryExpression.left ? binaryExpression.right : binaryExpression.left; const widenedType = checker.getWidenedType(checker.getBaseTypeOfLiteralType(checker.getTypeAtLocation(otherExpression))); - typeNode = checker.typeToTypeNode(widenedType, node, NodeBuilderFlags.NoTruncation); + typeNode = checker.typeToTypeNode(widenedType, node, NodeBuilderFlags.NoTruncation, InternalNodeBuilderFlags.AllowUnresolvedNames); } else { const contextualType = checker.getContextualType(token.parent as Expression); - typeNode = contextualType ? checker.typeToTypeNode(contextualType, /*enclosingDeclaration*/ undefined, NodeBuilderFlags.NoTruncation) : undefined; + typeNode = contextualType ? checker.typeToTypeNode(contextualType, /*enclosingDeclaration*/ undefined, NodeBuilderFlags.NoTruncation, InternalNodeBuilderFlags.AllowUnresolvedNames) : undefined; } return typeNode || factory.createKeywordTypeNode(SyntaxKind.AnyKeyword); } @@ -775,7 +776,7 @@ function tryGetContainingMethodDeclaration(node: ClassLikeDeclaration | Interfac function createPropertyNameFromSymbol(symbol: Symbol, target: ScriptTarget, quotePreference: QuotePreference, checker: TypeChecker) { if (isTransientSymbol(symbol)) { - const prop = checker.symbolToNode(symbol, SymbolFlags.Value, /*enclosingDeclaration*/ undefined, NodeBuilderFlags.WriteComputedProps); + const prop = checker.symbolToNode(symbol, SymbolFlags.Value, /*enclosingDeclaration*/ undefined, /*flags*/ undefined, InternalNodeBuilderFlags.WriteComputedProps); if (prop && isComputedPropertyName(prop)) return prop; } // We're using these nodes as property names in an object literal; no need to quote names when not needed. diff --git a/src/services/codefixes/fixAddMissingParam.ts b/src/services/codefixes/fixAddMissingParam.ts index c5ac4f25b2b09..65c9cf861586e 100644 --- a/src/services/codefixes/fixAddMissingParam.ts +++ b/src/services/codefixes/fixAddMissingParam.ts @@ -26,6 +26,7 @@ import { getNameOfDeclaration, getSourceFileOfNode, getTokenAtPosition, + InternalNodeBuilderFlags, isAccessExpression, isCallExpression, isIdentifier, @@ -221,7 +222,7 @@ function tryGetName(node: FunctionLikeDeclaration) { } function typeToTypeNode(checker: TypeChecker, type: Type, enclosingDeclaration: Node) { - return checker.typeToTypeNode(checker.getWidenedType(type), enclosingDeclaration, NodeBuilderFlags.NoTruncation) + return checker.typeToTypeNode(checker.getWidenedType(type), enclosingDeclaration, NodeBuilderFlags.NoTruncation, InternalNodeBuilderFlags.AllowUnresolvedNames) ?? factory.createKeywordTypeNode(SyntaxKind.UnknownKeyword); } diff --git a/src/services/codefixes/fixClassIncorrectlyImplementsInterface.ts b/src/services/codefixes/fixClassIncorrectlyImplementsInterface.ts index d5dacd51dc59d..a0dd5aa5e5899 100644 --- a/src/services/codefixes/fixClassIncorrectlyImplementsInterface.ts +++ b/src/services/codefixes/fixClassIncorrectlyImplementsInterface.ts @@ -108,7 +108,7 @@ function addMissingDeclarations( function createMissingIndexSignatureDeclaration(type: InterfaceType, kind: IndexKind): void { const indexInfoOfKind = checker.getIndexInfoOfType(type, kind); if (indexInfoOfKind) { - insertInterfaceMemberNode(sourceFile, classDeclaration, checker.indexInfoToIndexSignatureDeclaration(indexInfoOfKind, classDeclaration, /*flags*/ undefined, getNoopSymbolTrackerWithResolver(context))!); + insertInterfaceMemberNode(sourceFile, classDeclaration, checker.indexInfoToIndexSignatureDeclaration(indexInfoOfKind, classDeclaration, /*flags*/ undefined, /*internalFlags*/ undefined, getNoopSymbolTrackerWithResolver(context))!); } } diff --git a/src/services/codefixes/fixMissingTypeAnnotationOnExports.ts b/src/services/codefixes/fixMissingTypeAnnotationOnExports.ts index deea661f2e72a..0b84557078237 100644 --- a/src/services/codefixes/fixMissingTypeAnnotationOnExports.ts +++ b/src/services/codefixes/fixMissingTypeAnnotationOnExports.ts @@ -45,6 +45,7 @@ import { hasInitializer, hasSyntacticModifier, Identifier, + InternalNodeBuilderFlags, isArrayBindingPattern, isArrayLiteralExpression, isAssertionExpression, @@ -159,8 +160,9 @@ const declarationEmitNodeBuilderFlags = NodeBuilderFlags.MultilineObjectLiterals | NodeBuilderFlags.UseStructuralFallback | NodeBuilderFlags.AllowEmptyTuple | NodeBuilderFlags.GenerateNamesForShadowedTypeParams - | NodeBuilderFlags.NoTruncation - | NodeBuilderFlags.WriteComputedProps; + | NodeBuilderFlags.NoTruncation; + +const declarationEmitInternalNodeBuilderFlags = InternalNodeBuilderFlags.WriteComputedProps; enum TypePrintMode { // Prints its fully spelled out type @@ -1095,7 +1097,7 @@ function withContext( function typeToTypeNode(type: Type, enclosingDeclaration: Node, flags = NodeBuilderFlags.None) { let isTruncated = false; - const result = typeToAutoImportableTypeNode(typeChecker, importAdder, type, enclosingDeclaration, scriptTarget, declarationEmitNodeBuilderFlags | flags, { + const result = typeToAutoImportableTypeNode(typeChecker, importAdder, type, enclosingDeclaration, scriptTarget, declarationEmitNodeBuilderFlags | flags, declarationEmitInternalNodeBuilderFlags, { moduleResolverHost: program, trackSymbol() { return true; @@ -1109,7 +1111,7 @@ function withContext( function typePredicateToTypeNode(typePredicate: TypePredicate, enclosingDeclaration: Node, flags = NodeBuilderFlags.None): TypeNode | undefined { let isTruncated = false; - const result = typePredicateToAutoImportableTypeNode(typeChecker, importAdder, typePredicate, enclosingDeclaration, scriptTarget, declarationEmitNodeBuilderFlags | flags, { + const result = typePredicateToAutoImportableTypeNode(typeChecker, importAdder, typePredicate, enclosingDeclaration, scriptTarget, declarationEmitNodeBuilderFlags | flags, declarationEmitInternalNodeBuilderFlags, { moduleResolverHost: program, trackSymbol() { return true; diff --git a/src/services/codefixes/helpers.ts b/src/services/codefixes/helpers.ts index 0524080520582..f4a29c3751d12 100644 --- a/src/services/codefixes/helpers.ts +++ b/src/services/codefixes/helpers.ts @@ -41,6 +41,7 @@ import { hasAbstractModifier, Identifier, idText, + InternalNodeBuilderFlags, IntersectionType, isArrowFunction, isAutoAccessorPropertyDeclaration, @@ -222,7 +223,7 @@ export function addNewNodeForMemberSymbol( case SyntaxKind.PropertyDeclaration: let flags = NodeBuilderFlags.NoTruncation; flags |= quotePreference === QuotePreference.Single ? NodeBuilderFlags.UseSingleQuotesForStringLiteralType : 0; - let typeNode = checker.typeToTypeNode(type, enclosingDeclaration, flags, getNoopSymbolTrackerWithResolver(context)); + let typeNode = checker.typeToTypeNode(type, enclosingDeclaration, flags, InternalNodeBuilderFlags.AllowUnresolvedNames, getNoopSymbolTrackerWithResolver(context)); if (importAdder) { const importableReference = tryGetAutoImportableReferenceFromTypeNode(typeNode, scriptTarget); if (importableReference) { @@ -241,7 +242,7 @@ export function addNewNodeForMemberSymbol( case SyntaxKind.GetAccessor: case SyntaxKind.SetAccessor: { Debug.assertIsDefined(declarations); - let typeNode = checker.typeToTypeNode(type, enclosingDeclaration, /*flags*/ undefined, getNoopSymbolTrackerWithResolver(context)); + let typeNode = checker.typeToTypeNode(type, enclosingDeclaration, /*flags*/ undefined, /*internalFlags*/ undefined, getNoopSymbolTrackerWithResolver(context)); const allAccessors = getAllAccessorDeclarations(declarations, declaration as AccessorDeclaration); const orderedAccessors = allAccessors.secondAccessor ? [allAccessors.firstAccessor, allAccessors.secondAccessor] @@ -392,7 +393,7 @@ export function createSignatureDeclarationFromSignature( | NodeBuilderFlags.SuppressAnyReturnType | NodeBuilderFlags.AllowEmptyTuple | (quotePreference === QuotePreference.Single ? NodeBuilderFlags.UseSingleQuotesForStringLiteralType : NodeBuilderFlags.None); - const signatureDeclaration = checker.signatureToSignatureDeclaration(signature, kind, enclosingDeclaration, flags, getNoopSymbolTrackerWithResolver(context)) as ArrowFunction | FunctionExpression | MethodDeclaration | FunctionDeclaration; + const signatureDeclaration = checker.signatureToSignatureDeclaration(signature, kind, enclosingDeclaration, flags, InternalNodeBuilderFlags.AllowUnresolvedNames, getNoopSymbolTrackerWithResolver(context)) as ArrowFunction | FunctionExpression | MethodDeclaration | FunctionDeclaration; if (!signatureDeclaration) { return undefined; } @@ -506,6 +507,7 @@ export function createSignatureDeclarationFromCallExpression( contextNode, scriptTarget, NodeBuilderFlags.NoTruncation, + InternalNodeBuilderFlags.AllowUnresolvedNames, tracker, ); @@ -519,7 +521,7 @@ export function createSignatureDeclarationFromCallExpression( const parameters = createDummyParameters(args.length, names, argumentTypeNodes, /*minArgumentCount*/ undefined, isJs); const type = isJs || contextualType === undefined ? undefined - : checker.typeToTypeNode(contextualType, contextNode, /*flags*/ undefined, tracker); + : checker.typeToTypeNode(contextualType, contextNode, /*flags*/ undefined, /*internalFlags*/ undefined, tracker); switch (kind) { case SyntaxKind.MethodDeclaration: @@ -589,8 +591,8 @@ function createTypeParameterName(index: number) { } /** @internal */ -export function typeToAutoImportableTypeNode(checker: TypeChecker, importAdder: ImportAdder, type: Type, contextNode: Node | undefined, scriptTarget: ScriptTarget, flags?: NodeBuilderFlags, tracker?: SymbolTracker): TypeNode | undefined { - let typeNode = checker.typeToTypeNode(type, contextNode, flags, tracker); +export function typeToAutoImportableTypeNode(checker: TypeChecker, importAdder: ImportAdder, type: Type, contextNode: Node | undefined, scriptTarget: ScriptTarget, flags?: NodeBuilderFlags, internalFlags?: InternalNodeBuilderFlags, tracker?: SymbolTracker): TypeNode | undefined { + let typeNode = checker.typeToTypeNode(type, contextNode, flags, internalFlags, tracker); if (typeNode && isImportTypeNode(typeNode)) { const importableReference = tryGetAutoImportableReferenceFromTypeNode(typeNode, scriptTarget); if (importableReference) { @@ -604,8 +606,8 @@ export function typeToAutoImportableTypeNode(checker: TypeChecker, importAdder: } /** @internal */ -export function typePredicateToAutoImportableTypeNode(checker: TypeChecker, importAdder: ImportAdder, typePredicate: TypePredicate, contextNode: Node | undefined, scriptTarget: ScriptTarget, flags?: NodeBuilderFlags, tracker?: SymbolTracker): TypeNode | undefined { - let typePredicateNode = checker.typePredicateToTypePredicateNode(typePredicate, contextNode, flags, tracker); +export function typePredicateToAutoImportableTypeNode(checker: TypeChecker, importAdder: ImportAdder, typePredicate: TypePredicate, contextNode: Node | undefined, scriptTarget: ScriptTarget, flags?: NodeBuilderFlags, internalFlags?: InternalNodeBuilderFlags, tracker?: SymbolTracker): TypeNode | undefined { + let typePredicateNode = checker.typePredicateToTypePredicateNode(typePredicate, contextNode, flags, internalFlags, tracker); if (typePredicateNode?.type && isImportTypeNode(typePredicateNode.type)) { const importableReference = tryGetAutoImportableReferenceFromTypeNode(typePredicateNode.type, scriptTarget); if (importableReference) { @@ -625,7 +627,7 @@ function typeContainsTypeParameter(type: Type) { return type.flags & TypeFlags.TypeParameter; } -function getArgumentTypesAndTypeParameters(checker: TypeChecker, importAdder: ImportAdder, instanceTypes: Type[], contextNode: Node | undefined, scriptTarget: ScriptTarget, flags?: NodeBuilderFlags, tracker?: SymbolTracker) { +function getArgumentTypesAndTypeParameters(checker: TypeChecker, importAdder: ImportAdder, instanceTypes: Type[], contextNode: Node | undefined, scriptTarget: ScriptTarget, flags?: NodeBuilderFlags, internalFlags?: InternalNodeBuilderFlags, tracker?: SymbolTracker) { // Types to be used as the types of the parameters in the new function // E.g. from this source: // added("", 0) @@ -668,7 +670,7 @@ function getArgumentTypesAndTypeParameters(checker: TypeChecker, importAdder: Im // Widen the type so we don't emit nonsense annotations like "function fn(x: 3) {" const widenedInstanceType = checker.getBaseTypeOfLiteralType(instanceType); - const argumentTypeNode = typeToAutoImportableTypeNode(checker, importAdder, widenedInstanceType, contextNode, scriptTarget, flags, tracker); + const argumentTypeNode = typeToAutoImportableTypeNode(checker, importAdder, widenedInstanceType, contextNode, scriptTarget, flags, internalFlags, tracker); if (!argumentTypeNode) { continue; } @@ -686,7 +688,7 @@ function getArgumentTypesAndTypeParameters(checker: TypeChecker, importAdder: Im // We instead want to output: // function added(value: T) { ... } const instanceTypeConstraint = instanceType.isTypeParameter() && instanceType.constraint && !isAnonymousObjectConstraintType(instanceType.constraint) - ? typeToAutoImportableTypeNode(checker, importAdder, instanceType.constraint, contextNode, scriptTarget, flags, tracker) + ? typeToAutoImportableTypeNode(checker, importAdder, instanceType.constraint, contextNode, scriptTarget, flags, internalFlags, tracker) : undefined; if (argumentTypeParameter) { @@ -795,7 +797,7 @@ function createMethodImplementingSignatures( function getReturnTypeFromSignatures(signatures: readonly Signature[], checker: TypeChecker, context: TypeConstructionContext, enclosingDeclaration: ClassLikeDeclaration): TypeNode | undefined { if (length(signatures)) { const type = checker.getUnionType(map(signatures, checker.getReturnTypeOfSignature)); - return checker.typeToTypeNode(type, enclosingDeclaration, NodeBuilderFlags.NoTruncation, getNoopSymbolTrackerWithResolver(context)); + return checker.typeToTypeNode(type, enclosingDeclaration, NodeBuilderFlags.NoTruncation, InternalNodeBuilderFlags.AllowUnresolvedNames, getNoopSymbolTrackerWithResolver(context)); } } diff --git a/src/services/completions.ts b/src/services/completions.ts index 1300005c8b570..ee67c03331563 100644 --- a/src/services/completions.ts +++ b/src/services/completions.ts @@ -2324,7 +2324,7 @@ function createObjectLiteralMethod( // We don't support overloads in object literals. return undefined; } - const typeNode = checker.typeToTypeNode(effectiveType, enclosingDeclaration, builderFlags, codefix.getNoopSymbolTrackerWithResolver({ program, host })); + const typeNode = checker.typeToTypeNode(effectiveType, enclosingDeclaration, builderFlags, /*internalFlags*/ undefined, codefix.getNoopSymbolTrackerWithResolver({ program, host })); if (!typeNode || !isFunctionTypeNode(typeNode)) { return undefined; } diff --git a/src/services/refactors/extractSymbol.ts b/src/services/refactors/extractSymbol.ts index d5ebc4e3c040d..4093074b9575a 100644 --- a/src/services/refactors/extractSymbol.ts +++ b/src/services/refactors/extractSymbol.ts @@ -61,6 +61,7 @@ import { hasEffectiveModifier, hasSyntacticModifier, Identifier, + InternalNodeBuilderFlags, isArray, isArrowFunction, isAssignmentExpression, @@ -1062,7 +1063,7 @@ function extractFunctionInScope( let type = checker.getTypeOfSymbolAtLocation(usage.symbol, usage.node); // Widen the type so we don't emit nonsense annotations like "function fn(x: 3) {" type = checker.getBaseTypeOfLiteralType(type); - typeNode = codefix.typeToAutoImportableTypeNode(checker, importAdder, type, scope, scriptTarget, NodeBuilderFlags.NoTruncation); + typeNode = codefix.typeToAutoImportableTypeNode(checker, importAdder, type, scope, scriptTarget, NodeBuilderFlags.NoTruncation, InternalNodeBuilderFlags.AllowUnresolvedNames); } const paramDecl = factory.createParameterDeclaration( @@ -1096,7 +1097,7 @@ function extractFunctionInScope( // to avoid problems when there are literal types present if (isExpression(node) && !isJS) { const contextualType = checker.getContextualType(node); - returnType = checker.typeToTypeNode(contextualType!, scope, NodeBuilderFlags.NoTruncation); // TODO: GH#18217 + returnType = checker.typeToTypeNode(contextualType!, scope, NodeBuilderFlags.NoTruncation, InternalNodeBuilderFlags.AllowUnresolvedNames); // TODO: GH#18217 } const { body, returnValueProperty } = transformFunctionBody(node, exposedVariableDeclarations, writes, substitutions, !!(range.facts & RangeFacts.HasReturn)); @@ -1138,6 +1139,7 @@ function extractFunctionInScope( checker.getTypeAtLocation(range.thisNode!), scope, NodeBuilderFlags.NoTruncation, + InternalNodeBuilderFlags.AllowUnresolvedNames, ), /*initializer*/ undefined, ), @@ -1228,6 +1230,7 @@ function extractFunctionInScope( checker.getBaseTypeOfLiteralType(checker.getTypeAtLocation(variableDeclaration)), scope, NodeBuilderFlags.NoTruncation, + InternalNodeBuilderFlags.AllowUnresolvedNames, ); typeElements.push(factory.createPropertySignature( @@ -1378,7 +1381,7 @@ function extractConstantInScope( let variableType = isJS || !checker.isContextSensitive(node) ? undefined - : checker.typeToTypeNode(checker.getContextualType(node)!, scope, NodeBuilderFlags.NoTruncation); // TODO: GH#18217 + : checker.typeToTypeNode(checker.getContextualType(node)!, scope, NodeBuilderFlags.NoTruncation, InternalNodeBuilderFlags.AllowUnresolvedNames); // TODO: GH#18217 let initializer = transformConstantInitializer(skipParentheses(node), substitutions); @@ -1512,7 +1515,7 @@ function extractConstantInScope( const paramType = checker.getTypeAtLocation(p); if (paramType === checker.getAnyType()) hasAny = true; - parameters.push(factory.updateParameterDeclaration(p, p.modifiers, p.dotDotDotToken, p.name, p.questionToken, p.type || checker.typeToTypeNode(paramType, scope, NodeBuilderFlags.NoTruncation), p.initializer)); + parameters.push(factory.updateParameterDeclaration(p, p.modifiers, p.dotDotDotToken, p.name, p.questionToken, p.type || checker.typeToTypeNode(paramType, scope, NodeBuilderFlags.NoTruncation, InternalNodeBuilderFlags.AllowUnresolvedNames), p.initializer)); } } // If a parameter was inferred as any we skip adding function parameters at all. @@ -1521,7 +1524,7 @@ function extractConstantInScope( if (hasAny) return { variableType, initializer }; variableType = undefined; if (isArrowFunction(initializer)) { - initializer = factory.updateArrowFunction(initializer, canHaveModifiers(node) ? getModifiers(node) : undefined, initializer.typeParameters, parameters, initializer.type || checker.typeToTypeNode(functionSignature.getReturnType(), scope, NodeBuilderFlags.NoTruncation), initializer.equalsGreaterThanToken, initializer.body); + initializer = factory.updateArrowFunction(initializer, canHaveModifiers(node) ? getModifiers(node) : undefined, initializer.typeParameters, parameters, initializer.type || checker.typeToTypeNode(functionSignature.getReturnType(), scope, NodeBuilderFlags.NoTruncation, InternalNodeBuilderFlags.AllowUnresolvedNames), initializer.equalsGreaterThanToken, initializer.body); } else { if (functionSignature && !!functionSignature.thisParameter) { @@ -1538,7 +1541,7 @@ function extractConstantInScope( /*dotDotDotToken*/ undefined, "this", /*questionToken*/ undefined, - checker.typeToTypeNode(thisType, scope, NodeBuilderFlags.NoTruncation), + checker.typeToTypeNode(thisType, scope, NodeBuilderFlags.NoTruncation, InternalNodeBuilderFlags.AllowUnresolvedNames), ), ); } diff --git a/src/services/refactors/inferFunctionReturnType.ts b/src/services/refactors/inferFunctionReturnType.ts index 42607e3888bda..d147fbbed19b9 100644 --- a/src/services/refactors/inferFunctionReturnType.ts +++ b/src/services/refactors/inferFunctionReturnType.ts @@ -11,6 +11,7 @@ import { FunctionExpression, getLocaleSpecificMessage, getTouchingPropertyName, + InternalNodeBuilderFlags, isArrowFunction, isBlock, isInJSFile, @@ -126,7 +127,7 @@ function getInfo(context: RefactorContext): FunctionInfo | RefactorErrorInfo | u if (signature) { const typePredicate = typeChecker.getTypePredicateOfSignature(signature); if (typePredicate && typePredicate.type) { - const typePredicateTypeNode = typeChecker.typePredicateToTypePredicateNode(typePredicate, declaration, NodeBuilderFlags.NoTruncation); + const typePredicateTypeNode = typeChecker.typePredicateToTypePredicateNode(typePredicate, declaration, NodeBuilderFlags.NoTruncation, InternalNodeBuilderFlags.AllowUnresolvedNames); if (typePredicateTypeNode) { return { declaration, returnTypeNode: typePredicateTypeNode }; } @@ -141,7 +142,7 @@ function getInfo(context: RefactorContext): FunctionInfo | RefactorErrorInfo | u return { error: getLocaleSpecificMessage(Diagnostics.Could_not_determine_function_return_type) }; } - const returnTypeNode = typeChecker.typeToTypeNode(returnType, declaration, NodeBuilderFlags.NoTruncation); + const returnTypeNode = typeChecker.typeToTypeNode(returnType, declaration, NodeBuilderFlags.NoTruncation, InternalNodeBuilderFlags.AllowUnresolvedNames); if (returnTypeNode) { return { declaration, returnTypeNode }; } diff --git a/src/services/utilities.ts b/src/services/utilities.ts index 55ab684196e3c..c3908e208b74f 100644 --- a/src/services/utilities.ts +++ b/src/services/utilities.ts @@ -132,6 +132,7 @@ import { ImportTypeNode, indexOfNode, IndexSignatureDeclaration, + InternalNodeBuilderFlags, InternalSymbolName, isAmbientModule, isAnyImportSyntax, @@ -3440,7 +3441,7 @@ export function getTypeNodeIfAccessible(type: Type, enclosingScope: Node, progra const checker = program.getTypeChecker(); let typeIsAccessible = true; const notAccessible = () => typeIsAccessible = false; - const res = checker.typeToTypeNode(type, enclosingScope, NodeBuilderFlags.NoTruncation, { + const res = checker.typeToTypeNode(type, enclosingScope, NodeBuilderFlags.NoTruncation, InternalNodeBuilderFlags.AllowUnresolvedNames, { trackSymbol: (symbol, declaration, meaning) => { typeIsAccessible = typeIsAccessible && checker.isSymbolAccessible(symbol, declaration, meaning, /*shouldComputeAliasToMarkVisible*/ false).accessibility === SymbolAccessibility.Accessible; return !typeIsAccessible; From 278cb9489dbc8011c05573f26c33f46a005d3955 Mon Sep 17 00:00:00 2001 From: Anders Hejlsberg Date: Thu, 8 Aug 2024 13:38:46 -0700 Subject: [PATCH 16/50] Properly account for type parameters introduced by contextual types (#59516) --- src/compiler/checker.ts | 15 +- .../contextualOuterTypeParameters.symbols | 90 ++++++++++ .../contextualOuterTypeParameters.types | 165 ++++++++++++++++++ .../compiler/contextualOuterTypeParameters.ts | 28 +++ 4 files changed, 294 insertions(+), 4 deletions(-) create mode 100644 tests/baselines/reference/contextualOuterTypeParameters.symbols create mode 100644 tests/baselines/reference/contextualOuterTypeParameters.types create mode 100644 tests/cases/compiler/contextualOuterTypeParameters.ts diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 3c6713a826280..9ca49d3cdee54 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -12573,7 +12573,8 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { if (!node) { return undefined; } - switch (node.kind) { + const kind = node.kind; + switch (kind) { case SyntaxKind.ClassDeclaration: case SyntaxKind.ClassExpression: case SyntaxKind.InterfaceDeclaration: @@ -12595,15 +12596,21 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { case SyntaxKind.MappedType: case SyntaxKind.ConditionalType: { const outerTypeParameters = getOuterTypeParameters(node, includeThisTypes); - if (node.kind === SyntaxKind.MappedType) { + if ((kind === SyntaxKind.FunctionExpression || kind === SyntaxKind.ArrowFunction || isObjectLiteralMethod(node)) && isContextSensitive(node as Expression | MethodDeclaration)) { + const signature = firstOrUndefined(getSignaturesOfType(getTypeOfSymbol(getSymbolOfDeclaration(node as FunctionLikeDeclaration)), SignatureKind.Call)); + if (signature && signature.typeParameters) { + return [...(outerTypeParameters || emptyArray), ...signature.typeParameters]; + } + } + if (kind === SyntaxKind.MappedType) { return append(outerTypeParameters, getDeclaredTypeOfTypeParameter(getSymbolOfDeclaration((node as MappedTypeNode).typeParameter))); } - else if (node.kind === SyntaxKind.ConditionalType) { + else if (kind === SyntaxKind.ConditionalType) { return concatenate(outerTypeParameters, getInferTypeParameters(node as ConditionalTypeNode)); } const outerAndOwnTypeParameters = appendTypeParameters(outerTypeParameters, getEffectiveTypeParameterDeclarations(node as DeclarationWithTypeParameters)); const thisType = includeThisTypes && - (node.kind === SyntaxKind.ClassDeclaration || node.kind === SyntaxKind.ClassExpression || node.kind === SyntaxKind.InterfaceDeclaration || isJSConstructor(node)) && + (kind === SyntaxKind.ClassDeclaration || kind === SyntaxKind.ClassExpression || kind === SyntaxKind.InterfaceDeclaration || isJSConstructor(node)) && getDeclaredTypeOfClassOrInterface(getSymbolOfDeclaration(node as ClassLikeDeclaration | InterfaceDeclaration)).thisType; return thisType ? append(outerAndOwnTypeParameters, thisType) : outerAndOwnTypeParameters; } diff --git a/tests/baselines/reference/contextualOuterTypeParameters.symbols b/tests/baselines/reference/contextualOuterTypeParameters.symbols new file mode 100644 index 0000000000000..72ec61e99b1a7 --- /dev/null +++ b/tests/baselines/reference/contextualOuterTypeParameters.symbols @@ -0,0 +1,90 @@ +//// [tests/cases/compiler/contextualOuterTypeParameters.ts] //// + +=== contextualOuterTypeParameters.ts === +// https://github.com/microsoft/TypeScript/issues/59450 + +declare function f(fun: (t: T) => void): void +>f : Symbol(f, Decl(contextualOuterTypeParameters.ts, 0, 0)) +>fun : Symbol(fun, Decl(contextualOuterTypeParameters.ts, 2, 19)) +>T : Symbol(T, Decl(contextualOuterTypeParameters.ts, 2, 25)) +>t : Symbol(t, Decl(contextualOuterTypeParameters.ts, 2, 28)) +>T : Symbol(T, Decl(contextualOuterTypeParameters.ts, 2, 25)) + +f(t => { +>f : Symbol(f, Decl(contextualOuterTypeParameters.ts, 0, 0)) +>t : Symbol(t, Decl(contextualOuterTypeParameters.ts, 4, 2)) + + type isArray = (typeof t)[] extends string[] ? true : false; +>isArray : Symbol(isArray, Decl(contextualOuterTypeParameters.ts, 4, 8)) +>t : Symbol(t, Decl(contextualOuterTypeParameters.ts, 4, 2)) + + type IsObject = { x: typeof t } extends { x: string } ? true : false; +>IsObject : Symbol(IsObject, Decl(contextualOuterTypeParameters.ts, 5, 64)) +>x : Symbol(x, Decl(contextualOuterTypeParameters.ts, 6, 21)) +>t : Symbol(t, Decl(contextualOuterTypeParameters.ts, 4, 2)) +>x : Symbol(x, Decl(contextualOuterTypeParameters.ts, 6, 45)) + +}); + +const fn1: (x: T) => void = t => { +>fn1 : Symbol(fn1, Decl(contextualOuterTypeParameters.ts, 9, 5)) +>T : Symbol(T, Decl(contextualOuterTypeParameters.ts, 9, 12)) +>x : Symbol(x, Decl(contextualOuterTypeParameters.ts, 9, 15)) +>T : Symbol(T, Decl(contextualOuterTypeParameters.ts, 9, 12)) +>t : Symbol(t, Decl(contextualOuterTypeParameters.ts, 9, 30)) + + type isArray = (typeof t)[] extends string[] ? true : false; +>isArray : Symbol(isArray, Decl(contextualOuterTypeParameters.ts, 9, 37)) +>t : Symbol(t, Decl(contextualOuterTypeParameters.ts, 9, 30)) + + type IsObject = { x: typeof t } extends { x: string } ? true : false; +>IsObject : Symbol(IsObject, Decl(contextualOuterTypeParameters.ts, 10, 64)) +>x : Symbol(x, Decl(contextualOuterTypeParameters.ts, 11, 21)) +>t : Symbol(t, Decl(contextualOuterTypeParameters.ts, 9, 30)) +>x : Symbol(x, Decl(contextualOuterTypeParameters.ts, 11, 45)) + +}; + +const fn2: (x: T) => void = function test(t) { +>fn2 : Symbol(fn2, Decl(contextualOuterTypeParameters.ts, 14, 5)) +>T : Symbol(T, Decl(contextualOuterTypeParameters.ts, 14, 12)) +>x : Symbol(x, Decl(contextualOuterTypeParameters.ts, 14, 15)) +>T : Symbol(T, Decl(contextualOuterTypeParameters.ts, 14, 12)) +>test : Symbol(test, Decl(contextualOuterTypeParameters.ts, 14, 30)) +>t : Symbol(t, Decl(contextualOuterTypeParameters.ts, 14, 45)) + + type isArray = (typeof t)[] extends string[] ? true : false; +>isArray : Symbol(isArray, Decl(contextualOuterTypeParameters.ts, 14, 49)) +>t : Symbol(t, Decl(contextualOuterTypeParameters.ts, 14, 45)) + + type IsObject = { x: typeof t } extends { x: string } ? true : false; +>IsObject : Symbol(IsObject, Decl(contextualOuterTypeParameters.ts, 15, 64)) +>x : Symbol(x, Decl(contextualOuterTypeParameters.ts, 16, 21)) +>t : Symbol(t, Decl(contextualOuterTypeParameters.ts, 14, 45)) +>x : Symbol(x, Decl(contextualOuterTypeParameters.ts, 16, 45)) + +}; + +const obj: { f: (x: T) => void } = { +>obj : Symbol(obj, Decl(contextualOuterTypeParameters.ts, 19, 5)) +>f : Symbol(f, Decl(contextualOuterTypeParameters.ts, 19, 12)) +>T : Symbol(T, Decl(contextualOuterTypeParameters.ts, 19, 17)) +>x : Symbol(x, Decl(contextualOuterTypeParameters.ts, 19, 20)) +>T : Symbol(T, Decl(contextualOuterTypeParameters.ts, 19, 17)) + + f(t) { +>f : Symbol(f, Decl(contextualOuterTypeParameters.ts, 19, 39)) +>t : Symbol(t, Decl(contextualOuterTypeParameters.ts, 20, 6)) + + type isArray = (typeof t)[] extends string[] ? true : false; +>isArray : Symbol(isArray, Decl(contextualOuterTypeParameters.ts, 20, 10)) +>t : Symbol(t, Decl(contextualOuterTypeParameters.ts, 20, 6)) + + type IsObject = { x: typeof t } extends { x: string } ? true : false; +>IsObject : Symbol(IsObject, Decl(contextualOuterTypeParameters.ts, 21, 68)) +>x : Symbol(x, Decl(contextualOuterTypeParameters.ts, 22, 25)) +>t : Symbol(t, Decl(contextualOuterTypeParameters.ts, 20, 6)) +>x : Symbol(x, Decl(contextualOuterTypeParameters.ts, 22, 49)) + } +}; + diff --git a/tests/baselines/reference/contextualOuterTypeParameters.types b/tests/baselines/reference/contextualOuterTypeParameters.types new file mode 100644 index 0000000000000..d18525d58c195 --- /dev/null +++ b/tests/baselines/reference/contextualOuterTypeParameters.types @@ -0,0 +1,165 @@ +//// [tests/cases/compiler/contextualOuterTypeParameters.ts] //// + +=== contextualOuterTypeParameters.ts === +// https://github.com/microsoft/TypeScript/issues/59450 + +declare function f(fun: (t: T) => void): void +>f : (fun: (t: T) => void) => void +> : ^ ^^ ^^^^^ +>fun : (t: T) => void +> : ^ ^^ ^^ ^^^^^ +>t : T +> : ^ + +f(t => { +>f(t => { type isArray = (typeof t)[] extends string[] ? true : false; type IsObject = { x: typeof t } extends { x: string } ? true : false;}) : void +> : ^^^^ +>f : (fun: (t: T) => void) => void +> : ^ ^^ ^^^^^ +>t => { type isArray = (typeof t)[] extends string[] ? true : false; type IsObject = { x: typeof t } extends { x: string } ? true : false;} : (t: T) => void +> : ^ ^^ ^^^^^^^^^^^^ +>t : T +> : ^ + + type isArray = (typeof t)[] extends string[] ? true : false; +>isArray : T[] extends string[] ? true : false +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>t : T +> : ^ +>true : true +> : ^^^^ +>false : false +> : ^^^^^ + + type IsObject = { x: typeof t } extends { x: string } ? true : false; +>IsObject : { x: typeof t; } extends { x: string; } ? true : false +> : ^^^^^ ^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^ +>x : T +> : ^ +>t : T +> : ^ +>x : string +> : ^^^^^^ +>true : true +> : ^^^^ +>false : false +> : ^^^^^ + +}); + +const fn1: (x: T) => void = t => { +>fn1 : (x: T) => void +> : ^ ^^ ^^ ^^^^^ +>x : T +> : ^ +>t => { type isArray = (typeof t)[] extends string[] ? true : false; type IsObject = { x: typeof t } extends { x: string } ? true : false;} : (t: T) => void +> : ^ ^^ ^^^^^^^^^^^^ +>t : T +> : ^ + + type isArray = (typeof t)[] extends string[] ? true : false; +>isArray : T[] extends string[] ? true : false +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>t : T +> : ^ +>true : true +> : ^^^^ +>false : false +> : ^^^^^ + + type IsObject = { x: typeof t } extends { x: string } ? true : false; +>IsObject : { x: typeof t; } extends { x: string; } ? true : false +> : ^^^^^ ^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^ +>x : T +> : ^ +>t : T +> : ^ +>x : string +> : ^^^^^^ +>true : true +> : ^^^^ +>false : false +> : ^^^^^ + +}; + +const fn2: (x: T) => void = function test(t) { +>fn2 : (x: T) => void +> : ^ ^^ ^^ ^^^^^ +>x : T +> : ^ +>function test(t) { type isArray = (typeof t)[] extends string[] ? true : false; type IsObject = { x: typeof t } extends { x: string } ? true : false;} : (t: T) => void +> : ^ ^^ ^^^^^^^^^^^^ +>test : (t: T) => void +> : ^ ^^ ^^^^^^^^^^^^ +>t : T +> : ^ + + type isArray = (typeof t)[] extends string[] ? true : false; +>isArray : T[] extends string[] ? true : false +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>t : T +> : ^ +>true : true +> : ^^^^ +>false : false +> : ^^^^^ + + type IsObject = { x: typeof t } extends { x: string } ? true : false; +>IsObject : { x: typeof t; } extends { x: string; } ? true : false +> : ^^^^^ ^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^ +>x : T +> : ^ +>t : T +> : ^ +>x : string +> : ^^^^^^ +>true : true +> : ^^^^ +>false : false +> : ^^^^^ + +}; + +const obj: { f: (x: T) => void } = { +>obj : { f: (x: T) => void; } +> : ^^^^^ ^^^ +>f : (x: T) => void +> : ^ ^^ ^^ ^^^^^ +>x : T +> : ^ +>{ f(t) { type isArray = (typeof t)[] extends string[] ? true : false; type IsObject = { x: typeof t } extends { x: string } ? true : false; }} : { f(t: T): void; } +> : ^^^^ ^^ ^^^^^^^^^^^^^ + + f(t) { +>f : (t: T) => void +> : ^ ^^ ^^^^^^^^^^^^ +>t : T +> : ^ + + type isArray = (typeof t)[] extends string[] ? true : false; +>isArray : T[] extends string[] ? true : false +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>t : T +> : ^ +>true : true +> : ^^^^ +>false : false +> : ^^^^^ + + type IsObject = { x: typeof t } extends { x: string } ? true : false; +>IsObject : { x: typeof t; } extends { x: string; } ? true : false +> : ^^^^^ ^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^ +>x : T +> : ^ +>t : T +> : ^ +>x : string +> : ^^^^^^ +>true : true +> : ^^^^ +>false : false +> : ^^^^^ + } +}; + diff --git a/tests/cases/compiler/contextualOuterTypeParameters.ts b/tests/cases/compiler/contextualOuterTypeParameters.ts new file mode 100644 index 0000000000000..3ed24f2a3c7d7 --- /dev/null +++ b/tests/cases/compiler/contextualOuterTypeParameters.ts @@ -0,0 +1,28 @@ +// @strict: true +// @noemit: true + +// https://github.com/microsoft/TypeScript/issues/59450 + +declare function f(fun: (t: T) => void): void + +f(t => { + type isArray = (typeof t)[] extends string[] ? true : false; + type IsObject = { x: typeof t } extends { x: string } ? true : false; +}); + +const fn1: (x: T) => void = t => { + type isArray = (typeof t)[] extends string[] ? true : false; + type IsObject = { x: typeof t } extends { x: string } ? true : false; +}; + +const fn2: (x: T) => void = function test(t) { + type isArray = (typeof t)[] extends string[] ? true : false; + type IsObject = { x: typeof t } extends { x: string } ? true : false; +}; + +const obj: { f: (x: T) => void } = { + f(t) { + type isArray = (typeof t)[] extends string[] ? true : false; + type IsObject = { x: typeof t } extends { x: string } ? true : false; + } +}; From 1bb1d2a6105a9a05a10409265f35cbe37d89b3e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20Burzy=C5=84ski?= Date: Fri, 9 Aug 2024 05:24:10 +0200 Subject: [PATCH 17/50] Fixed regression in generic signature instantiation with default type args (#59510) --- src/compiler/checker.ts | 8 +- ...nericCallInferenceConditionalType2.symbols | 85 ++++++++++++++++ ...genericCallInferenceConditionalType2.types | 98 +++++++++++++++++++ .../genericCallInferenceConditionalType2.ts | 29 ++++++ 4 files changed, 218 insertions(+), 2 deletions(-) create mode 100644 tests/baselines/reference/genericCallInferenceConditionalType2.symbols create mode 100644 tests/baselines/reference/genericCallInferenceConditionalType2.types create mode 100644 tests/cases/compiler/genericCallInferenceConditionalType2.ts diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 9ca49d3cdee54..4b8d44e62fc9f 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -16040,8 +16040,12 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { return instantiateSignature(signature, createSignatureTypeMapper(signature, typeArguments), /*eraseTypeParameters*/ true); } + function getTypeParametersForMapper(signature: Signature) { + return sameMap(signature.typeParameters, tp => tp.mapper ? instantiateType(tp, tp.mapper) : tp); + } + function createSignatureTypeMapper(signature: Signature, typeArguments: readonly Type[] | undefined): TypeMapper { - return createTypeMapper(sameMap(signature.typeParameters!, tp => tp.mapper ? instantiateType(tp, tp.mapper) : tp), typeArguments); + return createTypeMapper(getTypeParametersForMapper(signature)!, typeArguments); } function getErasedSignature(signature: Signature): Signature { @@ -34930,7 +34934,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { // Instantiate a generic signature in the context of a non-generic signature (section 3.8.5 in TypeScript spec) function instantiateSignatureInContextOf(signature: Signature, contextualSignature: Signature, inferenceContext?: InferenceContext, compareTypes?: TypeComparer): Signature { - const context = createInferenceContext(signature.typeParameters!, signature, InferenceFlags.None, compareTypes); + const context = createInferenceContext(getTypeParametersForMapper(signature)!, signature, InferenceFlags.None, compareTypes); // We clone the inferenceContext to avoid fixing. For example, when the source signature is (x: T) => T[] and // the contextual signature is (...args: A) => B, we want to infer the element type of A's constraint (say 'any') // for T but leave it possible to later infer '[any]' back to A. diff --git a/tests/baselines/reference/genericCallInferenceConditionalType2.symbols b/tests/baselines/reference/genericCallInferenceConditionalType2.symbols new file mode 100644 index 0000000000000..1f88ec594ad2b --- /dev/null +++ b/tests/baselines/reference/genericCallInferenceConditionalType2.symbols @@ -0,0 +1,85 @@ +//// [tests/cases/compiler/genericCallInferenceConditionalType2.ts] //// + +=== genericCallInferenceConditionalType2.ts === +// https://github.com/microsoft/TypeScript/issues/59490 + +type ComponentProps = T extends (props: infer P) => unknown ? P : never; +>ComponentProps : Symbol(ComponentProps, Decl(genericCallInferenceConditionalType2.ts, 0, 0)) +>T : Symbol(T, Decl(genericCallInferenceConditionalType2.ts, 2, 20)) +>T : Symbol(T, Decl(genericCallInferenceConditionalType2.ts, 2, 20)) +>props : Symbol(props, Decl(genericCallInferenceConditionalType2.ts, 2, 36)) +>P : Symbol(P, Decl(genericCallInferenceConditionalType2.ts, 2, 48)) +>P : Symbol(P, Decl(genericCallInferenceConditionalType2.ts, 2, 48)) + +declare function wrapComponent

( +>wrapComponent : Symbol(wrapComponent, Decl(genericCallInferenceConditionalType2.ts, 2, 75)) +>P : Symbol(P, Decl(genericCallInferenceConditionalType2.ts, 4, 31)) + + component: (props: P) => unknown, +>component : Symbol(component, Decl(genericCallInferenceConditionalType2.ts, 4, 34)) +>props : Symbol(props, Decl(genericCallInferenceConditionalType2.ts, 5, 14)) +>P : Symbol(P, Decl(genericCallInferenceConditionalType2.ts, 4, 31)) + +): (props: P) => unknown; +>props : Symbol(props, Decl(genericCallInferenceConditionalType2.ts, 6, 4)) +>P : Symbol(P, Decl(genericCallInferenceConditionalType2.ts, 4, 31)) + +const WrappedComponent = wrapComponent( +>WrappedComponent : Symbol(WrappedComponent, Decl(genericCallInferenceConditionalType2.ts, 8, 5)) +>wrapComponent : Symbol(wrapComponent, Decl(genericCallInferenceConditionalType2.ts, 2, 75)) + + (props: { +>T : Symbol(T, Decl(genericCallInferenceConditionalType2.ts, 9, 3)) +>props : Symbol(props, Decl(genericCallInferenceConditionalType2.ts, 9, 30)) + + as?: T | undefined; +>as : Symbol(as, Decl(genericCallInferenceConditionalType2.ts, 9, 38)) +>T : Symbol(T, Decl(genericCallInferenceConditionalType2.ts, 9, 3)) + + className?: string; +>className : Symbol(className, Decl(genericCallInferenceConditionalType2.ts, 10, 23)) + + }) => { + return null; + }, +); + +type RetrievedProps = ComponentProps; +>RetrievedProps : Symbol(RetrievedProps, Decl(genericCallInferenceConditionalType2.ts, 15, 2)) +>ComponentProps : Symbol(ComponentProps, Decl(genericCallInferenceConditionalType2.ts, 0, 0)) +>WrappedComponent : Symbol(WrappedComponent, Decl(genericCallInferenceConditionalType2.ts, 8, 5)) + +declare const f: (f: (x: T) => unknown) => (x: T) => unknown +>f : Symbol(f, Decl(genericCallInferenceConditionalType2.ts, 19, 13)) +>T : Symbol(T, Decl(genericCallInferenceConditionalType2.ts, 19, 18)) +>f : Symbol(f, Decl(genericCallInferenceConditionalType2.ts, 19, 21)) +>x : Symbol(x, Decl(genericCallInferenceConditionalType2.ts, 19, 25)) +>T : Symbol(T, Decl(genericCallInferenceConditionalType2.ts, 19, 18)) +>x : Symbol(x, Decl(genericCallInferenceConditionalType2.ts, 19, 47)) +>T : Symbol(T, Decl(genericCallInferenceConditionalType2.ts, 19, 18)) + +declare const g: (x: { foo: T }) => unknown +>g : Symbol(g, Decl(genericCallInferenceConditionalType2.ts, 20, 13)) +>T : Symbol(T, Decl(genericCallInferenceConditionalType2.ts, 20, 18)) +>x : Symbol(x, Decl(genericCallInferenceConditionalType2.ts, 20, 46)) +>foo : Symbol(foo, Decl(genericCallInferenceConditionalType2.ts, 20, 50)) +>T : Symbol(T, Decl(genericCallInferenceConditionalType2.ts, 20, 18)) + +const h = f(g) +>h : Symbol(h, Decl(genericCallInferenceConditionalType2.ts, 22, 5)) +>f : Symbol(f, Decl(genericCallInferenceConditionalType2.ts, 19, 13)) +>g : Symbol(g, Decl(genericCallInferenceConditionalType2.ts, 20, 13)) + +type FirstParameter = T extends (x: infer P) => unknown ? P : unknown +>FirstParameter : Symbol(FirstParameter, Decl(genericCallInferenceConditionalType2.ts, 22, 14)) +>T : Symbol(T, Decl(genericCallInferenceConditionalType2.ts, 24, 20)) +>T : Symbol(T, Decl(genericCallInferenceConditionalType2.ts, 24, 20)) +>x : Symbol(x, Decl(genericCallInferenceConditionalType2.ts, 24, 36)) +>P : Symbol(P, Decl(genericCallInferenceConditionalType2.ts, 24, 44)) +>P : Symbol(P, Decl(genericCallInferenceConditionalType2.ts, 24, 44)) + +type X = FirstParameter['foo'] +>X : Symbol(X, Decl(genericCallInferenceConditionalType2.ts, 24, 72)) +>FirstParameter : Symbol(FirstParameter, Decl(genericCallInferenceConditionalType2.ts, 22, 14)) +>h : Symbol(h, Decl(genericCallInferenceConditionalType2.ts, 22, 5)) + diff --git a/tests/baselines/reference/genericCallInferenceConditionalType2.types b/tests/baselines/reference/genericCallInferenceConditionalType2.types new file mode 100644 index 0000000000000..c9c143a7dd8d2 --- /dev/null +++ b/tests/baselines/reference/genericCallInferenceConditionalType2.types @@ -0,0 +1,98 @@ +//// [tests/cases/compiler/genericCallInferenceConditionalType2.ts] //// + +=== genericCallInferenceConditionalType2.ts === +// https://github.com/microsoft/TypeScript/issues/59490 + +type ComponentProps = T extends (props: infer P) => unknown ? P : never; +>ComponentProps : ComponentProps +> : ^^^^^^^^^^^^^^^^^ +>props : P +> : ^ + +declare function wrapComponent

( +>wrapComponent :

(component: (props: P) => unknown) => (props: P) => unknown +> : ^ ^^ ^^ ^^^^^ + + component: (props: P) => unknown, +>component : (props: P) => unknown +> : ^ ^^ ^^^^^ +>props : P +> : ^ + +): (props: P) => unknown; +>props : P +> : ^ + +const WrappedComponent = wrapComponent( +>WrappedComponent : (props: { as?: T | undefined; className?: string; }) => unknown +> : ^ ^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^ +>wrapComponent( (props: { as?: T | undefined; className?: string; }) => { return null; },) : (props: { as?: T | undefined; className?: string; }) => unknown +> : ^ ^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^ +>wrapComponent :

(component: (props: P) => unknown) => (props: P) => unknown +> : ^ ^^ ^^ ^^^^^ + + (props: { +>(props: { as?: T | undefined; className?: string; }) => { return null; } : (props: { as?: T | undefined; className?: string; }) => null +> : ^ ^^^^^^^^^ ^^^^^^^^^^^ ^^ ^^^^^^^^^ +>props : { as?: T | undefined; className?: string; } +> : ^^^^^^^ ^^^^^^^^^^^^^^ ^^^ + + as?: T | undefined; +>as : T | undefined +> : ^^^^^^^^^^^^^ + + className?: string; +>className : string | undefined +> : ^^^^^^^^^^^^^^^^^^ + + }) => { + return null; + }, +); + +type RetrievedProps = ComponentProps; +>RetrievedProps : { as?: string | undefined; className?: string; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ +>WrappedComponent : (props: { as?: T | undefined; className?: string; }) => unknown +> : ^ ^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^^^ + +declare const f: (f: (x: T) => unknown) => (x: T) => unknown +>f : (f: (x: T) => unknown) => (x: T) => unknown +> : ^ ^^ ^^ ^^^^^ +>f : (x: T) => unknown +> : ^ ^^ ^^^^^ +>x : T +> : ^ +>x : T +> : ^ + +declare const g: (x: { foo: T }) => unknown +>g : (x: { foo: T; }) => unknown +> : ^ ^^^^^^^^^ ^^^^^^^^^^^ ^^ ^^^^^ +>x : { foo: T; } +> : ^^^^^^^ ^^^ +>foo : T +> : ^ + +const h = f(g) +>h : (x: { foo: T; }) => unknown +> : ^ ^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^ ^^^^^^^^ +>f(g) : (x: { foo: T; }) => unknown +> : ^ ^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^ ^^^^^^^^ +>f : (f: (x: T) => unknown) => (x: T) => unknown +> : ^ ^^ ^^ ^^^^^ +>g : (x: { foo: T; }) => unknown +> : ^ ^^^^^^^^^ ^^^^^^^^^^^ ^^ ^^^^^ + +type FirstParameter = T extends (x: infer P) => unknown ? P : unknown +>FirstParameter : FirstParameter +> : ^^^^^^^^^^^^^^^^^ +>x : P +> : ^ + +type X = FirstParameter['foo'] +>X : unknown +> : ^^^^^^^ +>h : (x: { foo: T; }) => unknown +> : ^ ^^^^^^^^^ ^^^^^^^^^^^ ^^^^^^^^^ ^^^^^^^^ + diff --git a/tests/cases/compiler/genericCallInferenceConditionalType2.ts b/tests/cases/compiler/genericCallInferenceConditionalType2.ts new file mode 100644 index 0000000000000..38afcf985efa6 --- /dev/null +++ b/tests/cases/compiler/genericCallInferenceConditionalType2.ts @@ -0,0 +1,29 @@ +// @strict: true +// @noEmit: true + +// https://github.com/microsoft/TypeScript/issues/59490 + +type ComponentProps = T extends (props: infer P) => unknown ? P : never; + +declare function wrapComponent

( + component: (props: P) => unknown, +): (props: P) => unknown; + +const WrappedComponent = wrapComponent( + (props: { + as?: T | undefined; + className?: string; + }) => { + return null; + }, +); + +type RetrievedProps = ComponentProps; + +declare const f: (f: (x: T) => unknown) => (x: T) => unknown +declare const g: (x: { foo: T }) => unknown + +const h = f(g) + +type FirstParameter = T extends (x: infer P) => unknown ? P : unknown +type X = FirstParameter['foo'] From 09caaf60aa4101813bedc41f21ad84318aadd29a Mon Sep 17 00:00:00 2001 From: Andrew Branch Date: Fri, 9 Aug 2024 11:12:18 -0700 Subject: [PATCH 18/50] Add `autoImportSpecifierExcludeRegexes` preference (#59543) --- src/compiler/moduleSpecifiers.ts | 72 ++++++++++++++++--- src/compiler/types.ts | 1 + src/services/completions.ts | 11 +-- tests/baselines/reference/api/typescript.d.ts | 1 + .../autoImportSpecifierExcludeRegexes1.ts | 61 ++++++++++++++++ .../autoImportSpecifierExcludeRegexes2.ts | 25 +++++++ .../autoImportSpecifierExcludeRegexes3.ts | 25 +++++++ tests/cases/fourslash/fourslash.ts | 1 + 8 files changed, 183 insertions(+), 14 deletions(-) create mode 100644 tests/cases/fourslash/autoImportSpecifierExcludeRegexes1.ts create mode 100644 tests/cases/fourslash/autoImportSpecifierExcludeRegexes2.ts create mode 100644 tests/cases/fourslash/autoImportSpecifierExcludeRegexes3.ts diff --git a/src/compiler/moduleSpecifiers.ts b/src/compiler/moduleSpecifiers.ts index f380ff56a02f6..f193aeb6784f1 100644 --- a/src/compiler/moduleSpecifiers.ts +++ b/src/compiler/moduleSpecifiers.ts @@ -83,6 +83,7 @@ import { mapDefined, MapLike, matchPatternOrExact, + memoizeOne, min, ModuleDeclaration, ModuleKind, @@ -127,6 +128,34 @@ import { UserPreferences, } from "./_namespaces/ts.js"; +const stringToRegex = memoizeOne((pattern: string) => { + try { + let slash = pattern.indexOf("/"); + if (slash !== 0) { + // No leading slash, treat as a pattern + return new RegExp(pattern); + } + const lastSlash = pattern.lastIndexOf("/"); + if (slash === lastSlash) { + // Only one slash, treat as a pattern + return new RegExp(pattern); + } + while ((slash = pattern.indexOf("/", slash + 1)) !== lastSlash) { + if (pattern[slash - 1] !== "\\") { + // Unescaped middle slash, treat as a pattern + return new RegExp(pattern); + } + } + // Only case-insensitive and unicode flags make sense + const flags = pattern.substring(lastSlash + 1).replace(/[^iu]/g, ""); + pattern = pattern.substring(1, lastSlash); + return new RegExp(pattern, flags); + } + catch { + return undefined; + } +}); + // Used by importFixes, getEditsForFileRename, and declaration emit to synthesize import module specifiers. /** @internal */ @@ -144,11 +173,12 @@ export interface ModuleSpecifierPreferences { * @param syntaxImpliedNodeFormat Used when the import syntax implies ESM or CJS irrespective of the mode of the file. */ getAllowedEndingsInPreferredOrder(syntaxImpliedNodeFormat?: ResolutionMode): ModuleSpecifierEnding[]; + readonly excludeRegexes?: readonly string[]; } /** @internal */ export function getModuleSpecifierPreferences( - { importModuleSpecifierPreference, importModuleSpecifierEnding }: UserPreferences, + { importModuleSpecifierPreference, importModuleSpecifierEnding, autoImportSpecifierExcludeRegexes }: UserPreferences, host: Pick, compilerOptions: CompilerOptions, importingSourceFile: Pick, @@ -156,6 +186,7 @@ export function getModuleSpecifierPreferences( ): ModuleSpecifierPreferences { const filePreferredEnding = getPreferredEnding(); return { + excludeRegexes: autoImportSpecifierExcludeRegexes, relativePreference: oldImportSpecifier !== undefined ? (isExternalModuleNameRelative(oldImportSpecifier) ? RelativePreference.Relative : RelativePreference.NonRelative) : @@ -362,7 +393,13 @@ export function getModuleSpecifiersWithCacheInfo( ): ModuleSpecifierResult { let computedWithoutCache = false; const ambient = tryGetModuleNameFromAmbientModule(moduleSymbol, checker); - if (ambient) return { kind: "ambient", moduleSpecifiers: [ambient], computedWithoutCache }; + if (ambient) { + return { + kind: "ambient", + moduleSpecifiers: !(forAutoImport && isExcludedByRegex(ambient, userPreferences.autoImportSpecifierExcludeRegexes)) ? [ambient] : emptyArray, + computedWithoutCache, + }; + } // eslint-disable-next-line prefer-const let [kind, specifiers, moduleSourceFile, modulePaths, cache] = tryGetModuleSpecifiersFromCacheWorker( @@ -459,11 +496,13 @@ function computeModuleSpecifiers( const specifier = modulePath.isInNodeModules ? tryGetModuleNameAsNodeModule(modulePath, info, importingSourceFile, host, compilerOptions, userPreferences, /*packageNameOnly*/ undefined, options.overrideImportMode) : undefined; - nodeModulesSpecifiers = append(nodeModulesSpecifiers, specifier); - if (specifier && modulePath.isRedirect) { - // If we got a specifier for a redirect, it was a bare package specifier (e.g. "@foo/bar", - // not "@foo/bar/path/to/file"). No other specifier will be this good, so stop looking. - return { kind: "node_modules", moduleSpecifiers: nodeModulesSpecifiers!, computedWithoutCache: true }; + if (specifier && !(forAutoImport && isExcludedByRegex(specifier, preferences.excludeRegexes))) { + nodeModulesSpecifiers = append(nodeModulesSpecifiers, specifier); + if (modulePath.isRedirect) { + // If we got a specifier for a redirect, it was a bare package specifier (e.g. "@foo/bar", + // not "@foo/bar/path/to/file"). No other specifier will be this good, so stop looking. + return { kind: "node_modules", moduleSpecifiers: nodeModulesSpecifiers, computedWithoutCache: true }; + } } if (!specifier) { @@ -476,7 +515,7 @@ function computeModuleSpecifiers( preferences, /*pathsOnly*/ modulePath.isRedirect, ); - if (!local) { + if (!local || forAutoImport && isExcludedByRegex(local, preferences.excludeRegexes)) { continue; } if (modulePath.isRedirect) { @@ -512,7 +551,11 @@ function computeModuleSpecifiers( return pathsSpecifiers?.length ? { kind: "paths", moduleSpecifiers: pathsSpecifiers, computedWithoutCache: true } : redirectPathsSpecifiers?.length ? { kind: "redirect", moduleSpecifiers: redirectPathsSpecifiers, computedWithoutCache: true } : nodeModulesSpecifiers?.length ? { kind: "node_modules", moduleSpecifiers: nodeModulesSpecifiers, computedWithoutCache: true } : - { kind: "relative", moduleSpecifiers: Debug.checkDefined(relativeSpecifiers), computedWithoutCache: true }; + { kind: "relative", moduleSpecifiers: relativeSpecifiers ?? emptyArray, computedWithoutCache: true }; +} + +function isExcludedByRegex(moduleSpecifier: string, excludeRegexes: readonly string[] | undefined): boolean { + return some(excludeRegexes, pattern => !!stringToRegex(pattern)?.test(moduleSpecifier)); } interface Info { @@ -536,7 +579,7 @@ function getInfo(importingSourceFileName: string, host: ModuleSpecifierResolutio function getLocalModuleSpecifier(moduleFileName: string, info: Info, compilerOptions: CompilerOptions, host: ModuleSpecifierResolutionHost, importMode: ResolutionMode, preferences: ModuleSpecifierPreferences): string; function getLocalModuleSpecifier(moduleFileName: string, info: Info, compilerOptions: CompilerOptions, host: ModuleSpecifierResolutionHost, importMode: ResolutionMode, preferences: ModuleSpecifierPreferences, pathsOnly?: boolean): string | undefined; -function getLocalModuleSpecifier(moduleFileName: string, info: Info, compilerOptions: CompilerOptions, host: ModuleSpecifierResolutionHost, importMode: ResolutionMode, { getAllowedEndingsInPreferredOrder: getAllowedEndingsInPrefererredOrder, relativePreference }: ModuleSpecifierPreferences, pathsOnly?: boolean): string | undefined { +function getLocalModuleSpecifier(moduleFileName: string, info: Info, compilerOptions: CompilerOptions, host: ModuleSpecifierResolutionHost, importMode: ResolutionMode, { getAllowedEndingsInPreferredOrder: getAllowedEndingsInPrefererredOrder, relativePreference, excludeRegexes }: ModuleSpecifierPreferences, pathsOnly?: boolean): string | undefined { const { baseUrl, paths, rootDirs } = compilerOptions; if (pathsOnly && !paths) { return undefined; @@ -568,6 +611,15 @@ function getLocalModuleSpecifier(moduleFileName: string, info: Info, compilerOpt return relativePath; } + const relativeIsExcluded = isExcludedByRegex(relativePath, excludeRegexes); + const nonRelativeIsExcluded = isExcludedByRegex(maybeNonRelative, excludeRegexes); + if (!relativeIsExcluded && nonRelativeIsExcluded) { + return relativePath; + } + if (relativeIsExcluded && !nonRelativeIsExcluded) { + return maybeNonRelative; + } + if (relativePreference === RelativePreference.NonRelative && !pathIsRelative(maybeNonRelative)) { return maybeNonRelative; } diff --git a/src/compiler/types.ts b/src/compiler/types.ts index 3f5306cec0383..fb3022c5500c9 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -10260,6 +10260,7 @@ export interface UserPreferences { readonly interactiveInlayHints?: boolean; readonly allowRenameOfImportPath?: boolean; readonly autoImportFileExcludePatterns?: string[]; + readonly autoImportSpecifierExcludeRegexes?: string[]; readonly preferTypeOnlyAutoImports?: boolean; /** * Indicates whether imports should be organized in a case-insensitive manner. diff --git a/src/services/completions.ts b/src/services/completions.ts index ee67c03331563..ac88e4bf668a5 100644 --- a/src/services/completions.ts +++ b/src/services/completions.ts @@ -84,7 +84,6 @@ import { getEffectiveBaseTypeNode, getEffectiveModifierFlags, getEffectiveTypeAnnotationNode, - getEmitModuleResolutionKind, getEmitScriptTarget, getEscapedTextOfIdentifierOrLiteral, getEscapedTextOfJsxAttributeName, @@ -106,6 +105,7 @@ import { getPropertyNameForPropertyNameNode, getQuotePreference, getReplacementSpanForContextToken, + getResolvePackageJsonExports, getRootDeclaration, getSourceFileOfModule, getSwitchedType, @@ -301,7 +301,6 @@ import { ModuleDeclaration, moduleExportNameTextEscaped, ModuleReference, - moduleResolutionSupportsPackageJsonExportsAndImports, NamedImportBindings, newCaseClauseTracker, Node, @@ -629,12 +628,16 @@ function resolvingModuleSpecifiers( cb: (context: ModuleSpecifierResolutionContext) => TReturn, ): TReturn { const start = timestamp(); - // Under `--moduleResolution nodenext`, we have to resolve module specifiers up front, because + // Under `--moduleResolution nodenext` or `bundler`, we have to resolve module specifiers up front, because // package.json exports can mean we *can't* resolve a module specifier (that doesn't include a // relative path into node_modules), and we want to filter those completions out entirely. // Import statement completions always need specifier resolution because the module specifier is // part of their `insertText`, not the `codeActions` creating edits away from the cursor. - const needsFullResolution = isForImportStatementCompletion || moduleResolutionSupportsPackageJsonExportsAndImports(getEmitModuleResolutionKind(program.getCompilerOptions())); + // Finally, `autoImportSpecifierExcludeRegexes` necessitates eagerly resolving module specifiers + // because completion items are being explcitly filtered out by module specifier. + const needsFullResolution = isForImportStatementCompletion + || getResolvePackageJsonExports(program.getCompilerOptions()) + || preferences.autoImportSpecifierExcludeRegexes?.length; let skippedAny = false; let ambientCount = 0; let resolvedCount = 0; diff --git a/tests/baselines/reference/api/typescript.d.ts b/tests/baselines/reference/api/typescript.d.ts index 0e82d5ba67891..0a0d0a2f8dd95 100644 --- a/tests/baselines/reference/api/typescript.d.ts +++ b/tests/baselines/reference/api/typescript.d.ts @@ -8241,6 +8241,7 @@ declare namespace ts { readonly interactiveInlayHints?: boolean; readonly allowRenameOfImportPath?: boolean; readonly autoImportFileExcludePatterns?: string[]; + readonly autoImportSpecifierExcludeRegexes?: string[]; readonly preferTypeOnlyAutoImports?: boolean; /** * Indicates whether imports should be organized in a case-insensitive manner. diff --git a/tests/cases/fourslash/autoImportSpecifierExcludeRegexes1.ts b/tests/cases/fourslash/autoImportSpecifierExcludeRegexes1.ts new file mode 100644 index 0000000000000..f3eff409abf54 --- /dev/null +++ b/tests/cases/fourslash/autoImportSpecifierExcludeRegexes1.ts @@ -0,0 +1,61 @@ +/// + +// @module: preserve + +// @Filename: /node_modules/lib/index.d.ts +//// declare module "ambient" { +//// export const x: number; +//// } +//// declare module "ambient/utils" { +//// export const x: number; +//// } + +// @Filename: /index.ts +//// x/**/ + +verify.importFixModuleSpecifiers("", ["ambient", "ambient/utils"]); +verify.importFixModuleSpecifiers("", ["ambient"], { autoImportSpecifierExcludeRegexes: ["utils"] }); +// case sensitive, no match +verify.importFixModuleSpecifiers("", ["ambient", "ambient/utils"], { autoImportSpecifierExcludeRegexes: ["/UTILS/"] }); +// case insensitive flag given +verify.importFixModuleSpecifiers("", ["ambient"], { autoImportSpecifierExcludeRegexes: ["/UTILS/i"] }); +// invalid due to unescaped slash, treated as pattern +verify.importFixModuleSpecifiers("", ["ambient", "ambient/utils"], { autoImportSpecifierExcludeRegexes: ["/ambient/utils/"] }); +verify.importFixModuleSpecifiers("", ["ambient"], { autoImportSpecifierExcludeRegexes: ["/ambient\\/utils/"] }); +// no trailing slash, treated as pattern, slash doesn't need to be escaped +verify.importFixModuleSpecifiers("", ["ambient"], { autoImportSpecifierExcludeRegexes: ["/.*?$"]}); +// no leading slash, treated as pattern, slash doesn't need to be escaped +verify.importFixModuleSpecifiers("", ["ambient"], { autoImportSpecifierExcludeRegexes: ["^ambient/"] }); +verify.importFixModuleSpecifiers("", ["ambient/utils"], { autoImportSpecifierExcludeRegexes: ["ambient$"] }); +verify.importFixModuleSpecifiers("", ["ambient", "ambient/utils"], { autoImportSpecifierExcludeRegexes: ["oops("] }); + +verify.completions({ + marker: "", + includes: [{ + name: "x", + source: "ambient", + sourceDisplay: "ambient", + hasAction: true, + sortText: completion.SortText.AutoImportSuggestions + }, { + name: "x", + source: "ambient/utils", + sourceDisplay: "ambient/utils", + hasAction: true, + sortText: completion.SortText.AutoImportSuggestions + }], + preferences: { + includeCompletionsForModuleExports: true, + allowIncompleteCompletions: true + } +}); + +verify.completions({ + marker: "", + excludes: ["ambient/utils"], + preferences: { + includeCompletionsForModuleExports: true, + allowIncompleteCompletions: true, + autoImportSpecifierExcludeRegexes: ["utils"] + }, +}) \ No newline at end of file diff --git a/tests/cases/fourslash/autoImportSpecifierExcludeRegexes2.ts b/tests/cases/fourslash/autoImportSpecifierExcludeRegexes2.ts new file mode 100644 index 0000000000000..37ab15c5c36b6 --- /dev/null +++ b/tests/cases/fourslash/autoImportSpecifierExcludeRegexes2.ts @@ -0,0 +1,25 @@ +/// + +// @Filename: /tsconfig.json +//// { +//// "compilerOptions": { +//// "module": "preserve", +//// "paths": { +//// "@app/*": ["./src/*"] +//// } +//// } +//// } + +// @Filename: /src/utils.ts +//// export function add(a: number, b: number) {} + +// @Filename: /src/index.ts +//// add/**/ + +verify.importFixModuleSpecifiers("", ["./utils"]); +verify.importFixModuleSpecifiers("", ["@app/utils"], { autoImportSpecifierExcludeRegexes: ["^\\./"] }); + +verify.importFixModuleSpecifiers("", ["@app/utils"], { importModuleSpecifierPreference: "non-relative" }); +verify.importFixModuleSpecifiers("", ["./utils"], { importModuleSpecifierPreference: "non-relative", autoImportSpecifierExcludeRegexes: ["^@app/"] }); + +verify.importFixModuleSpecifiers("", [], { autoImportSpecifierExcludeRegexes: ["utils"] }); diff --git a/tests/cases/fourslash/autoImportSpecifierExcludeRegexes3.ts b/tests/cases/fourslash/autoImportSpecifierExcludeRegexes3.ts new file mode 100644 index 0000000000000..c4cc27c871b34 --- /dev/null +++ b/tests/cases/fourslash/autoImportSpecifierExcludeRegexes3.ts @@ -0,0 +1,25 @@ +/// + +// @module: preserve + +// @Filename: /node_modules/pkg/package.json +//// { +//// "name": "pkg", +//// "version": "1.0.0", +//// "exports": { +//// ".": "./index.js", +//// "./utils": "./utils.js" +//// } +//// } + +// @Filename: /node_modules/pkg/utils.d.ts +//// export function add(a: number, b: number) {} + +// @Filename: /node_modules/pkg/index.d.ts +//// export * from "./utils"; + +// @Filename: /src/index.ts +//// add/**/ + +verify.importFixModuleSpecifiers("", ["pkg", "pkg/utils"]); +verify.importFixModuleSpecifiers("", ["pkg/utils"], { autoImportSpecifierExcludeRegexes: ["^pkg$"] }); diff --git a/tests/cases/fourslash/fourslash.ts b/tests/cases/fourslash/fourslash.ts index c13f27a807ac4..6fa6907a9c0a6 100644 --- a/tests/cases/fourslash/fourslash.ts +++ b/tests/cases/fourslash/fourslash.ts @@ -686,6 +686,7 @@ declare namespace FourSlashInterface { readonly providePrefixAndSuffixTextForRename?: boolean; readonly allowRenameOfImportPath?: boolean; readonly autoImportFileExcludePatterns?: readonly string[]; + readonly autoImportSpecifierExcludeRegexes?: readonly string[]; readonly preferTypeOnlyAutoImports?: boolean; readonly organizeImportsIgnoreCase?: "auto" | boolean; readonly organizeImportsCollation?: "unicode" | "ordinal"; From f3b118ed21794eb893c967e28737d2d5f6a08e78 Mon Sep 17 00:00:00 2001 From: Sung Ye In <66503450+syi0808@users.noreply.github.com> Date: Sat, 10 Aug 2024 05:14:30 +0900 Subject: [PATCH 19/50] fix: filtering promise properties in object literal completion (#59316) --- src/services/completions.ts | 12 ++++++++-- ...mpletionsPropertiesWithPromiseUnionType.ts | 24 +++++++++++++++++++ 2 files changed, 34 insertions(+), 2 deletions(-) create mode 100644 tests/cases/fourslash/completionsPropertiesWithPromiseUnionType.ts diff --git a/src/services/completions.ts b/src/services/completions.ts index ac88e4bf668a5..18fc3e8e5dd59 100644 --- a/src/services/completions.ts +++ b/src/services/completions.ts @@ -5527,9 +5527,17 @@ function getJsDocTagAtPosition(node: Node, position: number): JSDocTag | undefin /** @internal */ export function getPropertiesForObjectExpression(contextualType: Type, completionsType: Type | undefined, obj: ObjectLiteralExpression | JsxAttributes, checker: TypeChecker): Symbol[] { const hasCompletionsType = completionsType && completionsType !== contextualType; + const promiseFilteredContextualType = checker.getUnionType( + filter( + contextualType.flags & TypeFlags.Union ? + (contextualType as UnionType).types : + [contextualType], + t => !checker.getPromisedTypeOfPromise(t), + ), + ); const type = hasCompletionsType && !(completionsType.flags & TypeFlags.AnyOrUnknown) - ? checker.getUnionType([contextualType, completionsType]) - : contextualType; + ? checker.getUnionType([promiseFilteredContextualType, completionsType]) + : promiseFilteredContextualType; const properties = getApparentProperties(type, obj, checker); return type.isClass() && containsNonPublicProperties(properties) ? [] : diff --git a/tests/cases/fourslash/completionsPropertiesWithPromiseUnionType.ts b/tests/cases/fourslash/completionsPropertiesWithPromiseUnionType.ts new file mode 100644 index 0000000000000..529160b6589b9 --- /dev/null +++ b/tests/cases/fourslash/completionsPropertiesWithPromiseUnionType.ts @@ -0,0 +1,24 @@ +/// +// @strict: true + +//// type MyType = { +//// foo: string; +//// }; + +//// function fakeTest(cb: () => MyType | Promise) {} + +//// fakeTest(() => { +//// return { +//// /*a*/ +//// }; +//// }); + + +verify.completions( + { + marker: ['a'], + exact: [ + { name: 'foo', kind: 'property' }, + ] + } +); \ No newline at end of file From 4b12d82b6bb4c8e2ad7df3219ae7282e360e62f9 Mon Sep 17 00:00:00 2001 From: Andrew Branch Date: Fri, 9 Aug 2024 13:48:13 -0700 Subject: [PATCH 20/50] Fix auto import file extensions with package.json imports wildcards (#59564) --- src/compiler/moduleSpecifiers.ts | 72 +++++++++++++++---- src/compiler/utilities.ts | 7 ++ ...mportingTsExtensionsPackageJsonImports1.ts | 41 +++++++++++ ...mportingTsExtensionsPackageJsonImports2.ts | 34 +++++++++ ...ImportPackageJsonImportsCaseSensitivity.ts | 20 ++++++ 5 files changed, 161 insertions(+), 13 deletions(-) create mode 100644 tests/cases/fourslash/autoImportAllowImportingTsExtensionsPackageJsonImports1.ts create mode 100644 tests/cases/fourslash/autoImportAllowImportingTsExtensionsPackageJsonImports2.ts create mode 100644 tests/cases/fourslash/autoImportPackageJsonImportsCaseSensitivity.ts diff --git a/src/compiler/moduleSpecifiers.ts b/src/compiler/moduleSpecifiers.ts index f193aeb6784f1..4b7cbf2bae274 100644 --- a/src/compiler/moduleSpecifiers.ts +++ b/src/compiler/moduleSpecifiers.ts @@ -4,6 +4,7 @@ import { AmbientModuleDeclaration, append, arrayFrom, + changeFullExtension, CharacterCodes, combinePaths, compareBooleans, @@ -59,6 +60,7 @@ import { getSupportedExtensions, getTemporaryModuleResolutionState, getTextOfIdentifierOrLiteral, + hasImplementationTSFileExtension, hasJSFileExtension, hasTSFileExtension, hostGetCanonicalFileName, @@ -599,7 +601,16 @@ function getLocalModuleSpecifier(moduleFileName: string, info: Info, compilerOpt return pathsOnly ? undefined : relativePath; } - const fromPackageJsonImports = pathsOnly ? undefined : tryGetModuleNameFromPackageJsonImports(moduleFileName, sourceDirectory, compilerOptions, host, importMode); + const fromPackageJsonImports = pathsOnly + ? undefined + : tryGetModuleNameFromPackageJsonImports( + moduleFileName, + sourceDirectory, + compilerOptions, + host, + importMode, + prefersTsExtension(allowedEndings), + ); const fromPaths = pathsOnly || fromPackageJsonImports === undefined ? paths && tryGetModuleNameFromPaths(relativeToBaseUrl, paths, allowedEndings, host, compilerOptions) : undefined; if (pathsOnly) { @@ -997,7 +1008,18 @@ const enum MatchingMode { Pattern, } -function tryGetModuleNameFromExportsOrImports(options: CompilerOptions, host: ModuleSpecifierResolutionHost, targetFilePath: string, packageDirectory: string, packageName: string, exports: unknown, conditions: string[], mode: MatchingMode, isImports: boolean): { moduleFileToTry: string; } | undefined { +function tryGetModuleNameFromExportsOrImports( + options: CompilerOptions, + host: ModuleSpecifierResolutionHost, + targetFilePath: string, + packageDirectory: string, + packageName: string, + exports: unknown, + conditions: string[], + mode: MatchingMode, + isImports: boolean, + preferTsExtension: boolean, +): { moduleFileToTry: string; } | undefined { if (typeof exports === "string") { const ignoreCase = !hostUsesCaseSensitiveFileNames(host); const getCommonSourceDirectory = () => host.getCommonSourceDirectory(); @@ -1006,6 +1028,7 @@ function tryGetModuleNameFromExportsOrImports(options: CompilerOptions, host: Mo const pathOrPattern = getNormalizedAbsolutePath(combinePaths(packageDirectory, exports), /*currentDirectory*/ undefined); const extensionSwappedTarget = hasTSFileExtension(targetFilePath) ? removeFileExtension(targetFilePath) + tryGetJSExtensionForFile(targetFilePath, options) : undefined; + const canTryTsExtension = preferTsExtension && hasImplementationTSFileExtension(targetFilePath); switch (mode) { case MatchingMode.Exact: @@ -1019,11 +1042,15 @@ function tryGetModuleNameFromExportsOrImports(options: CompilerOptions, host: Mo } break; case MatchingMode.Directory: + if (canTryTsExtension && containsPath(targetFilePath, pathOrPattern, ignoreCase)) { + const fragment = getRelativePathFromDirectory(pathOrPattern, targetFilePath, /*ignoreCase*/ false); + return { moduleFileToTry: getNormalizedAbsolutePath(combinePaths(combinePaths(packageName, exports), fragment), /*currentDirectory*/ undefined) }; + } if (extensionSwappedTarget && containsPath(pathOrPattern, extensionSwappedTarget, ignoreCase)) { const fragment = getRelativePathFromDirectory(pathOrPattern, extensionSwappedTarget, /*ignoreCase*/ false); return { moduleFileToTry: getNormalizedAbsolutePath(combinePaths(combinePaths(packageName, exports), fragment), /*currentDirectory*/ undefined) }; } - if (containsPath(pathOrPattern, targetFilePath, ignoreCase)) { + if (!canTryTsExtension && containsPath(pathOrPattern, targetFilePath, ignoreCase)) { const fragment = getRelativePathFromDirectory(pathOrPattern, targetFilePath, /*ignoreCase*/ false); return { moduleFileToTry: getNormalizedAbsolutePath(combinePaths(combinePaths(packageName, exports), fragment), /*currentDirectory*/ undefined) }; } @@ -1032,7 +1059,7 @@ function tryGetModuleNameFromExportsOrImports(options: CompilerOptions, host: Mo return { moduleFileToTry: combinePaths(packageName, fragment) }; } if (declarationFile && containsPath(pathOrPattern, declarationFile, ignoreCase)) { - const fragment = getRelativePathFromDirectory(pathOrPattern, declarationFile, /*ignoreCase*/ false); + const fragment = changeFullExtension(getRelativePathFromDirectory(pathOrPattern, declarationFile, /*ignoreCase*/ false), getJSExtensionForFile(declarationFile, options)); return { moduleFileToTry: combinePaths(packageName, fragment) }; } break; @@ -1040,11 +1067,15 @@ function tryGetModuleNameFromExportsOrImports(options: CompilerOptions, host: Mo const starPos = pathOrPattern.indexOf("*"); const leadingSlice = pathOrPattern.slice(0, starPos); const trailingSlice = pathOrPattern.slice(starPos + 1); + if (canTryTsExtension && startsWith(targetFilePath, leadingSlice, ignoreCase) && endsWith(targetFilePath, trailingSlice, ignoreCase)) { + const starReplacement = targetFilePath.slice(leadingSlice.length, targetFilePath.length - trailingSlice.length); + return { moduleFileToTry: replaceFirstStar(packageName, starReplacement) }; + } if (extensionSwappedTarget && startsWith(extensionSwappedTarget, leadingSlice, ignoreCase) && endsWith(extensionSwappedTarget, trailingSlice, ignoreCase)) { const starReplacement = extensionSwappedTarget.slice(leadingSlice.length, extensionSwappedTarget.length - trailingSlice.length); return { moduleFileToTry: replaceFirstStar(packageName, starReplacement) }; } - if (startsWith(targetFilePath, leadingSlice, ignoreCase) && endsWith(targetFilePath, trailingSlice, ignoreCase)) { + if (!canTryTsExtension && startsWith(targetFilePath, leadingSlice, ignoreCase) && endsWith(targetFilePath, trailingSlice, ignoreCase)) { const starReplacement = targetFilePath.slice(leadingSlice.length, targetFilePath.length - trailingSlice.length); return { moduleFileToTry: replaceFirstStar(packageName, starReplacement) }; } @@ -1054,20 +1085,22 @@ function tryGetModuleNameFromExportsOrImports(options: CompilerOptions, host: Mo } if (declarationFile && startsWith(declarationFile, leadingSlice, ignoreCase) && endsWith(declarationFile, trailingSlice, ignoreCase)) { const starReplacement = declarationFile.slice(leadingSlice.length, declarationFile.length - trailingSlice.length); - return { moduleFileToTry: replaceFirstStar(packageName, starReplacement) }; + const substituted = replaceFirstStar(packageName, starReplacement); + const jsExtension = tryGetJSExtensionForFile(declarationFile, options); + return jsExtension ? { moduleFileToTry: changeFullExtension(substituted, jsExtension) } : undefined; } break; } } else if (Array.isArray(exports)) { - return forEach(exports, e => tryGetModuleNameFromExportsOrImports(options, host, targetFilePath, packageDirectory, packageName, e, conditions, mode, isImports)); + return forEach(exports, e => tryGetModuleNameFromExportsOrImports(options, host, targetFilePath, packageDirectory, packageName, e, conditions, mode, isImports, preferTsExtension)); } else if (typeof exports === "object" && exports !== null) { // eslint-disable-line no-restricted-syntax // conditional mapping for (const key of getOwnKeys(exports as MapLike)) { if (key === "default" || conditions.indexOf(key) >= 0 || isApplicableVersionedTypesKey(conditions, key)) { const subTarget = (exports as MapLike)[key]; - const result = tryGetModuleNameFromExportsOrImports(options, host, targetFilePath, packageDirectory, packageName, subTarget, conditions, mode, isImports); + const result = tryGetModuleNameFromExportsOrImports(options, host, targetFilePath, packageDirectory, packageName, subTarget, conditions, mode, isImports, preferTsExtension); if (result) { return result; } @@ -1089,13 +1122,13 @@ function tryGetModuleNameFromExports(options: CompilerOptions, host: ModuleSpeci const mode = endsWith(k, "/") ? MatchingMode.Directory : k.includes("*") ? MatchingMode.Pattern : MatchingMode.Exact; - return tryGetModuleNameFromExportsOrImports(options, host, targetFilePath, packageDirectory, subPackageName, (exports as MapLike)[k], conditions, mode, /*isImports*/ false); + return tryGetModuleNameFromExportsOrImports(options, host, targetFilePath, packageDirectory, subPackageName, (exports as MapLike)[k], conditions, mode, /*isImports*/ false, /*preferTsExtension*/ false); }); } - return tryGetModuleNameFromExportsOrImports(options, host, targetFilePath, packageDirectory, packageName, exports, conditions, MatchingMode.Exact, /*isImports*/ false); + return tryGetModuleNameFromExportsOrImports(options, host, targetFilePath, packageDirectory, packageName, exports, conditions, MatchingMode.Exact, /*isImports*/ false, /*preferTsExtension*/ false); } -function tryGetModuleNameFromPackageJsonImports(moduleFileName: string, sourceDirectory: string, options: CompilerOptions, host: ModuleSpecifierResolutionHost, importMode: ResolutionMode) { +function tryGetModuleNameFromPackageJsonImports(moduleFileName: string, sourceDirectory: string, options: CompilerOptions, host: ModuleSpecifierResolutionHost, importMode: ResolutionMode, preferTsExtension: boolean) { if (!host.readFile || !getResolvePackageJsonImports(options)) { return undefined; } @@ -1120,7 +1153,7 @@ function tryGetModuleNameFromPackageJsonImports(moduleFileName: string, sourceDi const mode = endsWith(k, "/") ? MatchingMode.Directory : k.includes("*") ? MatchingMode.Pattern : MatchingMode.Exact; - return tryGetModuleNameFromExportsOrImports(options, host, moduleFileName, ancestorDirectoryWithPackageJson, k, (imports as MapLike)[k], conditions, mode, /*isImports*/ true); + return tryGetModuleNameFromExportsOrImports(options, host, moduleFileName, ancestorDirectoryWithPackageJson, k, (imports as MapLike)[k], conditions, mode, /*isImports*/ true, preferTsExtension); })?.moduleFileToTry; } @@ -1221,7 +1254,15 @@ function tryGetModuleNameAsNodeModule({ path, isRedirect }: ModulePath, { getCan const packageName = getPackageNameFromTypesPackageName(nodeModulesDirectoryName); const conditions = getConditions(options, importMode); const fromExports = packageJsonContent?.exports - ? tryGetModuleNameFromExports(options, host, path, packageRootPath, packageName, packageJsonContent.exports, conditions) + ? tryGetModuleNameFromExports( + options, + host, + path, + packageRootPath, + packageName, + packageJsonContent.exports, + conditions, + ) : undefined; if (fromExports) { return { ...fromExports, verbatimFromExports: true }; @@ -1411,3 +1452,8 @@ function isPathRelativeToParent(path: string): boolean { function getDefaultResolutionModeForFile(file: Pick, host: Pick, compilerOptions: CompilerOptions) { return isFullSourceFile(file) ? host.getDefaultResolutionModeForFile(file) : getDefaultResolutionModeForFileWorker(file, compilerOptions); } + +function prefersTsExtension(allowedEndings: readonly ModuleSpecifierEnding[]) { + const tsPriority = allowedEndings.indexOf(ModuleSpecifierEnding.TsExtension); + return tsPriority > -1 && tsPriority < allowedEndings.indexOf(ModuleSpecifierEnding.JsExtension); +} diff --git a/src/compiler/utilities.ts b/src/compiler/utilities.ts index b7600682b6ca2..2c647c697c4cf 100644 --- a/src/compiler/utilities.ts +++ b/src/compiler/utilities.ts @@ -265,6 +265,7 @@ import { isConstructorDeclaration, isConstTypeReference, isDeclaration, + isDeclarationFileName, isDecorator, isElementAccessExpression, isEnumDeclaration, @@ -9785,6 +9786,12 @@ export function hasTSFileExtension(fileName: string): boolean { return some(supportedTSExtensionsFlat, extension => fileExtensionIs(fileName, extension)); } +/** @internal */ +export function hasImplementationTSFileExtension(fileName: string): boolean { + return some(supportedTSImplementationExtensions, extension => fileExtensionIs(fileName, extension)) + && !isDeclarationFileName(fileName); +} + /** * @internal * Corresponds to UserPreferences#importPathEnding diff --git a/tests/cases/fourslash/autoImportAllowImportingTsExtensionsPackageJsonImports1.ts b/tests/cases/fourslash/autoImportAllowImportingTsExtensionsPackageJsonImports1.ts new file mode 100644 index 0000000000000..8db0bdb37d552 --- /dev/null +++ b/tests/cases/fourslash/autoImportAllowImportingTsExtensionsPackageJsonImports1.ts @@ -0,0 +1,41 @@ +/// + +// @module: nodenext +// @allowImportingTsExtensions: true + +// @Filename: /node_modules/pkg/package.json +//// { +//// "name": "pkg", +//// "type": "module", +//// "exports": { +//// "./*": { +//// "types": "./types/*", +//// "default": "./dist/*" +//// } +//// } +//// } + +// @Filename: /node_modules/pkg/types/external.d.ts +//// export declare function external(name: string): any; + +// @Filename: /package.json +//// { +//// "name": "self", +//// "type": "module", +//// "imports": { +//// "#*": "./src/*" +//// }, +//// "dependencies": { +//// "pkg": "*" +//// } +//// } + +// @Filename: /src/add.ts +//// export function add(a: number, b: number) {} + +// @Filename: /src/index.ts +//// add/*imports*/; +//// external/*exports*/; + +verify.importFixModuleSpecifiers("imports", ["#add.ts"]); +verify.importFixModuleSpecifiers("exports", ["pkg/external.js"]); diff --git a/tests/cases/fourslash/autoImportAllowImportingTsExtensionsPackageJsonImports2.ts b/tests/cases/fourslash/autoImportAllowImportingTsExtensionsPackageJsonImports2.ts new file mode 100644 index 0000000000000..c5e9938747782 --- /dev/null +++ b/tests/cases/fourslash/autoImportAllowImportingTsExtensionsPackageJsonImports2.ts @@ -0,0 +1,34 @@ +/// + +// @Filename: /tsconfig.json +//// { +//// "compilerOptions": { +//// "module": "nodenext", +//// "allowImportingTsExtensions": true, +//// "rootDir": "src", +//// "outDir": "dist", +//// "declarationDir": "types", +//// "declaration": true +//// } +//// } + +// @Filename: /package.json +//// { +//// "name": "self", +//// "type": "module", +//// "imports": { +//// "#*": { +//// "types": "./types/*", +//// "default": "./dist/*" +//// } +//// } +//// } + +// @Filename: /src/add.ts +//// export function add(a: number, b: number) {} + +// @Filename: /src/index.ts +//// add/*imports*/; +//// external/*exports*/; + +verify.importFixModuleSpecifiers("imports", ["#add.js"]); diff --git a/tests/cases/fourslash/autoImportPackageJsonImportsCaseSensitivity.ts b/tests/cases/fourslash/autoImportPackageJsonImportsCaseSensitivity.ts new file mode 100644 index 0000000000000..79d62ec33ced0 --- /dev/null +++ b/tests/cases/fourslash/autoImportPackageJsonImportsCaseSensitivity.ts @@ -0,0 +1,20 @@ +/// + +// @module: nodenext +// @allowImportingTsExtensions: true + +// @Filename: /package.json +//// { +//// "type": "module", +//// "imports": { +//// "#src/*": "./SRC/*" +//// } +//// } + +// @Filename: /src/add.ts +//// export function add(a: number, b: number) {} + +// @Filename: /src/index.ts +//// add/*imports*/; + +verify.importFixModuleSpecifiers("imports", ["#src/add.ts"], { importModuleSpecifierPreference: "non-relative" }); \ No newline at end of file From 2937728ddbfa11b1223846d4b04f3d9a289781c1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 12 Aug 2024 10:18:27 -0700 Subject: [PATCH 21/50] Bump the github-actions group across 1 directory with 2 updates (#59598) Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/ci.yml | 4 ++-- .github/workflows/codeql.yml | 6 +++--- .github/workflows/release-branch-artifact.yaml | 2 +- .github/workflows/scorecard.yml | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3d2350a1a1a40..83b197fdfaae3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -90,7 +90,7 @@ jobs: run: npm test -- --no-lint --coverage - name: Upload coverage artifact - uses: actions/upload-artifact@0b2256b8c012f0828dc542b3febcab082c67f72b # v4.3.4 + uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a # v4.3.6 with: name: coverage path: coverage @@ -334,7 +334,7 @@ jobs: - name: Upload baseline diff artifact if: ${{ failure() && steps.check-baselines.conclusion == 'failure' }} - uses: actions/upload-artifact@0b2256b8c012f0828dc542b3febcab082c67f72b # v4.3.4 + uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a # v4.3.6 with: name: fix_baselines.patch path: fix_baselines.patch diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 109abe69c3d55..2fcae13aa779f 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -46,7 +46,7 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@afb54ba388a7dca6ecae48f608c4ff05ff4cc77a # v3.25.15 + uses: github/codeql-action/init@eb055d739abdc2e8de2e5f4ba1a8b246daa779aa # v3.26.0 with: config-file: ./.github/codeql/codeql-configuration.yml # Override language selection by uncommenting this and choosing your languages @@ -56,7 +56,7 @@ jobs: # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). # If this step fails, then you should remove it and run the build manually (see below). - name: Autobuild - uses: github/codeql-action/autobuild@afb54ba388a7dca6ecae48f608c4ff05ff4cc77a # v3.25.15 + uses: github/codeql-action/autobuild@eb055d739abdc2e8de2e5f4ba1a8b246daa779aa # v3.26.0 # ℹ️ Command-line programs to run using the OS shell. # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun @@ -70,4 +70,4 @@ jobs: # make release - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@afb54ba388a7dca6ecae48f608c4ff05ff4cc77a # v3.25.15 + uses: github/codeql-action/analyze@eb055d739abdc2e8de2e5f4ba1a8b246daa779aa # v3.26.0 diff --git a/.github/workflows/release-branch-artifact.yaml b/.github/workflows/release-branch-artifact.yaml index bf2ab33cbaf1f..927c5d104954b 100644 --- a/.github/workflows/release-branch-artifact.yaml +++ b/.github/workflows/release-branch-artifact.yaml @@ -44,7 +44,7 @@ jobs: npm pack ./ mv typescript-*.tgz typescript.tgz - name: Upload built tarfile - uses: actions/upload-artifact@0b2256b8c012f0828dc542b3febcab082c67f72b # v4.3.4 + uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a # v4.3.6 with: name: tgz path: typescript.tgz diff --git a/.github/workflows/scorecard.yml b/.github/workflows/scorecard.yml index 12f97ba49e1f4..d4ca0e23c19d1 100644 --- a/.github/workflows/scorecard.yml +++ b/.github/workflows/scorecard.yml @@ -47,7 +47,7 @@ jobs: # Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF # format to the repository Actions tab. - name: 'Upload artifact' - uses: actions/upload-artifact@0b2256b8c012f0828dc542b3febcab082c67f72b # v4.3.4 + uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a # v4.3.6 with: name: SARIF file path: results.sarif @@ -55,6 +55,6 @@ jobs: # Upload the results to GitHub's code scanning dashboard. - name: 'Upload to code-scanning' - uses: github/codeql-action/upload-sarif@afb54ba388a7dca6ecae48f608c4ff05ff4cc77a # v3.25.15 + uses: github/codeql-action/upload-sarif@eb055d739abdc2e8de2e5f4ba1a8b246daa779aa # v3.26.0 with: sarif_file: results.sarif From f04672842b4e8531d96dddf8d7d741402c1ea569 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20Burzy=C5=84ski?= Date: Mon, 12 Aug 2024 23:36:03 +0200 Subject: [PATCH 22/50] Fixed completion crashes related to `JSDocImportTag` (#59527) --- src/compiler/binder.ts | 5 ++- ...larationAttributesEmptyModuleSpecifier1.ts | 17 ++++++++++ ...larationAttributesErrorModuleSpecifier1.ts | 17 ++++++++++ ...mportTagAttributesEmptyModuleSpecifier1.ts | 19 ++++++++++++ ...mportTagAttributesErrorModuleSpecifier1.ts | 19 ++++++++++++ ...ionsJSDocImportTagEmptyModuleSpecifier1.ts | 18 +++++++++++ .../fourslash/completionsJSDocNoCrash1.ts | 31 +++++++++++++++++++ .../fourslash/completionsJSDocNoCrash2.ts | 29 +++++++++++++++++ 8 files changed, 154 insertions(+), 1 deletion(-) create mode 100644 tests/cases/fourslash/completionsImportDeclarationAttributesEmptyModuleSpecifier1.ts create mode 100644 tests/cases/fourslash/completionsImportDeclarationAttributesErrorModuleSpecifier1.ts create mode 100644 tests/cases/fourslash/completionsJSDocImportTagAttributesEmptyModuleSpecifier1.ts create mode 100644 tests/cases/fourslash/completionsJSDocImportTagAttributesErrorModuleSpecifier1.ts create mode 100644 tests/cases/fourslash/completionsJSDocImportTagEmptyModuleSpecifier1.ts create mode 100644 tests/cases/fourslash/completionsJSDocNoCrash1.ts create mode 100644 tests/cases/fourslash/completionsJSDocNoCrash2.ts diff --git a/src/compiler/binder.ts b/src/compiler/binder.ts index 5c94dde5cc597..96c6e08f0f5ac 100644 --- a/src/compiler/binder.ts +++ b/src/compiler/binder.ts @@ -1191,10 +1191,10 @@ function createBinder(): (file: SourceFile, options: CompilerOptions) => void { case SyntaxKind.JSDocEnumTag: bindJSDocTypeAlias(node as JSDocTypedefTag | JSDocCallbackTag | JSDocEnumTag); break; - // In source files and blocks, bind functions first to match hoisting that occurs at runtime case SyntaxKind.JSDocImportTag: bindJSDocImportTag(node as JSDocImportTag); break; + // In source files and blocks, bind functions first to match hoisting that occurs at runtime case SyntaxKind.SourceFile: { bindEachFunctionsFirst((node as SourceFile).statements); bind((node as SourceFile).endOfFileToken); @@ -2105,7 +2105,10 @@ function createBinder(): (file: SourceFile, options: CompilerOptions) => void { } function bindJSDocImportTag(node: JSDocImportTag) { + // don't bind the importClause yet; that's delayed until bindJSDocImports bind(node.tagName); + bind(node.moduleSpecifier); + bind(node.attributes); if (typeof node.comment !== "string") { bindEach(node.comment); diff --git a/tests/cases/fourslash/completionsImportDeclarationAttributesEmptyModuleSpecifier1.ts b/tests/cases/fourslash/completionsImportDeclarationAttributesEmptyModuleSpecifier1.ts new file mode 100644 index 0000000000000..f083815dfcb59 --- /dev/null +++ b/tests/cases/fourslash/completionsImportDeclarationAttributesEmptyModuleSpecifier1.ts @@ -0,0 +1,17 @@ +/// + +// @strict: true + +// @filename: global.d.ts +//// interface ImportAttributes { +//// type: "json"; +//// } + +// @filename: index.ts +//// import * as ns from "" with { type: "/**/" }; + +verify.completions({ + marker: "", + exact: ["json"], + isNewIdentifierLocation: false, +}); diff --git a/tests/cases/fourslash/completionsImportDeclarationAttributesErrorModuleSpecifier1.ts b/tests/cases/fourslash/completionsImportDeclarationAttributesErrorModuleSpecifier1.ts new file mode 100644 index 0000000000000..bbad49da51516 --- /dev/null +++ b/tests/cases/fourslash/completionsImportDeclarationAttributesErrorModuleSpecifier1.ts @@ -0,0 +1,17 @@ +/// + +// @strict: true + +// @filename: global.d.ts +//// interface ImportAttributes { +//// type: "json"; +//// } + +// @filename: index.ts +//// import * as ns from () with { type: "/**/" }; + +verify.completions({ + marker: "", + exact: ["json"], + isNewIdentifierLocation: false, +}); diff --git a/tests/cases/fourslash/completionsJSDocImportTagAttributesEmptyModuleSpecifier1.ts b/tests/cases/fourslash/completionsJSDocImportTagAttributesEmptyModuleSpecifier1.ts new file mode 100644 index 0000000000000..ad23ca3b933f7 --- /dev/null +++ b/tests/cases/fourslash/completionsJSDocImportTagAttributesEmptyModuleSpecifier1.ts @@ -0,0 +1,19 @@ +/// + +// @strict: true +// @checkJs: true +// @allowJs: true + +// @filename: global.d.ts +//// interface ImportAttributes { +//// type: "json"; +//// } + +// @filename: index.js +//// /** @import * as ns from "" with { type: "/**/" } */ + +verify.completions({ + marker: "", + exact: ["json"], + isNewIdentifierLocation: false, +}); diff --git a/tests/cases/fourslash/completionsJSDocImportTagAttributesErrorModuleSpecifier1.ts b/tests/cases/fourslash/completionsJSDocImportTagAttributesErrorModuleSpecifier1.ts new file mode 100644 index 0000000000000..56825e73e3fe9 --- /dev/null +++ b/tests/cases/fourslash/completionsJSDocImportTagAttributesErrorModuleSpecifier1.ts @@ -0,0 +1,19 @@ +/// + +// @strict: true +// @checkJs: true +// @allowJs: true + +// @filename: global.d.ts +//// interface ImportAttributes { +//// type: "json"; +//// } + +// @filename: index.js +//// /** @import * as ns from () with { type: "/**/" } */ + +verify.completions({ + marker: "", + exact: ["json"], + isNewIdentifierLocation: false, +}); diff --git a/tests/cases/fourslash/completionsJSDocImportTagEmptyModuleSpecifier1.ts b/tests/cases/fourslash/completionsJSDocImportTagEmptyModuleSpecifier1.ts new file mode 100644 index 0000000000000..ccbe067406eb7 --- /dev/null +++ b/tests/cases/fourslash/completionsJSDocImportTagEmptyModuleSpecifier1.ts @@ -0,0 +1,18 @@ +/// + +// @strict: true +// @checkJs: true +// @allowJs: true +// @moduleResolution: nodenext + +// @filename: node_modules/pkg/index.d.ts +//// export type MyUnion = string | number; + +// @filename: index.js +//// /** @import { MyUnion } from "/**/" */ + +verify.completions({ + marker: "", + exact: ["pkg"], + isNewIdentifierLocation: true, +}); diff --git a/tests/cases/fourslash/completionsJSDocNoCrash1.ts b/tests/cases/fourslash/completionsJSDocNoCrash1.ts new file mode 100644 index 0000000000000..a5aa659a9e0b1 --- /dev/null +++ b/tests/cases/fourslash/completionsJSDocNoCrash1.ts @@ -0,0 +1,31 @@ +/// + +// @strict: true +// @checkJs: true +// @allowJs: true + +// @filename: index.js +//// /** +//// * @example +//// +//// @import url(//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap-glyphicons.css); +//// +//// +//// +//// .animate-show.ng-hide-add.ng-hide-add-active, +//// .animate-show.ng-hide-remove.ng-hide-remove-active { +//// transition:all linear 0./**/5s; +//// } +//// +//// +//// */ +//// var ngShowDirective = ['$animate', function($animate) {}]; + +verify.completions({ + marker: "", + includes: ["url"], + isNewIdentifierLocation: true, + preferences: { + includeCompletionsWithInsertText: true + } +}); diff --git a/tests/cases/fourslash/completionsJSDocNoCrash2.ts b/tests/cases/fourslash/completionsJSDocNoCrash2.ts new file mode 100644 index 0000000000000..e37d4452245d4 --- /dev/null +++ b/tests/cases/fourslash/completionsJSDocNoCrash2.ts @@ -0,0 +1,29 @@ +/// + +// @strict: true + +// @filename: index.ts +//// /** +//// * @example +//// +//// @import url(//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap-glyphicons.css); +//// +//// +//// +//// .animate-show.ng-hide-add.ng-hide-add-active, +//// .animate-show.ng-hide-remove.ng-hide-remove-active { +//// transition:all linear 0./**/5s; +//// } +//// +//// +//// */ +//// var ngShowDirective = ['$animate', function($animate) {}]; + +verify.completions({ + marker: "", + exact: completion.globalTypes, + isNewIdentifierLocation: false, + preferences: { + includeCompletionsWithInsertText: true + } +}); From 7049af5f4f872aed60a20a7276951c395ca212a1 Mon Sep 17 00:00:00 2001 From: "Oleksandr T." Date: Tue, 13 Aug 2024 01:42:09 +0300 Subject: [PATCH 23/50] fix(58166): Class parameter property with initializer before required property emits non-nullable parameter for declaration emit (#58177) --- src/compiler/checker.ts | 21 ++++++++------ src/compiler/expressionToTypeNode.ts | 2 +- src/compiler/transformers/declarations.ts | 2 +- .../transformers/declarations/diagnostics.ts | 2 +- src/compiler/types.ts | 6 ++-- .../fixMissingTypeAnnotationOnExports.ts | 5 ++-- .../parameterPropertyInConstructor4.js | 28 +++++++++++++++++++ .../parameterPropertyInConstructor4.symbols | 12 ++++++++ .../parameterPropertyInConstructor4.types | 17 +++++++++++ .../parameterPropertyInConstructor4.ts | 7 +++++ 10 files changed, 85 insertions(+), 17 deletions(-) create mode 100644 tests/baselines/reference/parameterPropertyInConstructor4.js create mode 100644 tests/baselines/reference/parameterPropertyInConstructor4.symbols create mode 100644 tests/baselines/reference/parameterPropertyInConstructor4.types create mode 100644 tests/cases/compiler/parameterPropertyInConstructor4.ts diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 4b8d44e62fc9f..ea28b2780268c 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -8316,7 +8316,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { * @param symbol - The symbol is used both to find an existing annotation if declaration is not provided, and to determine if `unique symbol` should be printed */ function serializeTypeForDeclaration(context: NodeBuilderContext, declaration: Declaration | undefined, type: Type, symbol: Symbol) { - const addUndefinedForParameter = declaration && (isParameter(declaration) || isJSDocParameterTag(declaration)) && requiresAddingImplicitUndefined(declaration); + const addUndefinedForParameter = declaration && (isParameter(declaration) || isJSDocParameterTag(declaration)) && requiresAddingImplicitUndefined(declaration, context.enclosingDeclaration); const enclosingDeclaration = context.enclosingDeclaration; const restoreFlags = saveRestoreFlags(context); if (declaration && hasInferredType(declaration) && !(context.internalFlags & InternalNodeBuilderFlags.NoSyntacticPrinter)) { @@ -49591,16 +49591,19 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { const type = getTypeFromTypeNode(typeNode); return containsUndefinedType(type); } - function requiresAddingImplicitUndefined(parameter: ParameterDeclaration | JSDocParameterTag) { - return (isRequiredInitializedParameter(parameter) || isOptionalUninitializedParameterProperty(parameter)) && !declaredParameterTypeContainsUndefined(parameter); + + function requiresAddingImplicitUndefined(parameter: ParameterDeclaration | JSDocParameterTag, enclosingDeclaration: Node | undefined) { + return (isRequiredInitializedParameter(parameter, enclosingDeclaration) || isOptionalUninitializedParameterProperty(parameter)) && !declaredParameterTypeContainsUndefined(parameter); } - function isRequiredInitializedParameter(parameter: ParameterDeclaration | JSDocParameterTag): boolean { - return !!strictNullChecks && - !isOptionalParameter(parameter) && - !isJSDocParameterTag(parameter) && - !!parameter.initializer && - !hasSyntacticModifier(parameter, ModifierFlags.ParameterPropertyModifier); + function isRequiredInitializedParameter(parameter: ParameterDeclaration | JSDocParameterTag, enclosingDeclaration: Node | undefined): boolean { + if (!strictNullChecks || isOptionalParameter(parameter) || isJSDocParameterTag(parameter) || !parameter.initializer) { + return false; + } + if (hasSyntacticModifier(parameter, ModifierFlags.ParameterPropertyModifier)) { + return !!enclosingDeclaration && isFunctionLikeDeclaration(enclosingDeclaration); + } + return true; } function isOptionalUninitializedParameterProperty(parameter: ParameterDeclaration | JSDocParameterTag) { diff --git a/src/compiler/expressionToTypeNode.ts b/src/compiler/expressionToTypeNode.ts index 48f8434137bc9..047611a5d45f7 100644 --- a/src/compiler/expressionToTypeNode.ts +++ b/src/compiler/expressionToTypeNode.ts @@ -178,7 +178,7 @@ export function createSyntacticTypeNodeBuilder(options: CompilerOptions, resolve return typeFromAccessor(parent, context); } const declaredType = getEffectiveTypeAnnotationNode(node); - const addUndefined = resolver.requiresAddingImplicitUndefined(node); + const addUndefined = resolver.requiresAddingImplicitUndefined(node, context.enclosingDeclaration); let resultType; if (declaredType) { resultType = serializeExistingTypeAnnotation(declaredType, addUndefined); diff --git a/src/compiler/transformers/declarations.ts b/src/compiler/transformers/declarations.ts index 536e0cf5d9c22..b12c3acf84c3e 100644 --- a/src/compiler/transformers/declarations.ts +++ b/src/compiler/transformers/declarations.ts @@ -680,7 +680,7 @@ export function transformDeclarations(context: TransformationContext) { // Literal const declarations will have an initializer ensured rather than a type return; } - const shouldAddImplicitUndefined = node.kind === SyntaxKind.Parameter && resolver.requiresAddingImplicitUndefined(node); + const shouldAddImplicitUndefined = node.kind === SyntaxKind.Parameter && resolver.requiresAddingImplicitUndefined(node, enclosingDeclaration); if (type && !shouldAddImplicitUndefined) { return visitNode(type, visitDeclarationSubtree, isTypeNode); } diff --git a/src/compiler/transformers/declarations/diagnostics.ts b/src/compiler/transformers/declarations/diagnostics.ts index 22bb998ae60bf..d7a6c54f5eaf0 100644 --- a/src/compiler/transformers/declarations/diagnostics.ts +++ b/src/compiler/transformers/declarations/diagnostics.ts @@ -767,7 +767,7 @@ export function createGetIsolatedDeclarationErrors(resolver: EmitResolver) { if (isSetAccessor(node.parent)) { return createAccessorTypeError(node.parent); } - const addUndefined = resolver.requiresAddingImplicitUndefined(node); + const addUndefined = resolver.requiresAddingImplicitUndefined(node, /*enclosingDeclaration*/ undefined); if (!addUndefined && node.initializer) { return createExpressionError(node.initializer); } diff --git a/src/compiler/types.ts b/src/compiler/types.ts index fb3022c5500c9..4f75397d59fef 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -5293,7 +5293,7 @@ export interface TypeChecker { /** @internal */ getDiagnostics(sourceFile?: SourceFile, cancellationToken?: CancellationToken, nodesToCheck?: Node[]): Diagnostic[]; /** @internal */ getGlobalDiagnostics(): Diagnostic[]; /** @internal */ getEmitResolver(sourceFile?: SourceFile, cancellationToken?: CancellationToken, forceDts?: boolean): EmitResolver; - /** @internal */ requiresAddingImplicitUndefined(parameter: ParameterDeclaration | JSDocParameterTag): boolean; + /** @internal */ requiresAddingImplicitUndefined(parameter: ParameterDeclaration | JSDocParameterTag, enclosingDeclaration: Node | undefined): boolean; /** @internal */ getNodeCount(): number; /** @internal */ getIdentifierCount(): number; @@ -5814,7 +5814,7 @@ export interface EmitResolver { collectLinkedAliases(node: ModuleExportName, setVisibility?: boolean): Node[] | undefined; markLinkedReferences(node: Node): void; isImplementationOfOverload(node: SignatureDeclaration): boolean | undefined; - requiresAddingImplicitUndefined(node: ParameterDeclaration): boolean; + requiresAddingImplicitUndefined(node: ParameterDeclaration, enclosingDeclaration: Node | undefined): boolean; isExpandoFunctionDeclaration(node: FunctionDeclaration | VariableDeclaration): boolean; getPropertiesOfContainerFunction(node: Declaration): Symbol[]; createTypeOfDeclaration(declaration: AccessorDeclaration | VariableLikeDeclaration | PropertyAccessExpression | ElementAccessExpression | BinaryExpression, enclosingDeclaration: Node, flags: NodeBuilderFlags, internalFlags: InternalNodeBuilderFlags, tracker: SymbolTracker): TypeNode | undefined; @@ -10378,6 +10378,6 @@ export interface SyntacticTypeNodeBuilderResolver { isExpandoFunctionDeclaration(name: FunctionDeclaration | VariableDeclaration): boolean; getAllAccessorDeclarations(declaration: AccessorDeclaration): AllAccessorDeclarations; isEntityNameVisible(entityName: EntityNameOrEntityNameExpression, enclosingDeclaration: Node, shouldComputeAliasToMakeVisible?: boolean): SymbolVisibilityResult; - requiresAddingImplicitUndefined(parameter: ParameterDeclaration | JSDocParameterTag): boolean; + requiresAddingImplicitUndefined(parameter: ParameterDeclaration | JSDocParameterTag, enclosingDeclaration: Node | undefined): boolean; isDefinitelyReferenceToGlobalSymbolObject(node: Node): boolean; } diff --git a/src/services/codefixes/fixMissingTypeAnnotationOnExports.ts b/src/services/codefixes/fixMissingTypeAnnotationOnExports.ts index 0b84557078237..4d961dfa979cc 100644 --- a/src/services/codefixes/fixMissingTypeAnnotationOnExports.ts +++ b/src/services/codefixes/fixMissingTypeAnnotationOnExports.ts @@ -914,11 +914,12 @@ function withContext( type = widenedType; } - if (isParameter(node) && typeChecker.requiresAddingImplicitUndefined(node)) { + const enclosingDeclaration = findAncestor(node, isDeclaration) ?? sourceFile; + if (isParameter(node) && typeChecker.requiresAddingImplicitUndefined(node, enclosingDeclaration)) { type = typeChecker.getUnionType([typeChecker.getUndefinedType(), type], UnionReduction.None); } return { - typeNode: typeToTypeNode(type, findAncestor(node, isDeclaration) ?? sourceFile, getFlags(type)), + typeNode: typeToTypeNode(type, enclosingDeclaration, getFlags(type)), mutatedTarget: false, }; diff --git a/tests/baselines/reference/parameterPropertyInConstructor4.js b/tests/baselines/reference/parameterPropertyInConstructor4.js new file mode 100644 index 0000000000000..d4183c73937a7 --- /dev/null +++ b/tests/baselines/reference/parameterPropertyInConstructor4.js @@ -0,0 +1,28 @@ +//// [tests/cases/compiler/parameterPropertyInConstructor4.ts] //// + +//// [parameterPropertyInConstructor4.ts] +export class C { + constructor(public a: number[] = [], b: number) { + } +} + + +//// [parameterPropertyInConstructor4.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.C = void 0; +var C = /** @class */ (function () { + function C(a, b) { + if (a === void 0) { a = []; } + this.a = a; + } + return C; +}()); +exports.C = C; + + +//// [parameterPropertyInConstructor4.d.ts] +export declare class C { + a: number[]; + constructor(a: number[] | undefined, b: number); +} diff --git a/tests/baselines/reference/parameterPropertyInConstructor4.symbols b/tests/baselines/reference/parameterPropertyInConstructor4.symbols new file mode 100644 index 0000000000000..b0517c309a2f0 --- /dev/null +++ b/tests/baselines/reference/parameterPropertyInConstructor4.symbols @@ -0,0 +1,12 @@ +//// [tests/cases/compiler/parameterPropertyInConstructor4.ts] //// + +=== parameterPropertyInConstructor4.ts === +export class C { +>C : Symbol(C, Decl(parameterPropertyInConstructor4.ts, 0, 0)) + + constructor(public a: number[] = [], b: number) { +>a : Symbol(C.a, Decl(parameterPropertyInConstructor4.ts, 1, 16)) +>b : Symbol(b, Decl(parameterPropertyInConstructor4.ts, 1, 40)) + } +} + diff --git a/tests/baselines/reference/parameterPropertyInConstructor4.types b/tests/baselines/reference/parameterPropertyInConstructor4.types new file mode 100644 index 0000000000000..d193fc8d29e40 --- /dev/null +++ b/tests/baselines/reference/parameterPropertyInConstructor4.types @@ -0,0 +1,17 @@ +//// [tests/cases/compiler/parameterPropertyInConstructor4.ts] //// + +=== parameterPropertyInConstructor4.ts === +export class C { +>C : C +> : ^ + + constructor(public a: number[] = [], b: number) { +>a : number[] +> : ^^^^^^^^ +>[] : never[] +> : ^^^^^^^ +>b : number +> : ^^^^^^ + } +} + diff --git a/tests/cases/compiler/parameterPropertyInConstructor4.ts b/tests/cases/compiler/parameterPropertyInConstructor4.ts new file mode 100644 index 0000000000000..8787f7ecf422e --- /dev/null +++ b/tests/cases/compiler/parameterPropertyInConstructor4.ts @@ -0,0 +1,7 @@ +// @declaration: true +// @strict: true + +export class C { + constructor(public a: number[] = [], b: number) { + } +} From 01a874a8baf6a5fc0c9b47d3902221311671b01c Mon Sep 17 00:00:00 2001 From: Jake Bailey <5341706+jakebailey@users.noreply.github.com> Date: Mon, 12 Aug 2024 17:13:24 -0700 Subject: [PATCH 24/50] Update to eslint v9, typescript-eslint v8 (#59518) --- eslint.config.mjs | 18 +- package-lock.json | 1374 ++++++++--------- package.json | 21 +- scripts/eslint/tests/argument-trivia.test.cjs | 7 +- scripts/eslint/tests/debug-assert.test.cjs | 7 +- scripts/eslint/tests/js-extensions.cjs | 7 +- scripts/eslint/tests/no-in-operator.test.cjs | 7 +- scripts/eslint/tests/no-keywords.test.cjs | 7 +- .../tests/only-arrow-functions.test.cjs | 7 +- scripts/eslint/tests/support/RuleTester.cjs | 7 +- scripts/failed-tests.cjs | 2 +- scripts/find-unused-diganostic-messages.mjs | 2 +- src/compiler/sys.ts | 14 +- src/compiler/utilitiesPublic.ts | 2 +- src/compiler/watchUtilities.ts | 2 +- src/harness/harnessUtils.ts | 2 +- src/tsserver/nodeServer.ts | 4 +- src/typingsInstaller/nodeTypingsInstaller.ts | 2 +- 18 files changed, 687 insertions(+), 805 deletions(-) diff --git a/eslint.config.mjs b/eslint.config.mjs index f2566c3b631f8..cadd9bb1f38f3 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -123,24 +123,15 @@ export default tseslint.config( "@typescript-eslint/no-var-requires": "off", "@typescript-eslint/no-empty-interface": "off", "@typescript-eslint/no-explicit-any": "off", - "@typescript-eslint/ban-types": [ - "error", - { - extendDefaults: true, - types: { - // This is theoretically good, but ts-eslint appears to mistake our declaration of Symbol for the global Symbol type. - // See: https://github.com/typescript-eslint/typescript-eslint/issues/7306 - "Symbol": false, - "{}": false, // {} is a totally useful and valid type. - }, - }, - ], + "@typescript-eslint/no-empty-object-type": "off", // {} is a totally useful and valid type. + "@typescript-eslint/no-require-imports": "off", "@typescript-eslint/no-unused-vars": [ "warn", { // Ignore: (solely underscores | starting with exactly one underscore) argsIgnorePattern: "^(_+$|_[^_])", varsIgnorePattern: "^(_+$|_[^_])", + // Not setting an ignore pattern for caught errors; those can always be safely removed. }, ], "@typescript-eslint/no-inferrable-types": "off", @@ -239,7 +230,8 @@ export default tseslint.config( "@typescript-eslint/interface-name-prefix": "off", "@typescript-eslint/prefer-function-type": "off", "@typescript-eslint/unified-signatures": "off", - "@typescript-eslint/ban-types": "off", + "@typescript-eslint/no-unsafe-function-type": "off", + "@typescript-eslint/no-wrapper-object-types": "off", "@typescript-eslint/no-unused-vars": "off", // scripts/eslint/rules diff --git a/package-lock.json b/package-lock.json index c2f6d848d2dbf..5f2bbab16ea7a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -16,7 +16,7 @@ "@dprint/formatter": "^0.4.1", "@dprint/typescript": "0.91.6", "@esfx/canceltoken": "^1.0.0", - "@eslint/js": "^8.57.0", + "@eslint/js": "^9.9.0", "@octokit/rest": "^21.0.1", "@types/chai": "^4.3.17", "@types/diff": "^5.2.1", @@ -26,8 +26,9 @@ "@types/node": "latest", "@types/source-map-support": "^0.5.10", "@types/which": "^3.0.4", - "@typescript-eslint/utils": "^7.18.0", - "azure-devops-node-api": "^14.0.1", + "@typescript-eslint/rule-tester": "^8.1.0", + "@typescript-eslint/utils": "^8.1.0", + "azure-devops-node-api": "^14.0.2", "c8": "^10.1.2", "chai": "^4.5.0", "chalk": "^4.1.2", @@ -35,25 +36,25 @@ "diff": "^5.2.0", "dprint": "^0.47.2", "esbuild": "^0.23.0", - "eslint": "^8.57.0", - "eslint-formatter-autolinkable-stylish": "^1.3.0", + "eslint": "^9.9.0", + "eslint-formatter-autolinkable-stylish": "^1.4.0", "fast-xml-parser": "^4.4.1", "glob": "^10.4.5", "globals": "^15.9.0", "hereby": "^1.9.0", "jsonc-parser": "^3.3.1", - "knip": "^5.27.0", + "knip": "^5.27.2", "minimist": "^1.2.8", - "mocha": "^10.7.0", + "mocha": "^10.7.3", "mocha-fivemat-progress-reporter": "^0.1.0", - "monocart-coverage-reports": "^2.10.0", + "monocart-coverage-reports": "^2.10.2", "ms": "^2.1.3", "node-fetch": "^3.3.2", - "playwright": "^1.45.3", + "playwright": "^1.46.0", "source-map-support": "^0.5.21", "tslib": "^2.6.3", "typescript": "^5.5.4", - "typescript-eslint": "^7.18.0", + "typescript-eslint": "^8.1.0", "which": "^3.0.1" }, "engines": { @@ -616,16 +617,30 @@ "node": "^12.0.0 || ^14.0.0 || >=16.0.0" } }, + "node_modules/@eslint/config-array": { + "version": "0.17.1", + "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.17.1.tgz", + "integrity": "sha512-BlYOpej8AQ8Ev9xVqroV7a02JK3SkBAaN9GfMMH9W6Ch8FlQlkjGw4Ir7+FgYwfirivAf4t+GtzuAxqfukmISA==", + "dev": true, + "dependencies": { + "@eslint/object-schema": "^2.1.4", + "debug": "^4.3.1", + "minimatch": "^3.1.2" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, "node_modules/@eslint/eslintrc": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.4.tgz", - "integrity": "sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-3.1.0.tgz", + "integrity": "sha512-4Bfj15dVJdoy3RfZmmo86RK1Fwzn6SstsvK9JS+BaVKqC6QQQQyXekNaC+g+LKNgkQ+2VhGAzm6hO40AhMR3zQ==", "dev": true, "dependencies": { "ajv": "^6.12.4", "debug": "^4.3.2", - "espree": "^9.6.0", - "globals": "^13.19.0", + "espree": "^10.0.1", + "globals": "^14.0.0", "ignore": "^5.2.0", "import-fresh": "^3.2.1", "js-yaml": "^4.1.0", @@ -633,93 +648,40 @@ "strip-json-comments": "^3.1.1" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "url": "https://opencollective.com/eslint" } }, - "node_modules/@eslint/eslintrc/node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, "node_modules/@eslint/eslintrc/node_modules/globals": { - "version": "13.24.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", - "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", + "version": "14.0.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-14.0.0.tgz", + "integrity": "sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==", "dev": true, - "dependencies": { - "type-fest": "^0.20.2" - }, "engines": { - "node": ">=8" + "node": ">=18" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/@eslint/eslintrc/node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, "node_modules/@eslint/js": { - "version": "8.57.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.0.tgz", - "integrity": "sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g==", - "dev": true, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - } - }, - "node_modules/@humanwhocodes/config-array": { - "version": "0.11.14", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.14.tgz", - "integrity": "sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==", - "deprecated": "Use @eslint/config-array instead", + "version": "9.9.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.9.0.tgz", + "integrity": "sha512-hhetes6ZHP3BlXLxmd8K2SNgkhNSi+UcecbnwWKwpP7kyi/uC75DJ1lOOBO3xrC4jyojtGE3YxKZPHfk4yrgug==", "dev": true, - "dependencies": { - "@humanwhocodes/object-schema": "^2.0.2", - "debug": "^4.3.1", - "minimatch": "^3.0.5" - }, "engines": { - "node": ">=10.10.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" } }, - "node_modules/@humanwhocodes/config-array/node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/@humanwhocodes/config-array/node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "node_modules/@eslint/object-schema": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/@eslint/object-schema/-/object-schema-2.1.4.tgz", + "integrity": "sha512-BsWiH1yFGjXXS2yvrf5LyuoSIIbPrGUWob917o+BTKuZ7qJdxX8aJLRxs1fS9n6r7vESrq1OUqb68dANcFXuQQ==", "dev": true, - "dependencies": { - "brace-expansion": "^1.1.7" - }, "engines": { - "node": "*" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" } }, "node_modules/@humanwhocodes/module-importer": { @@ -735,12 +697,18 @@ "url": "https://github.com/sponsors/nzakas" } }, - "node_modules/@humanwhocodes/object-schema": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.3.tgz", - "integrity": "sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==", - "deprecated": "Use @eslint/object-schema instead", - "dev": true + "node_modules/@humanwhocodes/retry": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.3.0.tgz", + "integrity": "sha512-d2CGZR2o7fS6sWB7DG/3a95bGKQyHMACZ5aW8qGkkqQpUoZV6C0X7Pc7l4ZNMZkfNBf4VWNe9E1jRsf0G146Ew==", + "dev": true, + "engines": { + "node": ">=18.18" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } }, "node_modules/@isaacs/cliui": { "version": "8.0.2", @@ -1072,9 +1040,9 @@ "dev": true }, "node_modules/@types/node": { - "version": "22.1.0", - "resolved": "https://registry.npmjs.org/@types/node/-/node-22.1.0.tgz", - "integrity": "sha512-AOmuRF0R2/5j1knA3c6G3HOk523Ga+l+ZXltX8SF1+5oqcXijjfTd8fY3XRZqSihEu9XhtQnKYLmkFaoxgsJHw==", + "version": "22.2.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.2.0.tgz", + "integrity": "sha512-bm6EG6/pCpkxDf/0gDNDdtDILMOHgaQBVOJGdwsqClnxA3xL6jtMv76rLBc006RVMWbmaf0xbmom4Z/5o2nRkQ==", "dev": true, "dependencies": { "undici-types": "~6.13.0" @@ -1096,31 +1064,31 @@ "dev": true }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "7.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.18.0.tgz", - "integrity": "sha512-94EQTWZ40mzBc42ATNIBimBEDltSJ9RQHCC8vc/PDbxi4k8dVwUAv4o98dk50M1zB+JGFxp43FP7f8+FP8R6Sw==", + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.1.0.tgz", + "integrity": "sha512-LlNBaHFCEBPHyD4pZXb35mzjGkuGKXU5eeCA1SxvHfiRES0E82dOounfVpL4DCqYvJEKab0bZIA0gCRpdLKkCw==", "dev": true, "dependencies": { "@eslint-community/regexpp": "^4.10.0", - "@typescript-eslint/scope-manager": "7.18.0", - "@typescript-eslint/type-utils": "7.18.0", - "@typescript-eslint/utils": "7.18.0", - "@typescript-eslint/visitor-keys": "7.18.0", + "@typescript-eslint/scope-manager": "8.1.0", + "@typescript-eslint/type-utils": "8.1.0", + "@typescript-eslint/utils": "8.1.0", + "@typescript-eslint/visitor-keys": "8.1.0", "graphemer": "^1.4.0", "ignore": "^5.3.1", "natural-compare": "^1.4.0", "ts-api-utils": "^1.3.0" }, "engines": { - "node": "^18.18.0 || >=20.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "@typescript-eslint/parser": "^7.0.0", - "eslint": "^8.56.0" + "@typescript-eslint/parser": "^8.0.0 || ^8.0.0-alpha.0", + "eslint": "^8.57.0 || ^9.0.0" }, "peerDependenciesMeta": { "typescript": { @@ -1129,26 +1097,26 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "7.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-7.18.0.tgz", - "integrity": "sha512-4Z+L8I2OqhZV8qA132M4wNL30ypZGYOQVBfMgxDH/K5UX0PNqTu1c6za9ST5r9+tavvHiTWmBnKzpCJ/GlVFtg==", + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.1.0.tgz", + "integrity": "sha512-U7iTAtGgJk6DPX9wIWPPOlt1gO57097G06gIcl0N0EEnNw8RGD62c+2/DiP/zL7KrkqnnqF7gtFGR7YgzPllTA==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "7.18.0", - "@typescript-eslint/types": "7.18.0", - "@typescript-eslint/typescript-estree": "7.18.0", - "@typescript-eslint/visitor-keys": "7.18.0", + "@typescript-eslint/scope-manager": "8.1.0", + "@typescript-eslint/types": "8.1.0", + "@typescript-eslint/typescript-estree": "8.1.0", + "@typescript-eslint/visitor-keys": "8.1.0", "debug": "^4.3.4" }, "engines": { - "node": "^18.18.0 || >=20.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "eslint": "^8.56.0" + "eslint": "^8.57.0 || ^9.0.0" }, "peerDependenciesMeta": { "typescript": { @@ -1156,17 +1124,42 @@ } } }, + "node_modules/@typescript-eslint/rule-tester": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/rule-tester/-/rule-tester-8.1.0.tgz", + "integrity": "sha512-shzRkkwKoCUCV1lttzqMFsKnbsOWQ0vjfxe1q3kDjrqdhKkQ/t3t3GwHk0QqjYQd7NUjKk2EB+nNaNI//0IL7Q==", + "dev": true, + "dependencies": { + "@typescript-eslint/typescript-estree": "8.1.0", + "@typescript-eslint/utils": "8.1.0", + "ajv": "^6.12.6", + "json-stable-stringify-without-jsonify": "^1.0.1", + "lodash.merge": "4.6.2", + "semver": "^7.6.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "@eslint/eslintrc": ">=2", + "eslint": "^8.57.0 || ^9.0.0" + } + }, "node_modules/@typescript-eslint/scope-manager": { - "version": "7.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.18.0.tgz", - "integrity": "sha512-jjhdIE/FPF2B7Z1uzc6i3oWKbGcHb87Qw7AWj6jmEqNOfDFbJWtjt/XfwCpvNkpGWlcJaog5vTR+VV8+w9JflA==", + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.1.0.tgz", + "integrity": "sha512-DsuOZQji687sQUjm4N6c9xABJa7fjvfIdjqpSIIVOgaENf2jFXiM9hIBZOL3hb6DHK9Nvd2d7zZnoMLf9e0OtQ==", "dev": true, "dependencies": { - "@typescript-eslint/types": "7.18.0", - "@typescript-eslint/visitor-keys": "7.18.0" + "@typescript-eslint/types": "8.1.0", + "@typescript-eslint/visitor-keys": "8.1.0" }, "engines": { - "node": "^18.18.0 || >=20.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "type": "opencollective", @@ -1174,26 +1167,23 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "7.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-7.18.0.tgz", - "integrity": "sha512-XL0FJXuCLaDuX2sYqZUUSOJ2sG5/i1AAze+axqmLnSkNEVMVYLF+cbwlB2w8D1tinFuSikHmFta+P+HOofrLeA==", + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.1.0.tgz", + "integrity": "sha512-oLYvTxljVvsMnldfl6jIKxTaU7ok7km0KDrwOt1RHYu6nxlhN3TIx8k5Q52L6wR33nOwDgM7VwW1fT1qMNfFIA==", "dev": true, "dependencies": { - "@typescript-eslint/typescript-estree": "7.18.0", - "@typescript-eslint/utils": "7.18.0", + "@typescript-eslint/typescript-estree": "8.1.0", + "@typescript-eslint/utils": "8.1.0", "debug": "^4.3.4", "ts-api-utils": "^1.3.0" }, "engines": { - "node": "^18.18.0 || >=20.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, - "peerDependencies": { - "eslint": "^8.56.0" - }, "peerDependenciesMeta": { "typescript": { "optional": true @@ -1201,12 +1191,12 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "7.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.18.0.tgz", - "integrity": "sha512-iZqi+Ds1y4EDYUtlOOC+aUmxnE9xS/yCigkjA7XpTKV6nCBd3Hp/PRGGmdwnfkV2ThMyYldP1wRpm/id99spTQ==", + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.1.0.tgz", + "integrity": "sha512-q2/Bxa0gMOu/2/AKALI0tCKbG2zppccnRIRCW6BaaTlRVaPKft4oVYPp7WOPpcnsgbr0qROAVCVKCvIQ0tbWog==", "dev": true, "engines": { - "node": "^18.18.0 || >=20.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "type": "opencollective", @@ -1214,13 +1204,13 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "7.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.18.0.tgz", - "integrity": "sha512-aP1v/BSPnnyhMHts8cf1qQ6Q1IFwwRvAQGRvBFkWlo3/lH29OXA3Pts+c10nxRxIBrDnoMqzhgdwVe5f2D6OzA==", + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.1.0.tgz", + "integrity": "sha512-NTHhmufocEkMiAord/g++gWKb0Fr34e9AExBRdqgWdVBaKoei2dIyYKD9Q0jBnvfbEA5zaf8plUFMUH6kQ0vGg==", "dev": true, "dependencies": { - "@typescript-eslint/types": "7.18.0", - "@typescript-eslint/visitor-keys": "7.18.0", + "@typescript-eslint/types": "8.1.0", + "@typescript-eslint/visitor-keys": "8.1.0", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", @@ -1229,7 +1219,7 @@ "ts-api-utils": "^1.3.0" }, "engines": { - "node": "^18.18.0 || >=20.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "type": "opencollective", @@ -1241,51 +1231,69 @@ } } }, + "node_modules/@typescript-eslint/typescript-estree/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "dev": true, + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/@typescript-eslint/utils": { - "version": "7.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-7.18.0.tgz", - "integrity": "sha512-kK0/rNa2j74XuHVcoCZxdFBMF+aq/vH83CXAOHieC+2Gis4mF8jJXT5eAfyD3K0sAxtPuwxaIOIOvhwzVDt/kw==", + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.1.0.tgz", + "integrity": "sha512-ypRueFNKTIFwqPeJBfeIpxZ895PQhNyH4YID6js0UoBImWYoSjBsahUn9KMiJXh94uOjVBgHD9AmkyPsPnFwJA==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.4.0", - "@typescript-eslint/scope-manager": "7.18.0", - "@typescript-eslint/types": "7.18.0", - "@typescript-eslint/typescript-estree": "7.18.0" + "@typescript-eslint/scope-manager": "8.1.0", + "@typescript-eslint/types": "8.1.0", + "@typescript-eslint/typescript-estree": "8.1.0" }, "engines": { - "node": "^18.18.0 || >=20.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "eslint": "^8.56.0" + "eslint": "^8.57.0 || ^9.0.0" } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "7.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.18.0.tgz", - "integrity": "sha512-cDF0/Gf81QpY3xYyJKDV14Zwdmid5+uuENhjH2EqFaF0ni+yAyq/LzMaIJdhNJXZI7uLzwIlA+V7oWoyn6Curg==", + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.1.0.tgz", + "integrity": "sha512-ba0lNI19awqZ5ZNKh6wCModMwoZs457StTebQ0q1NP58zSi2F6MOZRXwfKZy+jB78JNJ/WH8GSh2IQNzXX8Nag==", "dev": true, "dependencies": { - "@typescript-eslint/types": "7.18.0", + "@typescript-eslint/types": "8.1.0", "eslint-visitor-keys": "^3.4.3" }, "engines": { - "node": "^18.18.0 || >=20.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" } }, - "node_modules/@ungap/structured-clone": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.0.tgz", - "integrity": "sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==", - "dev": true - }, "node_modules/acorn": { "version": "8.12.1", "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.12.1.tgz", @@ -1440,9 +1448,9 @@ } }, "node_modules/azure-devops-node-api": { - "version": "14.0.1", - "resolved": "https://registry.npmjs.org/azure-devops-node-api/-/azure-devops-node-api-14.0.1.tgz", - "integrity": "sha512-oVnFfTNmergd3JU852EpGY64d1nAxW8lCyzZqFDPhfQVZkdApBeK/ZMN7yoFiq/C50Ru304X1L/+BFblh2SRJw==", + "version": "14.0.2", + "resolved": "https://registry.npmjs.org/azure-devops-node-api/-/azure-devops-node-api-14.0.2.tgz", + "integrity": "sha512-TwjAEnWnOSZ2oypkDyqppgvJw43qArEfPiJtEWLL3NBgdvAuOuB0xgFz/Eiz4H6Dk0Yv52wCodZxtZvAMhJXwQ==", "dev": true, "dependencies": { "tunnel": "0.0.6", @@ -1477,12 +1485,13 @@ } }, "node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "dev": true, "dependencies": { - "balanced-match": "^1.0.0" + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" } }, "node_modules/braces": { @@ -2014,18 +2023,6 @@ "node": ">=8" } }, - "node_modules/doctrine": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", - "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", - "dev": true, - "dependencies": { - "esutils": "^2.0.2" - }, - "engines": { - "node": ">=6.0.0" - } - }, "node_modules/dprint": { "version": "0.47.2", "resolved": "https://registry.npmjs.org/dprint/-/dprint-0.47.2.tgz", @@ -2076,6 +2073,19 @@ "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", "dev": true }, + "node_modules/enhanced-resolve": { + "version": "5.17.1", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.17.1.tgz", + "integrity": "sha512-LMHl3dXhTcfv8gM4kEzIUeTQ+7fpdA0l2tUf34BddXPkz2A5xJ5L/Pchd5BL6rdccM9QGvu0sWZzK1Z1t4wwyg==", + "dev": true, + "dependencies": { + "graceful-fs": "^4.2.4", + "tapable": "^2.2.0" + }, + "engines": { + "node": ">=10.13.0" + } + }, "node_modules/es-define-property": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz", @@ -2158,41 +2168,37 @@ } }, "node_modules/eslint": { - "version": "8.57.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.0.tgz", - "integrity": "sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ==", + "version": "9.9.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.9.0.tgz", + "integrity": "sha512-JfiKJrbx0506OEerjK2Y1QlldtBxkAlLxT5OEcRF8uaQ86noDe2k31Vw9rnSWv+MXZHj7OOUV/dA0AhdLFcyvA==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", - "@eslint-community/regexpp": "^4.6.1", - "@eslint/eslintrc": "^2.1.4", - "@eslint/js": "8.57.0", - "@humanwhocodes/config-array": "^0.11.14", + "@eslint-community/regexpp": "^4.11.0", + "@eslint/config-array": "^0.17.1", + "@eslint/eslintrc": "^3.1.0", + "@eslint/js": "9.9.0", "@humanwhocodes/module-importer": "^1.0.1", + "@humanwhocodes/retry": "^0.3.0", "@nodelib/fs.walk": "^1.2.8", - "@ungap/structured-clone": "^1.2.0", "ajv": "^6.12.4", "chalk": "^4.0.0", "cross-spawn": "^7.0.2", "debug": "^4.3.2", - "doctrine": "^3.0.0", "escape-string-regexp": "^4.0.0", - "eslint-scope": "^7.2.2", - "eslint-visitor-keys": "^3.4.3", - "espree": "^9.6.1", - "esquery": "^1.4.2", + "eslint-scope": "^8.0.2", + "eslint-visitor-keys": "^4.0.0", + "espree": "^10.1.0", + "esquery": "^1.5.0", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", - "file-entry-cache": "^6.0.1", + "file-entry-cache": "^8.0.0", "find-up": "^5.0.0", "glob-parent": "^6.0.2", - "globals": "^13.19.0", - "graphemer": "^1.4.0", "ignore": "^5.2.0", "imurmurhash": "^0.1.4", "is-glob": "^4.0.0", "is-path-inside": "^3.0.3", - "js-yaml": "^4.1.0", "json-stable-stringify-without-jsonify": "^1.0.1", "levn": "^0.4.1", "lodash.merge": "^4.6.2", @@ -2206,39 +2212,44 @@ "eslint": "bin/eslint.js" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { - "url": "https://opencollective.com/eslint" + "url": "https://eslint.org/donate" + }, + "peerDependencies": { + "jiti": "*" + }, + "peerDependenciesMeta": { + "jiti": { + "optional": true + } } }, "node_modules/eslint-formatter-autolinkable-stylish": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/eslint-formatter-autolinkable-stylish/-/eslint-formatter-autolinkable-stylish-1.3.0.tgz", - "integrity": "sha512-vAlu6l+WbYOrOjlVeSDXBIjJKWRbcwSYV4fQ/zBzYK/kom3Gq7JKuLzumzd8w7E6M4UPnmtYAELnOXJW5x+esA==", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/eslint-formatter-autolinkable-stylish/-/eslint-formatter-autolinkable-stylish-1.4.0.tgz", + "integrity": "sha512-fz60p32XUn4o5XaqApuTGu6gUPsAW0pB4IjFb1ER5hdpS7S2OgO29jocnecUlv8fsVx8B8jRviLjkAjv2IQ72g==", "dev": true, "dependencies": { "chalk": "^4.1.2", "plur": "^4.0.0" }, - "engines": { - "node": ">=0.10.0" - }, "peerDependencies": { - "eslint": "^8.3.0" + "eslint": "^8.3.0 || ^9.0.0" } }, "node_modules/eslint-scope": { - "version": "7.2.2", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz", - "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==", + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-8.0.2.tgz", + "integrity": "sha512-6E4xmrTw5wtxnLA5wYL3WDfhZ/1bUBGOXV0zQvVRDOtrR8D0p6W7fs3JweNYhwRYeGvd/1CKX2se0/2s7Q/nJA==", "dev": true, "dependencies": { "esrecurse": "^4.3.0", "estraverse": "^5.2.0" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "url": "https://opencollective.com/eslint" @@ -2256,14 +2267,16 @@ "url": "https://opencollective.com/eslint" } }, - "node_modules/eslint/node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "node_modules/eslint/node_modules/eslint-visitor-keys": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.0.0.tgz", + "integrity": "sha512-OtIRv/2GyiF6o/d8K7MYKKbXrOUBIK6SfkIRM4Z0dY3w+LiQ0vy3F57m0Z71bjbyeiWFiHJ8brqnmE6H6/jEuw==", "dev": true, - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" } }, "node_modules/eslint/node_modules/glob-parent": { @@ -2278,45 +2291,30 @@ "node": ">=10.13.0" } }, - "node_modules/eslint/node_modules/globals": { - "version": "13.24.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", - "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", + "node_modules/espree": { + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-10.1.0.tgz", + "integrity": "sha512-M1M6CpiE6ffoigIOWYO9UDP8TMUw9kqb21tf+08IgDYjCsOvCuDt4jQcZmoYxx+w7zlKw9/N0KXfto+I8/FrXA==", "dev": true, "dependencies": { - "type-fest": "^0.20.2" + "acorn": "^8.12.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^4.0.0" }, "engines": { - "node": ">=8" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/eslint/node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" + "url": "https://opencollective.com/eslint" } }, - "node_modules/espree": { - "version": "9.6.1", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", - "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", + "node_modules/espree/node_modules/eslint-visitor-keys": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.0.0.tgz", + "integrity": "sha512-OtIRv/2GyiF6o/d8K7MYKKbXrOUBIK6SfkIRM4Z0dY3w+LiQ0vy3F57m0Z71bjbyeiWFiHJ8brqnmE6H6/jEuw==", "dev": true, - "dependencies": { - "acorn": "^8.9.0", - "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^3.4.1" - }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "url": "https://opencollective.com/eslint" @@ -2462,15 +2460,15 @@ } }, "node_modules/file-entry-cache": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", - "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-8.0.0.tgz", + "integrity": "sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==", "dev": true, "dependencies": { - "flat-cache": "^3.0.4" + "flat-cache": "^4.0.0" }, "engines": { - "node": "^10.12.0 || >=12.0.0" + "node": ">=16.0.0" } }, "node_modules/fill-range": { @@ -2511,17 +2509,16 @@ } }, "node_modules/flat-cache": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.2.0.tgz", - "integrity": "sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-4.0.1.tgz", + "integrity": "sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==", "dev": true, "dependencies": { "flatted": "^3.2.9", - "keyv": "^4.5.3", - "rimraf": "^3.0.2" + "keyv": "^4.5.4" }, "engines": { - "node": "^10.12.0 || >=12.0.0" + "node": ">=16" } }, "node_modules/flatted": { @@ -2531,9 +2528,9 @@ "dev": true }, "node_modules/foreground-child": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.2.1.tgz", - "integrity": "sha512-PXUUyLqrR2XCWICfv6ukppP96sdFwWbNEnfEMt7jNsISjMsvaLNinAHNDYyvkyU+SZG2BTSbT5NjG+vZslfGTA==", + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.3.0.tgz", + "integrity": "sha512-Ld2g8rrAyMYFXBhEqMz8ZAHBi4J4uS1i/CxGMDnjyFWddMXLVcDp051DZfu+t7+ab7Wv6SMqpWmyFIj5UbfFvg==", "dev": true, "dependencies": { "cross-spawn": "^7.0.0", @@ -2656,6 +2653,30 @@ "node": ">= 6" } }, + "node_modules/glob/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/glob/node_modules/minimatch": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "dev": true, + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/globals": { "version": "15.9.0", "resolved": "https://registry.npmjs.org/globals/-/globals-15.9.0.tgz", @@ -2700,6 +2721,12 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/graceful-fs": { + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", + "dev": true + }, "node_modules/graphemer": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", @@ -2798,9 +2825,9 @@ "dev": true }, "node_modules/ignore": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.1.tgz", - "integrity": "sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw==", + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", + "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", "dev": true, "engines": { "node": ">= 4" @@ -2878,21 +2905,6 @@ "node": ">=8" } }, - "node_modules/is-core-module": { - "version": "2.15.0", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.15.0.tgz", - "integrity": "sha512-Dd+Lb2/zvk9SKy1TGCt1wFJFo/MWBPMX5x7KcvLajWTGuomczdQX61PvY5yK6SVACwpoexWo81IfFyoKY2QnTA==", - "dev": true, - "dependencies": { - "hasown": "^2.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/is-extglob": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", @@ -3080,9 +3092,9 @@ } }, "node_modules/knip": { - "version": "5.27.0", - "resolved": "https://registry.npmjs.org/knip/-/knip-5.27.0.tgz", - "integrity": "sha512-W8+jhO7i5pXRUqOzhJGm2DT5/d9aQjyrYTCSojqJxFOvi7ku/nHKzpBO3WNf4eflJo0t3zitmUkM69g53qoZQw==", + "version": "5.27.2", + "resolved": "https://registry.npmjs.org/knip/-/knip-5.27.2.tgz", + "integrity": "sha512-Mya1XEDq1oygibQf0uocQd02Fil8RtvNVhcFAcxypjcc6zakT7wsJtS0xvuwEitilfI0tiFC9PghmJQ3DMKuTg==", "dev": true, "funding": [ { @@ -3102,6 +3114,7 @@ "@nodelib/fs.walk": "1.2.8", "@snyk/github-codeowners": "1.1.0", "easy-table": "1.2.0", + "enhanced-resolve": "^5.17.1", "fast-glob": "^3.3.2", "jiti": "^1.21.6", "js-yaml": "^4.1.0", @@ -3109,7 +3122,6 @@ "picocolors": "^1.0.0", "picomatch": "^4.0.1", "pretty-ms": "^9.0.0", - "resolve": "^1.22.8", "smol-toml": "^1.1.4", "strip-json-comments": "5.0.1", "summary": "2.1.0", @@ -3294,18 +3306,15 @@ "dev": true }, "node_modules/minimatch": { - "version": "9.0.5", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", - "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "dev": true, "dependencies": { - "brace-expansion": "^2.0.1" + "brace-expansion": "^1.1.7" }, "engines": { - "node": ">=16 || 14 >=14.17" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" + "node": "*" } }, "node_modules/minimist": { @@ -3327,9 +3336,9 @@ } }, "node_modules/mocha": { - "version": "10.7.0", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.7.0.tgz", - "integrity": "sha512-v8/rBWr2VO5YkspYINnvu81inSz2y3ODJrhO175/Exzor1RcEZZkizgE2A+w/CAXXoESS8Kys5E62dOHGHzULA==", + "version": "10.7.3", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.7.3.tgz", + "integrity": "sha512-uQWxAu44wwiACGqjbPYmjo7Lg8sFrS3dQe7PP2FQI+woptP4vZXSMcfMyFL/e1yFEeEpV4RtyTpZROOKmxis+A==", "dev": true, "dependencies": { "ansi-colors": "^4.1.3", @@ -3367,6 +3376,15 @@ "integrity": "sha512-nCf6dmCEHObJ8BBrcjW+UHYvVtHEL+FliYR/Mfc/v7dKenNmBQ0ZSuvlICgsyQy9Tt581ldvh+SReS4qp4LrQw==", "dev": true }, + "node_modules/mocha/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0" + } + }, "node_modules/mocha/node_modules/cliui": { "version": "7.0.4", "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", @@ -3490,9 +3508,9 @@ } }, "node_modules/monocart-coverage-reports": { - "version": "2.10.0", - "resolved": "https://registry.npmjs.org/monocart-coverage-reports/-/monocart-coverage-reports-2.10.0.tgz", - "integrity": "sha512-PxMFUGQ3gDVmQVbKejfwgXHncDDFX5zldPQLLbYNacDq7qFft2K8hvroEDGztQ5DionF9ztiqlbgKIGmeMyBeA==", + "version": "2.10.2", + "resolved": "https://registry.npmjs.org/monocart-coverage-reports/-/monocart-coverage-reports-2.10.2.tgz", + "integrity": "sha512-bc/trWb39E7CxT6IQ8AG+JNkW9wo3yw5zMlFHzLqn1dZxHx1rRv/z/GmbvZ6saG3SSQPtarcpiEAaF3WjVFLTg==", "dev": true, "dependencies": { "@bcoe/v8-coverage": "^0.2.3", @@ -3709,15 +3727,6 @@ "node": ">=8" } }, - "node_modules/path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/path-key": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", @@ -3727,12 +3736,6 @@ "node": ">=8" } }, - "node_modules/path-parse": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", - "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", - "dev": true - }, "node_modules/path-scurry": { "version": "1.11.1", "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz", @@ -3786,12 +3789,12 @@ } }, "node_modules/playwright": { - "version": "1.45.3", - "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.45.3.tgz", - "integrity": "sha512-QhVaS+lpluxCaioejDZ95l4Y4jSFCsBvl2UZkpeXlzxmqS+aABr5c82YmfMHrL6x27nvrvykJAFpkzT2eWdJww==", + "version": "1.46.0", + "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.46.0.tgz", + "integrity": "sha512-XYJ5WvfefWONh1uPAUAi0H2xXV5S3vrtcnXe6uAOgdGi3aSpqOSXX08IAjXW34xitfuOJsvXU5anXZxPSEQiJw==", "dev": true, "dependencies": { - "playwright-core": "1.45.3" + "playwright-core": "1.46.0" }, "bin": { "playwright": "cli.js" @@ -3804,9 +3807,9 @@ } }, "node_modules/playwright-core": { - "version": "1.45.3", - "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.45.3.tgz", - "integrity": "sha512-+ym0jNbcjikaOwwSZycFbwkWgfruWvYlJfThKYAlImbxUgdWFO2oW70ojPm4OpE4t6TAo2FY/smM+hpVTtkhDA==", + "version": "1.46.0", + "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.46.0.tgz", + "integrity": "sha512-9Y/d5UIwuJk8t3+lhmMSAJyNP1BUC/DqP3cQJDQQL/oWqAiuPTLgy7Q5dzglmTLwcBRdetzgNM/gni7ckfTr6A==", "dev": true, "bin": { "playwright-core": "cli.js" @@ -3951,23 +3954,6 @@ "node": ">=0.10.0" } }, - "node_modules/resolve": { - "version": "1.22.8", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz", - "integrity": "sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==", - "dev": true, - "dependencies": { - "is-core-module": "^2.13.0", - "path-parse": "^1.0.7", - "supports-preserve-symlinks-flag": "^1.0.0" - }, - "bin": { - "resolve": "bin/resolve" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/resolve-from": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", @@ -3987,65 +3973,6 @@ "node": ">=0.10.0" } }, - "node_modules/rimraf": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", - "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", - "deprecated": "Rimraf versions prior to v4 are no longer supported", - "dev": true, - "dependencies": { - "glob": "^7.1.3" - }, - "bin": { - "rimraf": "bin.js" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/rimraf/node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/rimraf/node_modules/glob": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", - "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", - "deprecated": "Glob versions prior to v9 are no longer supported", - "dev": true, - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/rimraf/node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, "node_modules/run-parallel": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", @@ -4336,24 +4263,12 @@ "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/supports-preserve-symlinks-flag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", - "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", - "dev": true, - "engines": { - "node": ">= 0.4" + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "engines": { + "node": ">=8" } }, "node_modules/table-layout": { @@ -4371,6 +4286,15 @@ "node": ">=8.0.0" } }, + "node_modules/tapable": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.1.tgz", + "integrity": "sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==", + "dev": true, + "engines": { + "node": ">=6" + } + }, "node_modules/test-exclude": { "version": "7.0.1", "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-7.0.1.tgz", @@ -4385,6 +4309,30 @@ "node": ">=18" } }, + "node_modules/test-exclude/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/test-exclude/node_modules/minimatch": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "dev": true, + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/text-table": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", @@ -4451,18 +4399,6 @@ "node": ">=4" } }, - "node_modules/type-fest": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", - "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/typed-rest-client": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/typed-rest-client/-/typed-rest-client-2.0.2.tgz", @@ -4493,25 +4429,22 @@ } }, "node_modules/typescript-eslint": { - "version": "7.18.0", - "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-7.18.0.tgz", - "integrity": "sha512-PonBkP603E3tt05lDkbOMyaxJjvKqQrXsnow72sVeOFINDE/qNmnnd+f9b4N+U7W6MXnnYyrhtmF2t08QWwUbA==", + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.1.0.tgz", + "integrity": "sha512-prB2U3jXPJLpo1iVLN338Lvolh6OrcCZO+9Yv6AR+tvegPPptYCDBIHiEEUdqRi8gAv2bXNKfMUrgAd2ejn/ow==", "dev": true, "dependencies": { - "@typescript-eslint/eslint-plugin": "7.18.0", - "@typescript-eslint/parser": "7.18.0", - "@typescript-eslint/utils": "7.18.0" + "@typescript-eslint/eslint-plugin": "8.1.0", + "@typescript-eslint/parser": "8.1.0", + "@typescript-eslint/utils": "8.1.0" }, "engines": { - "node": "^18.18.0 || >=20.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, - "peerDependencies": { - "eslint": "^8.56.0" - }, "peerDependenciesMeta": { "typescript": { "optional": true @@ -5119,16 +5052,27 @@ "integrity": "sha512-G/M/tIiMrTAxEWRfLfQJMmGNX28IxBg4PBz8XqQhqUHLFI6TL2htpIB1iQCj144V5ee/JaKyT9/WZ0MGZWfA7A==", "dev": true }, + "@eslint/config-array": { + "version": "0.17.1", + "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.17.1.tgz", + "integrity": "sha512-BlYOpej8AQ8Ev9xVqroV7a02JK3SkBAaN9GfMMH9W6Ch8FlQlkjGw4Ir7+FgYwfirivAf4t+GtzuAxqfukmISA==", + "dev": true, + "requires": { + "@eslint/object-schema": "^2.1.4", + "debug": "^4.3.1", + "minimatch": "^3.1.2" + } + }, "@eslint/eslintrc": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.4.tgz", - "integrity": "sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-3.1.0.tgz", + "integrity": "sha512-4Bfj15dVJdoy3RfZmmo86RK1Fwzn6SstsvK9JS+BaVKqC6QQQQyXekNaC+g+LKNgkQ+2VhGAzm6hO40AhMR3zQ==", "dev": true, "requires": { "ajv": "^6.12.4", "debug": "^4.3.2", - "espree": "^9.6.0", - "globals": "^13.19.0", + "espree": "^10.0.1", + "globals": "^14.0.0", "ignore": "^5.2.0", "import-fresh": "^3.2.1", "js-yaml": "^4.1.0", @@ -5136,73 +5080,25 @@ "strip-json-comments": "^3.1.1" }, "dependencies": { - "brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, "globals": { - "version": "13.24.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", - "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", - "dev": true, - "requires": { - "type-fest": "^0.20.2" - } - }, - "minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "requires": { - "brace-expansion": "^1.1.7" - } + "version": "14.0.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-14.0.0.tgz", + "integrity": "sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==", + "dev": true } } }, "@eslint/js": { - "version": "8.57.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.0.tgz", - "integrity": "sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g==", + "version": "9.9.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.9.0.tgz", + "integrity": "sha512-hhetes6ZHP3BlXLxmd8K2SNgkhNSi+UcecbnwWKwpP7kyi/uC75DJ1lOOBO3xrC4jyojtGE3YxKZPHfk4yrgug==", "dev": true }, - "@humanwhocodes/config-array": { - "version": "0.11.14", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.14.tgz", - "integrity": "sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==", - "dev": true, - "requires": { - "@humanwhocodes/object-schema": "^2.0.2", - "debug": "^4.3.1", - "minimatch": "^3.0.5" - }, - "dependencies": { - "brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "requires": { - "brace-expansion": "^1.1.7" - } - } - } + "@eslint/object-schema": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/@eslint/object-schema/-/object-schema-2.1.4.tgz", + "integrity": "sha512-BsWiH1yFGjXXS2yvrf5LyuoSIIbPrGUWob917o+BTKuZ7qJdxX8aJLRxs1fS9n6r7vESrq1OUqb68dANcFXuQQ==", + "dev": true }, "@humanwhocodes/module-importer": { "version": "1.0.1", @@ -5210,10 +5106,10 @@ "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", "dev": true }, - "@humanwhocodes/object-schema": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.3.tgz", - "integrity": "sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==", + "@humanwhocodes/retry": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.3.0.tgz", + "integrity": "sha512-d2CGZR2o7fS6sWB7DG/3a95bGKQyHMACZ5aW8qGkkqQpUoZV6C0X7Pc7l4ZNMZkfNBf4VWNe9E1jRsf0G146Ew==", "dev": true }, "@isaacs/cliui": { @@ -5471,9 +5367,9 @@ "dev": true }, "@types/node": { - "version": "22.1.0", - "resolved": "https://registry.npmjs.org/@types/node/-/node-22.1.0.tgz", - "integrity": "sha512-AOmuRF0R2/5j1knA3c6G3HOk523Ga+l+ZXltX8SF1+5oqcXijjfTd8fY3XRZqSihEu9XhtQnKYLmkFaoxgsJHw==", + "version": "22.2.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.2.0.tgz", + "integrity": "sha512-bm6EG6/pCpkxDf/0gDNDdtDILMOHgaQBVOJGdwsqClnxA3xL6jtMv76rLBc006RVMWbmaf0xbmom4Z/5o2nRkQ==", "dev": true, "requires": { "undici-types": "~6.13.0" @@ -5495,16 +5391,16 @@ "dev": true }, "@typescript-eslint/eslint-plugin": { - "version": "7.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.18.0.tgz", - "integrity": "sha512-94EQTWZ40mzBc42ATNIBimBEDltSJ9RQHCC8vc/PDbxi4k8dVwUAv4o98dk50M1zB+JGFxp43FP7f8+FP8R6Sw==", + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.1.0.tgz", + "integrity": "sha512-LlNBaHFCEBPHyD4pZXb35mzjGkuGKXU5eeCA1SxvHfiRES0E82dOounfVpL4DCqYvJEKab0bZIA0gCRpdLKkCw==", "dev": true, "requires": { "@eslint-community/regexpp": "^4.10.0", - "@typescript-eslint/scope-manager": "7.18.0", - "@typescript-eslint/type-utils": "7.18.0", - "@typescript-eslint/utils": "7.18.0", - "@typescript-eslint/visitor-keys": "7.18.0", + "@typescript-eslint/scope-manager": "8.1.0", + "@typescript-eslint/type-utils": "8.1.0", + "@typescript-eslint/utils": "8.1.0", + "@typescript-eslint/visitor-keys": "8.1.0", "graphemer": "^1.4.0", "ignore": "^5.3.1", "natural-compare": "^1.4.0", @@ -5512,90 +5408,118 @@ } }, "@typescript-eslint/parser": { - "version": "7.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-7.18.0.tgz", - "integrity": "sha512-4Z+L8I2OqhZV8qA132M4wNL30ypZGYOQVBfMgxDH/K5UX0PNqTu1c6za9ST5r9+tavvHiTWmBnKzpCJ/GlVFtg==", + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.1.0.tgz", + "integrity": "sha512-U7iTAtGgJk6DPX9wIWPPOlt1gO57097G06gIcl0N0EEnNw8RGD62c+2/DiP/zL7KrkqnnqF7gtFGR7YgzPllTA==", "dev": true, "requires": { - "@typescript-eslint/scope-manager": "7.18.0", - "@typescript-eslint/types": "7.18.0", - "@typescript-eslint/typescript-estree": "7.18.0", - "@typescript-eslint/visitor-keys": "7.18.0", + "@typescript-eslint/scope-manager": "8.1.0", + "@typescript-eslint/types": "8.1.0", + "@typescript-eslint/typescript-estree": "8.1.0", + "@typescript-eslint/visitor-keys": "8.1.0", "debug": "^4.3.4" } }, + "@typescript-eslint/rule-tester": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/rule-tester/-/rule-tester-8.1.0.tgz", + "integrity": "sha512-shzRkkwKoCUCV1lttzqMFsKnbsOWQ0vjfxe1q3kDjrqdhKkQ/t3t3GwHk0QqjYQd7NUjKk2EB+nNaNI//0IL7Q==", + "dev": true, + "requires": { + "@typescript-eslint/typescript-estree": "8.1.0", + "@typescript-eslint/utils": "8.1.0", + "ajv": "^6.12.6", + "json-stable-stringify-without-jsonify": "^1.0.1", + "lodash.merge": "4.6.2", + "semver": "^7.6.0" + } + }, "@typescript-eslint/scope-manager": { - "version": "7.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.18.0.tgz", - "integrity": "sha512-jjhdIE/FPF2B7Z1uzc6i3oWKbGcHb87Qw7AWj6jmEqNOfDFbJWtjt/XfwCpvNkpGWlcJaog5vTR+VV8+w9JflA==", + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.1.0.tgz", + "integrity": "sha512-DsuOZQji687sQUjm4N6c9xABJa7fjvfIdjqpSIIVOgaENf2jFXiM9hIBZOL3hb6DHK9Nvd2d7zZnoMLf9e0OtQ==", "dev": true, "requires": { - "@typescript-eslint/types": "7.18.0", - "@typescript-eslint/visitor-keys": "7.18.0" + "@typescript-eslint/types": "8.1.0", + "@typescript-eslint/visitor-keys": "8.1.0" } }, "@typescript-eslint/type-utils": { - "version": "7.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-7.18.0.tgz", - "integrity": "sha512-XL0FJXuCLaDuX2sYqZUUSOJ2sG5/i1AAze+axqmLnSkNEVMVYLF+cbwlB2w8D1tinFuSikHmFta+P+HOofrLeA==", + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.1.0.tgz", + "integrity": "sha512-oLYvTxljVvsMnldfl6jIKxTaU7ok7km0KDrwOt1RHYu6nxlhN3TIx8k5Q52L6wR33nOwDgM7VwW1fT1qMNfFIA==", "dev": true, "requires": { - "@typescript-eslint/typescript-estree": "7.18.0", - "@typescript-eslint/utils": "7.18.0", + "@typescript-eslint/typescript-estree": "8.1.0", + "@typescript-eslint/utils": "8.1.0", "debug": "^4.3.4", "ts-api-utils": "^1.3.0" } }, "@typescript-eslint/types": { - "version": "7.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.18.0.tgz", - "integrity": "sha512-iZqi+Ds1y4EDYUtlOOC+aUmxnE9xS/yCigkjA7XpTKV6nCBd3Hp/PRGGmdwnfkV2ThMyYldP1wRpm/id99spTQ==", + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.1.0.tgz", + "integrity": "sha512-q2/Bxa0gMOu/2/AKALI0tCKbG2zppccnRIRCW6BaaTlRVaPKft4oVYPp7WOPpcnsgbr0qROAVCVKCvIQ0tbWog==", "dev": true }, "@typescript-eslint/typescript-estree": { - "version": "7.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.18.0.tgz", - "integrity": "sha512-aP1v/BSPnnyhMHts8cf1qQ6Q1IFwwRvAQGRvBFkWlo3/lH29OXA3Pts+c10nxRxIBrDnoMqzhgdwVe5f2D6OzA==", + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.1.0.tgz", + "integrity": "sha512-NTHhmufocEkMiAord/g++gWKb0Fr34e9AExBRdqgWdVBaKoei2dIyYKD9Q0jBnvfbEA5zaf8plUFMUH6kQ0vGg==", "dev": true, "requires": { - "@typescript-eslint/types": "7.18.0", - "@typescript-eslint/visitor-keys": "7.18.0", + "@typescript-eslint/types": "8.1.0", + "@typescript-eslint/visitor-keys": "8.1.0", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", "minimatch": "^9.0.4", "semver": "^7.6.0", "ts-api-utils": "^1.3.0" + }, + "dependencies": { + "brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "requires": { + "balanced-match": "^1.0.0" + } + }, + "minimatch": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "dev": true, + "requires": { + "brace-expansion": "^2.0.1" + } + } } }, "@typescript-eslint/utils": { - "version": "7.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-7.18.0.tgz", - "integrity": "sha512-kK0/rNa2j74XuHVcoCZxdFBMF+aq/vH83CXAOHieC+2Gis4mF8jJXT5eAfyD3K0sAxtPuwxaIOIOvhwzVDt/kw==", + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.1.0.tgz", + "integrity": "sha512-ypRueFNKTIFwqPeJBfeIpxZ895PQhNyH4YID6js0UoBImWYoSjBsahUn9KMiJXh94uOjVBgHD9AmkyPsPnFwJA==", "dev": true, "requires": { "@eslint-community/eslint-utils": "^4.4.0", - "@typescript-eslint/scope-manager": "7.18.0", - "@typescript-eslint/types": "7.18.0", - "@typescript-eslint/typescript-estree": "7.18.0" + "@typescript-eslint/scope-manager": "8.1.0", + "@typescript-eslint/types": "8.1.0", + "@typescript-eslint/typescript-estree": "8.1.0" } }, "@typescript-eslint/visitor-keys": { - "version": "7.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.18.0.tgz", - "integrity": "sha512-cDF0/Gf81QpY3xYyJKDV14Zwdmid5+uuENhjH2EqFaF0ni+yAyq/LzMaIJdhNJXZI7uLzwIlA+V7oWoyn6Curg==", + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.1.0.tgz", + "integrity": "sha512-ba0lNI19awqZ5ZNKh6wCModMwoZs457StTebQ0q1NP58zSi2F6MOZRXwfKZy+jB78JNJ/WH8GSh2IQNzXX8Nag==", "dev": true, "requires": { - "@typescript-eslint/types": "7.18.0", + "@typescript-eslint/types": "8.1.0", "eslint-visitor-keys": "^3.4.3" } }, - "@ungap/structured-clone": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.0.tgz", - "integrity": "sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==", - "dev": true - }, "acorn": { "version": "8.12.1", "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.12.1.tgz", @@ -5705,9 +5629,9 @@ "dev": true }, "azure-devops-node-api": { - "version": "14.0.1", - "resolved": "https://registry.npmjs.org/azure-devops-node-api/-/azure-devops-node-api-14.0.1.tgz", - "integrity": "sha512-oVnFfTNmergd3JU852EpGY64d1nAxW8lCyzZqFDPhfQVZkdApBeK/ZMN7yoFiq/C50Ru304X1L/+BFblh2SRJw==", + "version": "14.0.2", + "resolved": "https://registry.npmjs.org/azure-devops-node-api/-/azure-devops-node-api-14.0.2.tgz", + "integrity": "sha512-TwjAEnWnOSZ2oypkDyqppgvJw43qArEfPiJtEWLL3NBgdvAuOuB0xgFz/Eiz4H6Dk0Yv52wCodZxtZvAMhJXwQ==", "dev": true, "requires": { "tunnel": "0.0.6", @@ -5733,12 +5657,13 @@ "dev": true }, "brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "dev": true, "requires": { - "balanced-match": "^1.0.0" + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" } }, "braces": { @@ -6137,15 +6062,6 @@ "path-type": "^4.0.0" } }, - "doctrine": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", - "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", - "dev": true, - "requires": { - "esutils": "^2.0.2" - } - }, "dprint": { "version": "0.47.2", "resolved": "https://registry.npmjs.org/dprint/-/dprint-0.47.2.tgz", @@ -6190,6 +6106,16 @@ "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", "dev": true }, + "enhanced-resolve": { + "version": "5.17.1", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.17.1.tgz", + "integrity": "sha512-LMHl3dXhTcfv8gM4kEzIUeTQ+7fpdA0l2tUf34BddXPkz2A5xJ5L/Pchd5BL6rdccM9QGvu0sWZzK1Z1t4wwyg==", + "dev": true, + "requires": { + "graceful-fs": "^4.2.4", + "tapable": "^2.2.0" + } + }, "es-define-property": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz", @@ -6250,41 +6176,37 @@ "dev": true }, "eslint": { - "version": "8.57.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.0.tgz", - "integrity": "sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ==", + "version": "9.9.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.9.0.tgz", + "integrity": "sha512-JfiKJrbx0506OEerjK2Y1QlldtBxkAlLxT5OEcRF8uaQ86noDe2k31Vw9rnSWv+MXZHj7OOUV/dA0AhdLFcyvA==", "dev": true, "requires": { "@eslint-community/eslint-utils": "^4.2.0", - "@eslint-community/regexpp": "^4.6.1", - "@eslint/eslintrc": "^2.1.4", - "@eslint/js": "8.57.0", - "@humanwhocodes/config-array": "^0.11.14", + "@eslint-community/regexpp": "^4.11.0", + "@eslint/config-array": "^0.17.1", + "@eslint/eslintrc": "^3.1.0", + "@eslint/js": "9.9.0", "@humanwhocodes/module-importer": "^1.0.1", + "@humanwhocodes/retry": "^0.3.0", "@nodelib/fs.walk": "^1.2.8", - "@ungap/structured-clone": "^1.2.0", "ajv": "^6.12.4", "chalk": "^4.0.0", "cross-spawn": "^7.0.2", "debug": "^4.3.2", - "doctrine": "^3.0.0", "escape-string-regexp": "^4.0.0", - "eslint-scope": "^7.2.2", - "eslint-visitor-keys": "^3.4.3", - "espree": "^9.6.1", - "esquery": "^1.4.2", + "eslint-scope": "^8.0.2", + "eslint-visitor-keys": "^4.0.0", + "espree": "^10.1.0", + "esquery": "^1.5.0", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", - "file-entry-cache": "^6.0.1", + "file-entry-cache": "^8.0.0", "find-up": "^5.0.0", "glob-parent": "^6.0.2", - "globals": "^13.19.0", - "graphemer": "^1.4.0", "ignore": "^5.2.0", "imurmurhash": "^0.1.4", "is-glob": "^4.0.0", "is-path-inside": "^3.0.3", - "js-yaml": "^4.1.0", "json-stable-stringify-without-jsonify": "^1.0.1", "levn": "^0.4.1", "lodash.merge": "^4.6.2", @@ -6295,15 +6217,11 @@ "text-table": "^0.2.0" }, "dependencies": { - "brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } + "eslint-visitor-keys": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.0.0.tgz", + "integrity": "sha512-OtIRv/2GyiF6o/d8K7MYKKbXrOUBIK6SfkIRM4Z0dY3w+LiQ0vy3F57m0Z71bjbyeiWFiHJ8brqnmE6H6/jEuw==", + "dev": true }, "glob-parent": { "version": "6.0.2", @@ -6313,31 +6231,13 @@ "requires": { "is-glob": "^4.0.3" } - }, - "globals": { - "version": "13.24.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", - "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", - "dev": true, - "requires": { - "type-fest": "^0.20.2" - } - }, - "minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "requires": { - "brace-expansion": "^1.1.7" - } } } }, "eslint-formatter-autolinkable-stylish": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/eslint-formatter-autolinkable-stylish/-/eslint-formatter-autolinkable-stylish-1.3.0.tgz", - "integrity": "sha512-vAlu6l+WbYOrOjlVeSDXBIjJKWRbcwSYV4fQ/zBzYK/kom3Gq7JKuLzumzd8w7E6M4UPnmtYAELnOXJW5x+esA==", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/eslint-formatter-autolinkable-stylish/-/eslint-formatter-autolinkable-stylish-1.4.0.tgz", + "integrity": "sha512-fz60p32XUn4o5XaqApuTGu6gUPsAW0pB4IjFb1ER5hdpS7S2OgO29jocnecUlv8fsVx8B8jRviLjkAjv2IQ72g==", "dev": true, "requires": { "chalk": "^4.1.2", @@ -6345,9 +6245,9 @@ } }, "eslint-scope": { - "version": "7.2.2", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz", - "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==", + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-8.0.2.tgz", + "integrity": "sha512-6E4xmrTw5wtxnLA5wYL3WDfhZ/1bUBGOXV0zQvVRDOtrR8D0p6W7fs3JweNYhwRYeGvd/1CKX2se0/2s7Q/nJA==", "dev": true, "requires": { "esrecurse": "^4.3.0", @@ -6361,14 +6261,22 @@ "dev": true }, "espree": { - "version": "9.6.1", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", - "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-10.1.0.tgz", + "integrity": "sha512-M1M6CpiE6ffoigIOWYO9UDP8TMUw9kqb21tf+08IgDYjCsOvCuDt4jQcZmoYxx+w7zlKw9/N0KXfto+I8/FrXA==", "dev": true, "requires": { - "acorn": "^8.9.0", + "acorn": "^8.12.0", "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^3.4.1" + "eslint-visitor-keys": "^4.0.0" + }, + "dependencies": { + "eslint-visitor-keys": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.0.0.tgz", + "integrity": "sha512-OtIRv/2GyiF6o/d8K7MYKKbXrOUBIK6SfkIRM4Z0dY3w+LiQ0vy3F57m0Z71bjbyeiWFiHJ8brqnmE6H6/jEuw==", + "dev": true + } } }, "esquery": { @@ -6467,12 +6375,12 @@ } }, "file-entry-cache": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", - "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-8.0.0.tgz", + "integrity": "sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==", "dev": true, "requires": { - "flat-cache": "^3.0.4" + "flat-cache": "^4.0.0" } }, "fill-range": { @@ -6501,14 +6409,13 @@ "dev": true }, "flat-cache": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.2.0.tgz", - "integrity": "sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-4.0.1.tgz", + "integrity": "sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==", "dev": true, "requires": { "flatted": "^3.2.9", - "keyv": "^4.5.3", - "rimraf": "^3.0.2" + "keyv": "^4.5.4" } }, "flatted": { @@ -6518,9 +6425,9 @@ "dev": true }, "foreground-child": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.2.1.tgz", - "integrity": "sha512-PXUUyLqrR2XCWICfv6ukppP96sdFwWbNEnfEMt7jNsISjMsvaLNinAHNDYyvkyU+SZG2BTSbT5NjG+vZslfGTA==", + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.3.0.tgz", + "integrity": "sha512-Ld2g8rrAyMYFXBhEqMz8ZAHBi4J4uS1i/CxGMDnjyFWddMXLVcDp051DZfu+t7+ab7Wv6SMqpWmyFIj5UbfFvg==", "dev": true, "requires": { "cross-spawn": "^7.0.0", @@ -6592,6 +6499,26 @@ "minipass": "^7.1.2", "package-json-from-dist": "^1.0.0", "path-scurry": "^1.11.1" + }, + "dependencies": { + "brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "requires": { + "balanced-match": "^1.0.0" + } + }, + "minimatch": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "dev": true, + "requires": { + "brace-expansion": "^2.0.1" + } + } } }, "glob-parent": { @@ -6632,6 +6559,12 @@ "get-intrinsic": "^1.1.3" } }, + "graceful-fs": { + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", + "dev": true + }, "graphemer": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", @@ -6700,9 +6633,9 @@ "dev": true }, "ignore": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.1.tgz", - "integrity": "sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw==", + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", + "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", "dev": true }, "import-fresh": { @@ -6758,15 +6691,6 @@ "binary-extensions": "^2.0.0" } }, - "is-core-module": { - "version": "2.15.0", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.15.0.tgz", - "integrity": "sha512-Dd+Lb2/zvk9SKy1TGCt1wFJFo/MWBPMX5x7KcvLajWTGuomczdQX61PvY5yK6SVACwpoexWo81IfFyoKY2QnTA==", - "dev": true, - "requires": { - "hasown": "^2.0.2" - } - }, "is-extglob": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", @@ -6910,14 +6834,15 @@ } }, "knip": { - "version": "5.27.0", - "resolved": "https://registry.npmjs.org/knip/-/knip-5.27.0.tgz", - "integrity": "sha512-W8+jhO7i5pXRUqOzhJGm2DT5/d9aQjyrYTCSojqJxFOvi7ku/nHKzpBO3WNf4eflJo0t3zitmUkM69g53qoZQw==", + "version": "5.27.2", + "resolved": "https://registry.npmjs.org/knip/-/knip-5.27.2.tgz", + "integrity": "sha512-Mya1XEDq1oygibQf0uocQd02Fil8RtvNVhcFAcxypjcc6zakT7wsJtS0xvuwEitilfI0tiFC9PghmJQ3DMKuTg==", "dev": true, "requires": { "@nodelib/fs.walk": "1.2.8", "@snyk/github-codeowners": "1.1.0", "easy-table": "1.2.0", + "enhanced-resolve": "^5.17.1", "fast-glob": "^3.3.2", "jiti": "^1.21.6", "js-yaml": "^4.1.0", @@ -6925,7 +6850,6 @@ "picocolors": "^1.0.0", "picomatch": "^4.0.1", "pretty-ms": "^9.0.0", - "resolve": "^1.22.8", "smol-toml": "^1.1.4", "strip-json-comments": "5.0.1", "summary": "2.1.0", @@ -7050,12 +6974,12 @@ "dev": true }, "minimatch": { - "version": "9.0.5", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", - "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "dev": true, "requires": { - "brace-expansion": "^2.0.1" + "brace-expansion": "^1.1.7" } }, "minimist": { @@ -7071,9 +6995,9 @@ "dev": true }, "mocha": { - "version": "10.7.0", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.7.0.tgz", - "integrity": "sha512-v8/rBWr2VO5YkspYINnvu81inSz2y3ODJrhO175/Exzor1RcEZZkizgE2A+w/CAXXoESS8Kys5E62dOHGHzULA==", + "version": "10.7.3", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.7.3.tgz", + "integrity": "sha512-uQWxAu44wwiACGqjbPYmjo7Lg8sFrS3dQe7PP2FQI+woptP4vZXSMcfMyFL/e1yFEeEpV4RtyTpZROOKmxis+A==", "dev": true, "requires": { "ansi-colors": "^4.1.3", @@ -7098,6 +7022,15 @@ "yargs-unparser": "^2.0.0" }, "dependencies": { + "brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "requires": { + "balanced-match": "^1.0.0" + } + }, "cliui": { "version": "7.0.4", "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", @@ -7198,9 +7131,9 @@ "dev": true }, "monocart-coverage-reports": { - "version": "2.10.0", - "resolved": "https://registry.npmjs.org/monocart-coverage-reports/-/monocart-coverage-reports-2.10.0.tgz", - "integrity": "sha512-PxMFUGQ3gDVmQVbKejfwgXHncDDFX5zldPQLLbYNacDq7qFft2K8hvroEDGztQ5DionF9ztiqlbgKIGmeMyBeA==", + "version": "2.10.2", + "resolved": "https://registry.npmjs.org/monocart-coverage-reports/-/monocart-coverage-reports-2.10.2.tgz", + "integrity": "sha512-bc/trWb39E7CxT6IQ8AG+JNkW9wo3yw5zMlFHzLqn1dZxHx1rRv/z/GmbvZ6saG3SSQPtarcpiEAaF3WjVFLTg==", "dev": true, "requires": { "@bcoe/v8-coverage": "^0.2.3", @@ -7351,24 +7284,12 @@ "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", "dev": true }, - "path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", - "dev": true - }, "path-key": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", "dev": true }, - "path-parse": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", - "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", - "dev": true - }, "path-scurry": { "version": "1.11.1", "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz", @@ -7404,13 +7325,13 @@ "dev": true }, "playwright": { - "version": "1.45.3", - "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.45.3.tgz", - "integrity": "sha512-QhVaS+lpluxCaioejDZ95l4Y4jSFCsBvl2UZkpeXlzxmqS+aABr5c82YmfMHrL6x27nvrvykJAFpkzT2eWdJww==", + "version": "1.46.0", + "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.46.0.tgz", + "integrity": "sha512-XYJ5WvfefWONh1uPAUAi0H2xXV5S3vrtcnXe6uAOgdGi3aSpqOSXX08IAjXW34xitfuOJsvXU5anXZxPSEQiJw==", "dev": true, "requires": { "fsevents": "2.3.2", - "playwright-core": "1.45.3" + "playwright-core": "1.46.0" }, "dependencies": { "fsevents": { @@ -7423,9 +7344,9 @@ } }, "playwright-core": { - "version": "1.45.3", - "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.45.3.tgz", - "integrity": "sha512-+ym0jNbcjikaOwwSZycFbwkWgfruWvYlJfThKYAlImbxUgdWFO2oW70ojPm4OpE4t6TAo2FY/smM+hpVTtkhDA==", + "version": "1.46.0", + "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.46.0.tgz", + "integrity": "sha512-9Y/d5UIwuJk8t3+lhmMSAJyNP1BUC/DqP3cQJDQQL/oWqAiuPTLgy7Q5dzglmTLwcBRdetzgNM/gni7ckfTr6A==", "dev": true }, "plur": { @@ -7503,17 +7424,6 @@ "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", "dev": true }, - "resolve": { - "version": "1.22.8", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz", - "integrity": "sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==", - "dev": true, - "requires": { - "is-core-module": "^2.13.0", - "path-parse": "^1.0.7", - "supports-preserve-symlinks-flag": "^1.0.0" - } - }, "resolve-from": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", @@ -7526,50 +7436,6 @@ "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", "dev": true }, - "rimraf": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", - "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", - "dev": true, - "requires": { - "glob": "^7.1.3" - }, - "dependencies": { - "brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "glob": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", - "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", - "dev": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "requires": { - "brace-expansion": "^1.1.7" - } - } - } - }, "run-parallel": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", @@ -7767,12 +7633,6 @@ "has-flag": "^4.0.0" } }, - "supports-preserve-symlinks-flag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", - "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", - "dev": true - }, "table-layout": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/table-layout/-/table-layout-1.0.2.tgz", @@ -7785,6 +7645,12 @@ "wordwrapjs": "^4.0.0" } }, + "tapable": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.1.tgz", + "integrity": "sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==", + "dev": true + }, "test-exclude": { "version": "7.0.1", "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-7.0.1.tgz", @@ -7794,6 +7660,26 @@ "@istanbuljs/schema": "^0.1.2", "glob": "^10.4.1", "minimatch": "^9.0.4" + }, + "dependencies": { + "brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "requires": { + "balanced-match": "^1.0.0" + } + }, + "minimatch": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "dev": true, + "requires": { + "brace-expansion": "^2.0.1" + } + } } }, "text-table": { @@ -7845,12 +7731,6 @@ "integrity": "sha512-Acylog8/luQ8L7il+geoSxhEkazvkslg7PSNKOX59mbB9cOveP5aq9h74Y7YU8yDpJwetzQQrfIwtf4Wp4LKcw==", "dev": true }, - "type-fest": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", - "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", - "dev": true - }, "typed-rest-client": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/typed-rest-client/-/typed-rest-client-2.0.2.tgz", @@ -7871,14 +7751,14 @@ "dev": true }, "typescript-eslint": { - "version": "7.18.0", - "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-7.18.0.tgz", - "integrity": "sha512-PonBkP603E3tt05lDkbOMyaxJjvKqQrXsnow72sVeOFINDE/qNmnnd+f9b4N+U7W6MXnnYyrhtmF2t08QWwUbA==", + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.1.0.tgz", + "integrity": "sha512-prB2U3jXPJLpo1iVLN338Lvolh6OrcCZO+9Yv6AR+tvegPPptYCDBIHiEEUdqRi8gAv2bXNKfMUrgAd2ejn/ow==", "dev": true, "requires": { - "@typescript-eslint/eslint-plugin": "7.18.0", - "@typescript-eslint/parser": "7.18.0", - "@typescript-eslint/utils": "7.18.0" + "@typescript-eslint/eslint-plugin": "8.1.0", + "@typescript-eslint/parser": "8.1.0", + "@typescript-eslint/utils": "8.1.0" } }, "typical": { diff --git a/package.json b/package.json index 71c804ccdccaa..ec6a428e90984 100644 --- a/package.json +++ b/package.json @@ -42,7 +42,7 @@ "@dprint/formatter": "^0.4.1", "@dprint/typescript": "0.91.6", "@esfx/canceltoken": "^1.0.0", - "@eslint/js": "^8.57.0", + "@eslint/js": "^9.9.0", "@octokit/rest": "^21.0.1", "@types/chai": "^4.3.17", "@types/diff": "^5.2.1", @@ -52,8 +52,9 @@ "@types/node": "latest", "@types/source-map-support": "^0.5.10", "@types/which": "^3.0.4", - "@typescript-eslint/utils": "^7.18.0", - "azure-devops-node-api": "^14.0.1", + "@typescript-eslint/rule-tester": "^8.1.0", + "@typescript-eslint/utils": "^8.1.0", + "azure-devops-node-api": "^14.0.2", "c8": "^10.1.2", "chai": "^4.5.0", "chalk": "^4.1.2", @@ -61,25 +62,25 @@ "diff": "^5.2.0", "dprint": "^0.47.2", "esbuild": "^0.23.0", - "eslint": "^8.57.0", - "eslint-formatter-autolinkable-stylish": "^1.3.0", + "eslint": "^9.9.0", + "eslint-formatter-autolinkable-stylish": "^1.4.0", "fast-xml-parser": "^4.4.1", "glob": "^10.4.5", "globals": "^15.9.0", "hereby": "^1.9.0", "jsonc-parser": "^3.3.1", - "knip": "^5.27.0", + "knip": "^5.27.2", "minimist": "^1.2.8", - "mocha": "^10.7.0", + "mocha": "^10.7.3", "mocha-fivemat-progress-reporter": "^0.1.0", - "monocart-coverage-reports": "^2.10.0", + "monocart-coverage-reports": "^2.10.2", "ms": "^2.1.3", "node-fetch": "^3.3.2", - "playwright": "^1.45.3", + "playwright": "^1.46.0", "source-map-support": "^0.5.21", "tslib": "^2.6.3", "typescript": "^5.5.4", - "typescript-eslint": "^7.18.0", + "typescript-eslint": "^8.1.0", "which": "^3.0.1" }, "overrides": { diff --git a/scripts/eslint/tests/argument-trivia.test.cjs b/scripts/eslint/tests/argument-trivia.test.cjs index 932a2bbf1c5d5..b8cfca79fe379 100644 --- a/scripts/eslint/tests/argument-trivia.test.cjs +++ b/scripts/eslint/tests/argument-trivia.test.cjs @@ -2,10 +2,11 @@ const { RuleTester } = require("./support/RuleTester.cjs"); const rule = require("../rules/argument-trivia.cjs"); const ruleTester = new RuleTester({ - parserOptions: { - warnOnUnsupportedTypeScriptVersion: false, + languageOptions: { + parserOptions: { + warnOnUnsupportedTypeScriptVersion: false, + }, }, - parser: require.resolve("@typescript-eslint/parser"), }); ruleTester.run("argument-trivia", rule, { diff --git a/scripts/eslint/tests/debug-assert.test.cjs b/scripts/eslint/tests/debug-assert.test.cjs index 702017ff7afec..9d12d7a718ff1 100644 --- a/scripts/eslint/tests/debug-assert.test.cjs +++ b/scripts/eslint/tests/debug-assert.test.cjs @@ -2,10 +2,11 @@ const { RuleTester } = require("./support/RuleTester.cjs"); const rule = require("../rules/debug-assert.cjs"); const ruleTester = new RuleTester({ - parserOptions: { - warnOnUnsupportedTypeScriptVersion: false, + languageOptions: { + parserOptions: { + warnOnUnsupportedTypeScriptVersion: false, + }, }, - parser: require.resolve("@typescript-eslint/parser"), }); ruleTester.run("debug-assert", rule, { diff --git a/scripts/eslint/tests/js-extensions.cjs b/scripts/eslint/tests/js-extensions.cjs index 177070ab5f520..8eab1a4541a95 100644 --- a/scripts/eslint/tests/js-extensions.cjs +++ b/scripts/eslint/tests/js-extensions.cjs @@ -2,10 +2,11 @@ const { RuleTester } = require("./support/RuleTester.cjs"); const rule = require("../rules/js-extensions.cjs"); const ruleTester = new RuleTester({ - parserOptions: { - warnOnUnsupportedTypeScriptVersion: false, + languageOptions: { + parserOptions: { + warnOnUnsupportedTypeScriptVersion: false, + }, }, - parser: require.resolve("@typescript-eslint/parser"), }); ruleTester.run("js-extensions", rule, { diff --git a/scripts/eslint/tests/no-in-operator.test.cjs b/scripts/eslint/tests/no-in-operator.test.cjs index 0df73219bc872..7f24bc9dcfe29 100644 --- a/scripts/eslint/tests/no-in-operator.test.cjs +++ b/scripts/eslint/tests/no-in-operator.test.cjs @@ -2,10 +2,11 @@ const { RuleTester } = require("./support/RuleTester.cjs"); const rule = require("../rules/no-in-operator.cjs"); const ruleTester = new RuleTester({ - parserOptions: { - warnOnUnsupportedTypeScriptVersion: false, + languageOptions: { + parserOptions: { + warnOnUnsupportedTypeScriptVersion: false, + }, }, - parser: require.resolve("@typescript-eslint/parser"), }); ruleTester.run("no-in-operator", rule, { diff --git a/scripts/eslint/tests/no-keywords.test.cjs b/scripts/eslint/tests/no-keywords.test.cjs index 731b05a9d1ffe..9a598725df786 100644 --- a/scripts/eslint/tests/no-keywords.test.cjs +++ b/scripts/eslint/tests/no-keywords.test.cjs @@ -2,10 +2,11 @@ const { RuleTester } = require("./support/RuleTester.cjs"); const rule = require("../rules/no-keywords.cjs"); const ruleTester = new RuleTester({ - parserOptions: { - warnOnUnsupportedTypeScriptVersion: false, + languageOptions: { + parserOptions: { + warnOnUnsupportedTypeScriptVersion: false, + }, }, - parser: require.resolve("@typescript-eslint/parser"), }); ruleTester.run("no-keywords", rule, { diff --git a/scripts/eslint/tests/only-arrow-functions.test.cjs b/scripts/eslint/tests/only-arrow-functions.test.cjs index 52945d44f39f0..20bd0f07902fa 100644 --- a/scripts/eslint/tests/only-arrow-functions.test.cjs +++ b/scripts/eslint/tests/only-arrow-functions.test.cjs @@ -2,10 +2,11 @@ const { RuleTester } = require("./support/RuleTester.cjs"); const rule = require("../rules/only-arrow-functions.cjs"); const ruleTester = new RuleTester({ - parserOptions: { - warnOnUnsupportedTypeScriptVersion: false, + languageOptions: { + parserOptions: { + warnOnUnsupportedTypeScriptVersion: false, + }, }, - parser: require.resolve("@typescript-eslint/parser"), }); ruleTester.run("only-arrow-functions", rule, { diff --git a/scripts/eslint/tests/support/RuleTester.cjs b/scripts/eslint/tests/support/RuleTester.cjs index 44e093d48e50a..51ed464060f69 100644 --- a/scripts/eslint/tests/support/RuleTester.cjs +++ b/scripts/eslint/tests/support/RuleTester.cjs @@ -1,6 +1,9 @@ const path = require("path"); -const { TSESLint } = require("@typescript-eslint/utils"); +const Mocha = require("mocha"); +const { RuleTester } = require("@typescript-eslint/rule-tester"); + +RuleTester.afterAll = Mocha.after; module.exports.ROOT_DIR = path.join(process.cwd(), "scripts", "eslint", "tests", "fixtures"); module.exports.FILENAME = path.join(module.exports.ROOT_DIR, "file.ts"); -module.exports.RuleTester = TSESLint.RuleTester; +module.exports.RuleTester = RuleTester; diff --git a/scripts/failed-tests.cjs b/scripts/failed-tests.cjs index c214f6eea90b1..e871cb37a2888 100644 --- a/scripts/failed-tests.cjs +++ b/scripts/failed-tests.cjs @@ -45,7 +45,7 @@ class FailedTestsReporter extends Mocha.reporters.Base { try { reporter = require(reporterOptions.reporter); } - catch (_) { + catch { reporter = require(path.resolve(process.cwd(), reporterOptions.reporter)); } } diff --git a/scripts/find-unused-diganostic-messages.mjs b/scripts/find-unused-diganostic-messages.mjs index ad116ef5a5325..0b2ddbdd41f6a 100644 --- a/scripts/find-unused-diganostic-messages.mjs +++ b/scripts/find-unused-diganostic-messages.mjs @@ -18,7 +18,7 @@ startOfDiags.split(EOL).forEach(line => { execSync(`grep -rnw 'src' -e 'Diagnostics.${diagName}'`).toString(); process.stdout.write("."); } - catch (error) { + catch { missingNames.push(diagName); process.stdout.write("x"); } diff --git a/src/compiler/sys.ts b/src/compiler/sys.ts index a279719aeb205..13340095ce102 100644 --- a/src/compiler/sys.ts +++ b/src/compiler/sys.ts @@ -1792,7 +1792,7 @@ export let sys: System = (() => { try { buffer = _fs.readFileSync(fileName); } - catch (e) { + catch { return undefined; } let len = buffer.length; @@ -1863,7 +1863,7 @@ export let sys: System = (() => { continue; } } - catch (e) { + catch { continue; } } @@ -1882,7 +1882,7 @@ export let sys: System = (() => { directories.sort(); return { files, directories }; } - catch (e) { + catch { return emptyFileSystemEntries; } } @@ -1911,7 +1911,7 @@ export let sys: System = (() => { return false; } } - catch (e) { + catch { return false; } finally { @@ -1952,7 +1952,7 @@ export let sys: System = (() => { try { return statSync(path)?.mtime; } - catch (e) { + catch { return undefined; } finally { @@ -1964,7 +1964,7 @@ export let sys: System = (() => { try { _fs.utimesSync(path, time, time); } - catch (e) { + catch { return; } } @@ -1973,7 +1973,7 @@ export let sys: System = (() => { try { return _fs.unlinkSync(path); } - catch (e) { + catch { return; } } diff --git a/src/compiler/utilitiesPublic.ts b/src/compiler/utilitiesPublic.ts index dfc3f2d069bde..a5b8b44ca5957 100644 --- a/src/compiler/utilitiesPublic.ts +++ b/src/compiler/utilitiesPublic.ts @@ -723,7 +723,7 @@ export function validateLocaleAndSetLanguage( try { fileContents = sys.readFile(filePath); } - catch (e) { + catch { if (errors) { errors.push(createCompilerDiagnostic(Diagnostics.Unable_to_open_file_0, filePath)); } diff --git a/src/compiler/watchUtilities.ts b/src/compiler/watchUtilities.ts index 793a5b51ee3db..e2e5c87cc8fa6 100644 --- a/src/compiler/watchUtilities.ts +++ b/src/compiler/watchUtilities.ts @@ -198,7 +198,7 @@ export function createCachedDirectoryStructureHost(host: DirectoryStructureHost, try { return createCachedFileSystemEntries(rootDir, rootDirPath); } - catch (_e) { + catch { // If there is exception to read directories, dont cache the result and direct the calls to host Debug.assert(!cachedReadDirectoryResult.has(ensureTrailingDirectorySeparator(rootDirPath))); return undefined; diff --git a/src/harness/harnessUtils.ts b/src/harness/harnessUtils.ts index b049c51d5f416..c93cf652656bf 100644 --- a/src/harness/harnessUtils.ts +++ b/src/harness/harnessUtils.ts @@ -41,7 +41,7 @@ export function readTestFile(path: string) { try { content = Harness.IO.readFile(Harness.userSpecifiedRoot + path); } - catch (err) { + catch { return undefined; } diff --git a/src/tsserver/nodeServer.ts b/src/tsserver/nodeServer.ts index 6e89f665fe436..376caaa0e6ae8 100644 --- a/src/tsserver/nodeServer.ts +++ b/src/tsserver/nodeServer.ts @@ -124,7 +124,7 @@ export function initializeNodeSystem(): StartInput { try { this.fd = fs.openSync(this.logFilename, "w"); } - catch (_) { + catch { // swallow the error and keep logging disabled if file cannot be opened } } @@ -280,7 +280,7 @@ export function initializeNodeSystem(): StartInput { const factory = require("./cancellationToken.js"); cancellationToken = factory(sys.args); } - catch (e) { + catch { cancellationToken = ts.server.nullCancellationToken; } diff --git a/src/typingsInstaller/nodeTypingsInstaller.ts b/src/typingsInstaller/nodeTypingsInstaller.ts index 984d7b80c5b7e..e9fcfdfb5333d 100644 --- a/src/typingsInstaller/nodeTypingsInstaller.ts +++ b/src/typingsInstaller/nodeTypingsInstaller.ts @@ -28,7 +28,7 @@ class FileLog implements ts.server.typingsInstaller.Log { try { fs.appendFileSync(this.logFile, `[${ts.server.nowString()}] ${text}${sys.newLine}`); } - catch (e) { + catch { this.logFile = undefined; } }; From 562b815ba3bdda764db4ba71bef6f7c44cec4918 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20Burzy=C5=84ski?= Date: Tue, 13 Aug 2024 19:19:46 +0200 Subject: [PATCH 25/50] Add a regression test related to narrowing in plain JS files (#59611) --- .../reference/narrowingPlainJsNoCrash1.js | 21 ++++++++ .../narrowingPlainJsNoCrash1.symbols | 26 ++++++++++ .../reference/narrowingPlainJsNoCrash1.types | 48 +++++++++++++++++++ .../compiler/narrowingPlainJsNoCrash1.ts | 13 +++++ 4 files changed, 108 insertions(+) create mode 100644 tests/baselines/reference/narrowingPlainJsNoCrash1.js create mode 100644 tests/baselines/reference/narrowingPlainJsNoCrash1.symbols create mode 100644 tests/baselines/reference/narrowingPlainJsNoCrash1.types create mode 100644 tests/cases/compiler/narrowingPlainJsNoCrash1.ts diff --git a/tests/baselines/reference/narrowingPlainJsNoCrash1.js b/tests/baselines/reference/narrowingPlainJsNoCrash1.js new file mode 100644 index 0000000000000..f83a5c5c0108b --- /dev/null +++ b/tests/baselines/reference/narrowingPlainJsNoCrash1.js @@ -0,0 +1,21 @@ +//// [tests/cases/compiler/narrowingPlainJsNoCrash1.ts] //// + +//// [index.js] +// https://github.com/microsoft/TypeScript/issues/59594 + +var a$b = {}; +var c, d; +d = a$b; +while (d !== a$b); +while ((c = a$b != a$b)) c.e; + + +//// [index.js] +// https://github.com/microsoft/TypeScript/issues/59594 +var a$b = {}; +var c, d; +d = a$b; +while (d !== a$b) + ; +while ((c = a$b != a$b)) + c.e; diff --git a/tests/baselines/reference/narrowingPlainJsNoCrash1.symbols b/tests/baselines/reference/narrowingPlainJsNoCrash1.symbols new file mode 100644 index 0000000000000..5fc0fbfa238ba --- /dev/null +++ b/tests/baselines/reference/narrowingPlainJsNoCrash1.symbols @@ -0,0 +1,26 @@ +//// [tests/cases/compiler/narrowingPlainJsNoCrash1.ts] //// + +=== index.js === +// https://github.com/microsoft/TypeScript/issues/59594 + +var a$b = {}; +>a$b : Symbol(a$b, Decl(index.js, 2, 3)) + +var c, d; +>c : Symbol(c, Decl(index.js, 3, 3)) +>d : Symbol(d, Decl(index.js, 3, 6)) + +d = a$b; +>d : Symbol(d, Decl(index.js, 3, 6)) +>a$b : Symbol(a$b, Decl(index.js, 2, 3)) + +while (d !== a$b); +>d : Symbol(d, Decl(index.js, 3, 6)) +>a$b : Symbol(a$b, Decl(index.js, 2, 3)) + +while ((c = a$b != a$b)) c.e; +>c : Symbol(c, Decl(index.js, 3, 3)) +>a$b : Symbol(a$b, Decl(index.js, 2, 3)) +>a$b : Symbol(a$b, Decl(index.js, 2, 3)) +>c : Symbol(c, Decl(index.js, 3, 3)) + diff --git a/tests/baselines/reference/narrowingPlainJsNoCrash1.types b/tests/baselines/reference/narrowingPlainJsNoCrash1.types new file mode 100644 index 0000000000000..364d7c4f6de77 --- /dev/null +++ b/tests/baselines/reference/narrowingPlainJsNoCrash1.types @@ -0,0 +1,48 @@ +//// [tests/cases/compiler/narrowingPlainJsNoCrash1.ts] //// + +=== index.js === +// https://github.com/microsoft/TypeScript/issues/59594 + +var a$b = {}; +>a$b : {} +> : ^^ +>{} : {} +> : ^^ + +var c, d; +>c : any +>d : any + +d = a$b; +>d = a$b : {} +> : ^^ +>d : any +>a$b : {} +> : ^^ + +while (d !== a$b); +>d !== a$b : boolean +> : ^^^^^^^ +>d : {} +> : ^^ +>a$b : {} +> : ^^ + +while ((c = a$b != a$b)) c.e; +>(c = a$b != a$b) : boolean +> : ^^^^^^^ +>c = a$b != a$b : boolean +> : ^^^^^^^ +>c : any +>a$b != a$b : boolean +> : ^^^^^^^ +>a$b : {} +> : ^^ +>a$b : {} +> : ^^ +>c.e : error +>c : true +> : ^^^^ +>e : any +> : ^^^ + diff --git a/tests/cases/compiler/narrowingPlainJsNoCrash1.ts b/tests/cases/compiler/narrowingPlainJsNoCrash1.ts new file mode 100644 index 0000000000000..260d04188ed39 --- /dev/null +++ b/tests/cases/compiler/narrowingPlainJsNoCrash1.ts @@ -0,0 +1,13 @@ +// @allowJs: true +// @checkJs: false +// @outDir: true + +// @filename: index.js + +// https://github.com/microsoft/TypeScript/issues/59594 + +var a$b = {}; +var c, d; +d = a$b; +while (d !== a$b); +while ((c = a$b != a$b)) c.e; From 03bca1d8fe4282a0af0735c48ae6c8be36c84394 Mon Sep 17 00:00:00 2001 From: Wesley Wigham Date: Tue, 13 Aug 2024 11:55:27 -0700 Subject: [PATCH 26/50] Allow trailing commas on lambda type parameter lists (#59612) --- src/compiler/emitter.ts | 2 +- src/testRunner/unittests/printer.ts | 11 +++++++++++ ...ileCorrectly.lambda type parameter lists in tsx.js | 1 + 3 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 tests/baselines/reference/printerApi/printsFileCorrectly.lambda type parameter lists in tsx.js diff --git a/src/compiler/emitter.ts b/src/compiler/emitter.ts index 6f68329ba0a90..493e60af2b820 100644 --- a/src/compiler/emitter.ts +++ b/src/compiler/emitter.ts @@ -4508,7 +4508,7 @@ export function createPrinter(printerOptions: PrinterOptions = {}, handlers: Pri if (isFunctionLike(parentNode) && parentNode.typeArguments) { // Quick info uses type arguments in place of type parameters on instantiated signatures return emitTypeArguments(parentNode, parentNode.typeArguments); } - emitList(parentNode, typeParameters, ListFormat.TypeParameters); + emitList(parentNode, typeParameters, ListFormat.TypeParameters | (isArrowFunction(parentNode) ? ListFormat.AllowTrailingComma : ListFormat.None)); } function emitParameters(parentNode: Node, parameters: NodeArray) { diff --git a/src/testRunner/unittests/printer.ts b/src/testRunner/unittests/printer.ts index 76f23ab692fb0..86a7b41d167af 100644 --- a/src/testRunner/unittests/printer.ts +++ b/src/testRunner/unittests/printer.ts @@ -100,6 +100,17 @@ describe("unittests:: PrinterAPI", () => { ts.ScriptKind.TSX, )); }); + + // https://github.com/microsoft/TypeScript/issues/59587 + printsCorrectly("lambda type parameter lists in tsx", {}, printer => { + return printer.printFile(ts.createSourceFile( + "source.tsx", + String.raw`export const id = (id: T): T => id`, + ts.ScriptTarget.ESNext, + /*setParentNodes*/ undefined, + ts.ScriptKind.TSX, + )); + }); }); describe("No duplicate ref directives when emiting .d.ts->.d.ts", () => { diff --git a/tests/baselines/reference/printerApi/printsFileCorrectly.lambda type parameter lists in tsx.js b/tests/baselines/reference/printerApi/printsFileCorrectly.lambda type parameter lists in tsx.js new file mode 100644 index 0000000000000..c28604711e83b --- /dev/null +++ b/tests/baselines/reference/printerApi/printsFileCorrectly.lambda type parameter lists in tsx.js @@ -0,0 +1 @@ +export const id = (id: T): T => id; From 0ae769a0d9b11c509395e513017d5c1ef84f9684 Mon Sep 17 00:00:00 2001 From: Jake Bailey <5341706+jakebailey@users.noreply.github.com> Date: Tue, 13 Aug 2024 12:33:32 -0700 Subject: [PATCH 27/50] Add v8-json to coverage output for use with monocart VS Code extension (#59621) --- .c8rc.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.c8rc.json b/.c8rc.json index cf7d1472ca571..8d56ebe23e7ea 100644 --- a/.c8rc.json +++ b/.c8rc.json @@ -1,5 +1,5 @@ { - "reporter": ["lcovonly", "cobertura", "v8", "codecov"], + "reporter": ["lcovonly", "cobertura", "v8", "v8-json", "codecov"], "src": "src", "include": ["src/**", "built/local/**"], "exclude": ["**/node_modules/**"], From a5e0385edf0d36a7277a93825680ae10765a7946 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20Burzy=C5=84ski?= Date: Tue, 13 Aug 2024 22:35:58 +0200 Subject: [PATCH 28/50] Avoid reporting EPC on unannotated using declarations (#59590) --- src/compiler/checker.ts | 4 +- ...DeclarationsWithObjectLiterals1.errors.txt | 51 ++++++ ...ingDeclarationsWithObjectLiterals1.symbols | 105 +++++++++++ ...usingDeclarationsWithObjectLiterals1.types | 169 ++++++++++++++++++ ...jectLiterals2(noimplicitany=false).symbols | 28 +++ ...ObjectLiterals2(noimplicitany=false).types | 45 +++++ ...ctLiterals2(noimplicitany=true).errors.txt | 21 +++ ...bjectLiterals2(noimplicitany=true).symbols | 28 +++ ...hObjectLiterals2(noimplicitany=true).types | 45 +++++ .../usingDeclarationsWithObjectLiterals1.ts | 47 +++++ .../usingDeclarationsWithObjectLiterals2.ts | 18 ++ 11 files changed, 559 insertions(+), 2 deletions(-) create mode 100644 tests/baselines/reference/usingDeclarationsWithObjectLiterals1.errors.txt create mode 100644 tests/baselines/reference/usingDeclarationsWithObjectLiterals1.symbols create mode 100644 tests/baselines/reference/usingDeclarationsWithObjectLiterals1.types create mode 100644 tests/baselines/reference/usingDeclarationsWithObjectLiterals2(noimplicitany=false).symbols create mode 100644 tests/baselines/reference/usingDeclarationsWithObjectLiterals2(noimplicitany=false).types create mode 100644 tests/baselines/reference/usingDeclarationsWithObjectLiterals2(noimplicitany=true).errors.txt create mode 100644 tests/baselines/reference/usingDeclarationsWithObjectLiterals2(noimplicitany=true).symbols create mode 100644 tests/baselines/reference/usingDeclarationsWithObjectLiterals2(noimplicitany=true).types create mode 100644 tests/cases/conformance/statements/VariableStatements/usingDeclarations/usingDeclarationsWithObjectLiterals1.ts create mode 100644 tests/cases/conformance/statements/VariableStatements/usingDeclarations/usingDeclarationsWithObjectLiterals2.ts diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index ea28b2780268c..71256ad716036 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -44105,14 +44105,14 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { const globalDisposableType = getGlobalDisposableType(/*reportErrors*/ true); if (globalAsyncDisposableType !== emptyObjectType && globalDisposableType !== emptyObjectType) { const optionalDisposableType = getUnionType([globalAsyncDisposableType, globalDisposableType, nullType, undefinedType]); - checkTypeAssignableTo(initializerType, optionalDisposableType, initializer, Diagnostics.The_initializer_of_an_await_using_declaration_must_be_either_an_object_with_a_Symbol_asyncDispose_or_Symbol_dispose_method_or_be_null_or_undefined); + checkTypeAssignableTo(widenTypeForVariableLikeDeclaration(initializerType, node), optionalDisposableType, initializer, Diagnostics.The_initializer_of_an_await_using_declaration_must_be_either_an_object_with_a_Symbol_asyncDispose_or_Symbol_dispose_method_or_be_null_or_undefined); } } else if (blockScopeKind === NodeFlags.Using) { const globalDisposableType = getGlobalDisposableType(/*reportErrors*/ true); if (globalDisposableType !== emptyObjectType) { const optionalDisposableType = getUnionType([globalDisposableType, nullType, undefinedType]); - checkTypeAssignableTo(initializerType, optionalDisposableType, initializer, Diagnostics.The_initializer_of_a_using_declaration_must_be_either_an_object_with_a_Symbol_dispose_method_or_be_null_or_undefined); + checkTypeAssignableTo(widenTypeForVariableLikeDeclaration(initializerType, node), optionalDisposableType, initializer, Diagnostics.The_initializer_of_a_using_declaration_must_be_either_an_object_with_a_Symbol_dispose_method_or_be_null_or_undefined); } } } diff --git a/tests/baselines/reference/usingDeclarationsWithObjectLiterals1.errors.txt b/tests/baselines/reference/usingDeclarationsWithObjectLiterals1.errors.txt new file mode 100644 index 0000000000000..6cbff0d5a3df9 --- /dev/null +++ b/tests/baselines/reference/usingDeclarationsWithObjectLiterals1.errors.txt @@ -0,0 +1,51 @@ +usingDeclarationsWithObjectLiterals1.ts(15,62): error TS2353: Object literal may only specify known properties, and 'extra' does not exist in type 'MyDisposable'. +usingDeclarationsWithObjectLiterals1.ts(36,7): error TS2353: Object literal may only specify known properties, and 'extra' does not exist in type 'MyAsyncDisposable'. + + +==== usingDeclarationsWithObjectLiterals1.ts (2 errors) ==== + interface MyDisposable { + value: number; + [Symbol.dispose](): void; + } + + { + using _ = { [Symbol.dispose]() {} }; + } + + { + using _ = { [Symbol.dispose]() {}, value: 1 }; + } + + { + using _: MyDisposable = { [Symbol.dispose]() {}, value: 1, extra: "foo" }; + ~~~~~ +!!! error TS2353: Object literal may only specify known properties, and 'extra' does not exist in type 'MyDisposable'. + } + + interface MyAsyncDisposable { + value: number; + [Symbol.asyncDispose](): Promise; + } + + async function f() { + { + await using _ = { async [Symbol.asyncDispose]() {} }; + } + + { + await using _ = { async [Symbol.asyncDispose]() {}, value: 1 }; + } + + { + await using _: MyAsyncDisposable = { + async [Symbol.asyncDispose]() {}, + value: 1, + extra: "foo", + ~~~~~ +!!! error TS2353: Object literal may only specify known properties, and 'extra' does not exist in type 'MyAsyncDisposable'. + }; + } + } + + export {}; + \ No newline at end of file diff --git a/tests/baselines/reference/usingDeclarationsWithObjectLiterals1.symbols b/tests/baselines/reference/usingDeclarationsWithObjectLiterals1.symbols new file mode 100644 index 0000000000000..9b4fa4afbda86 --- /dev/null +++ b/tests/baselines/reference/usingDeclarationsWithObjectLiterals1.symbols @@ -0,0 +1,105 @@ +//// [tests/cases/conformance/statements/VariableStatements/usingDeclarations/usingDeclarationsWithObjectLiterals1.ts] //// + +=== usingDeclarationsWithObjectLiterals1.ts === +interface MyDisposable { +>MyDisposable : Symbol(MyDisposable, Decl(usingDeclarationsWithObjectLiterals1.ts, 0, 0)) + + value: number; +>value : Symbol(MyDisposable.value, Decl(usingDeclarationsWithObjectLiterals1.ts, 0, 24)) + + [Symbol.dispose](): void; +>[Symbol.dispose] : Symbol(MyDisposable[Symbol.dispose], Decl(usingDeclarationsWithObjectLiterals1.ts, 1, 16)) +>Symbol.dispose : Symbol(SymbolConstructor.dispose, Decl(lib.esnext.disposable.d.ts, --, --)) +>Symbol : Symbol(Symbol, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2019.symbol.d.ts, --, --)) +>dispose : Symbol(SymbolConstructor.dispose, Decl(lib.esnext.disposable.d.ts, --, --)) +} + +{ + using _ = { [Symbol.dispose]() {} }; +>_ : Symbol(_, Decl(usingDeclarationsWithObjectLiterals1.ts, 6, 7)) +>[Symbol.dispose] : Symbol([Symbol.dispose], Decl(usingDeclarationsWithObjectLiterals1.ts, 6, 13)) +>Symbol.dispose : Symbol(SymbolConstructor.dispose, Decl(lib.esnext.disposable.d.ts, --, --)) +>Symbol : Symbol(Symbol, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2019.symbol.d.ts, --, --)) +>dispose : Symbol(SymbolConstructor.dispose, Decl(lib.esnext.disposable.d.ts, --, --)) +} + +{ + using _ = { [Symbol.dispose]() {}, value: 1 }; +>_ : Symbol(_, Decl(usingDeclarationsWithObjectLiterals1.ts, 10, 7)) +>[Symbol.dispose] : Symbol([Symbol.dispose], Decl(usingDeclarationsWithObjectLiterals1.ts, 10, 13)) +>Symbol.dispose : Symbol(SymbolConstructor.dispose, Decl(lib.esnext.disposable.d.ts, --, --)) +>Symbol : Symbol(Symbol, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2019.symbol.d.ts, --, --)) +>dispose : Symbol(SymbolConstructor.dispose, Decl(lib.esnext.disposable.d.ts, --, --)) +>value : Symbol(value, Decl(usingDeclarationsWithObjectLiterals1.ts, 10, 36)) +} + +{ + using _: MyDisposable = { [Symbol.dispose]() {}, value: 1, extra: "foo" }; +>_ : Symbol(_, Decl(usingDeclarationsWithObjectLiterals1.ts, 14, 7)) +>MyDisposable : Symbol(MyDisposable, Decl(usingDeclarationsWithObjectLiterals1.ts, 0, 0)) +>[Symbol.dispose] : Symbol([Symbol.dispose], Decl(usingDeclarationsWithObjectLiterals1.ts, 14, 27)) +>Symbol.dispose : Symbol(SymbolConstructor.dispose, Decl(lib.esnext.disposable.d.ts, --, --)) +>Symbol : Symbol(Symbol, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2019.symbol.d.ts, --, --)) +>dispose : Symbol(SymbolConstructor.dispose, Decl(lib.esnext.disposable.d.ts, --, --)) +>value : Symbol(value, Decl(usingDeclarationsWithObjectLiterals1.ts, 14, 50)) +>extra : Symbol(extra, Decl(usingDeclarationsWithObjectLiterals1.ts, 14, 60)) +} + +interface MyAsyncDisposable { +>MyAsyncDisposable : Symbol(MyAsyncDisposable, Decl(usingDeclarationsWithObjectLiterals1.ts, 15, 1)) + + value: number; +>value : Symbol(MyAsyncDisposable.value, Decl(usingDeclarationsWithObjectLiterals1.ts, 17, 29)) + + [Symbol.asyncDispose](): Promise; +>[Symbol.asyncDispose] : Symbol(MyAsyncDisposable[Symbol.asyncDispose], Decl(usingDeclarationsWithObjectLiterals1.ts, 18, 16)) +>Symbol.asyncDispose : Symbol(SymbolConstructor.asyncDispose, Decl(lib.esnext.disposable.d.ts, --, --)) +>Symbol : Symbol(Symbol, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2019.symbol.d.ts, --, --)) +>asyncDispose : Symbol(SymbolConstructor.asyncDispose, Decl(lib.esnext.disposable.d.ts, --, --)) +>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2018.promise.d.ts, --, --)) +} + +async function f() { +>f : Symbol(f, Decl(usingDeclarationsWithObjectLiterals1.ts, 20, 1)) + { + await using _ = { async [Symbol.asyncDispose]() {} }; +>_ : Symbol(_, Decl(usingDeclarationsWithObjectLiterals1.ts, 24, 15)) +>[Symbol.asyncDispose] : Symbol([Symbol.asyncDispose], Decl(usingDeclarationsWithObjectLiterals1.ts, 24, 21)) +>Symbol.asyncDispose : Symbol(SymbolConstructor.asyncDispose, Decl(lib.esnext.disposable.d.ts, --, --)) +>Symbol : Symbol(Symbol, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2019.symbol.d.ts, --, --)) +>asyncDispose : Symbol(SymbolConstructor.asyncDispose, Decl(lib.esnext.disposable.d.ts, --, --)) + } + + { + await using _ = { async [Symbol.asyncDispose]() {}, value: 1 }; +>_ : Symbol(_, Decl(usingDeclarationsWithObjectLiterals1.ts, 28, 15)) +>[Symbol.asyncDispose] : Symbol([Symbol.asyncDispose], Decl(usingDeclarationsWithObjectLiterals1.ts, 28, 21)) +>Symbol.asyncDispose : Symbol(SymbolConstructor.asyncDispose, Decl(lib.esnext.disposable.d.ts, --, --)) +>Symbol : Symbol(Symbol, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2019.symbol.d.ts, --, --)) +>asyncDispose : Symbol(SymbolConstructor.asyncDispose, Decl(lib.esnext.disposable.d.ts, --, --)) +>value : Symbol(value, Decl(usingDeclarationsWithObjectLiterals1.ts, 28, 55)) + } + + { + await using _: MyAsyncDisposable = { +>_ : Symbol(_, Decl(usingDeclarationsWithObjectLiterals1.ts, 32, 15)) +>MyAsyncDisposable : Symbol(MyAsyncDisposable, Decl(usingDeclarationsWithObjectLiterals1.ts, 15, 1)) + + async [Symbol.asyncDispose]() {}, +>[Symbol.asyncDispose] : Symbol([Symbol.asyncDispose], Decl(usingDeclarationsWithObjectLiterals1.ts, 32, 40)) +>Symbol.asyncDispose : Symbol(SymbolConstructor.asyncDispose, Decl(lib.esnext.disposable.d.ts, --, --)) +>Symbol : Symbol(Symbol, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2019.symbol.d.ts, --, --)) +>asyncDispose : Symbol(SymbolConstructor.asyncDispose, Decl(lib.esnext.disposable.d.ts, --, --)) + + value: 1, +>value : Symbol(value, Decl(usingDeclarationsWithObjectLiterals1.ts, 33, 39)) + + extra: "foo", +>extra : Symbol(extra, Decl(usingDeclarationsWithObjectLiterals1.ts, 34, 15)) + + }; + } +} + +export {}; + diff --git a/tests/baselines/reference/usingDeclarationsWithObjectLiterals1.types b/tests/baselines/reference/usingDeclarationsWithObjectLiterals1.types new file mode 100644 index 0000000000000..84f6f09b8de64 --- /dev/null +++ b/tests/baselines/reference/usingDeclarationsWithObjectLiterals1.types @@ -0,0 +1,169 @@ +//// [tests/cases/conformance/statements/VariableStatements/usingDeclarations/usingDeclarationsWithObjectLiterals1.ts] //// + +=== usingDeclarationsWithObjectLiterals1.ts === +interface MyDisposable { + value: number; +>value : number +> : ^^^^^^ + + [Symbol.dispose](): void; +>[Symbol.dispose] : () => void +> : ^^^^^^ +>Symbol.dispose : unique symbol +> : ^^^^^^^^^^^^^ +>Symbol : SymbolConstructor +> : ^^^^^^^^^^^^^^^^^ +>dispose : unique symbol +> : ^^^^^^^^^^^^^ +} + +{ + using _ = { [Symbol.dispose]() {} }; +>_ : { [Symbol.dispose](): void; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>{ [Symbol.dispose]() {} } : { [Symbol.dispose](): void; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>[Symbol.dispose] : () => void +> : ^^^^^^^^^^ +>Symbol.dispose : unique symbol +> : ^^^^^^^^^^^^^ +>Symbol : SymbolConstructor +> : ^^^^^^^^^^^^^^^^^ +>dispose : unique symbol +> : ^^^^^^^^^^^^^ +} + +{ + using _ = { [Symbol.dispose]() {}, value: 1 }; +>_ : { [Symbol.dispose](): void; value: number; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>{ [Symbol.dispose]() {}, value: 1 } : { [Symbol.dispose](): void; value: number; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>[Symbol.dispose] : () => void +> : ^^^^^^^^^^ +>Symbol.dispose : unique symbol +> : ^^^^^^^^^^^^^ +>Symbol : SymbolConstructor +> : ^^^^^^^^^^^^^^^^^ +>dispose : unique symbol +> : ^^^^^^^^^^^^^ +>value : number +> : ^^^^^^ +>1 : 1 +> : ^ +} + +{ + using _: MyDisposable = { [Symbol.dispose]() {}, value: 1, extra: "foo" }; +>_ : MyDisposable +> : ^^^^^^^^^^^^ +>{ [Symbol.dispose]() {}, value: 1, extra: "foo" } : { [Symbol.dispose](): void; value: number; extra: string; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>[Symbol.dispose] : () => void +> : ^^^^^^^^^^ +>Symbol.dispose : unique symbol +> : ^^^^^^^^^^^^^ +>Symbol : SymbolConstructor +> : ^^^^^^^^^^^^^^^^^ +>dispose : unique symbol +> : ^^^^^^^^^^^^^ +>value : number +> : ^^^^^^ +>1 : 1 +> : ^ +>extra : string +> : ^^^^^^ +>"foo" : "foo" +> : ^^^^^ +} + +interface MyAsyncDisposable { + value: number; +>value : number +> : ^^^^^^ + + [Symbol.asyncDispose](): Promise; +>[Symbol.asyncDispose] : () => Promise +> : ^^^^^^ +>Symbol.asyncDispose : unique symbol +> : ^^^^^^^^^^^^^ +>Symbol : SymbolConstructor +> : ^^^^^^^^^^^^^^^^^ +>asyncDispose : unique symbol +> : ^^^^^^^^^^^^^ +} + +async function f() { +>f : () => Promise +> : ^^^^^^^^^^^^^^^^^^^ + { + await using _ = { async [Symbol.asyncDispose]() {} }; +>_ : { [Symbol.asyncDispose](): Promise; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>{ async [Symbol.asyncDispose]() {} } : { [Symbol.asyncDispose](): Promise; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>[Symbol.asyncDispose] : () => Promise +> : ^^^^^^^^^^^^^^^^^^^ +>Symbol.asyncDispose : unique symbol +> : ^^^^^^^^^^^^^ +>Symbol : SymbolConstructor +> : ^^^^^^^^^^^^^^^^^ +>asyncDispose : unique symbol +> : ^^^^^^^^^^^^^ + } + + { + await using _ = { async [Symbol.asyncDispose]() {}, value: 1 }; +>_ : { [Symbol.asyncDispose](): Promise; value: number; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>{ async [Symbol.asyncDispose]() {}, value: 1 } : { [Symbol.asyncDispose](): Promise; value: number; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>[Symbol.asyncDispose] : () => Promise +> : ^^^^^^^^^^^^^^^^^^^ +>Symbol.asyncDispose : unique symbol +> : ^^^^^^^^^^^^^ +>Symbol : SymbolConstructor +> : ^^^^^^^^^^^^^^^^^ +>asyncDispose : unique symbol +> : ^^^^^^^^^^^^^ +>value : number +> : ^^^^^^ +>1 : 1 +> : ^ + } + + { + await using _: MyAsyncDisposable = { +>_ : MyAsyncDisposable +> : ^^^^^^^^^^^^^^^^^ +>{ async [Symbol.asyncDispose]() {}, value: 1, extra: "foo", } : { [Symbol.asyncDispose](): Promise; value: number; extra: string; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + async [Symbol.asyncDispose]() {}, +>[Symbol.asyncDispose] : () => Promise +> : ^^^^^^^^^^^^^^^^^^^ +>Symbol.asyncDispose : unique symbol +> : ^^^^^^^^^^^^^ +>Symbol : SymbolConstructor +> : ^^^^^^^^^^^^^^^^^ +>asyncDispose : unique symbol +> : ^^^^^^^^^^^^^ + + value: 1, +>value : number +> : ^^^^^^ +>1 : 1 +> : ^ + + extra: "foo", +>extra : string +> : ^^^^^^ +>"foo" : "foo" +> : ^^^^^ + + }; + } +} + +export {}; + diff --git a/tests/baselines/reference/usingDeclarationsWithObjectLiterals2(noimplicitany=false).symbols b/tests/baselines/reference/usingDeclarationsWithObjectLiterals2(noimplicitany=false).symbols new file mode 100644 index 0000000000000..94cce9ea0ae77 --- /dev/null +++ b/tests/baselines/reference/usingDeclarationsWithObjectLiterals2(noimplicitany=false).symbols @@ -0,0 +1,28 @@ +//// [tests/cases/conformance/statements/VariableStatements/usingDeclarations/usingDeclarationsWithObjectLiterals2.ts] //// + +=== usingDeclarationsWithObjectLiterals2.ts === +{ + using _ = { [Symbol.dispose]() {}, value: null }; +>_ : Symbol(_, Decl(usingDeclarationsWithObjectLiterals2.ts, 1, 7)) +>[Symbol.dispose] : Symbol([Symbol.dispose], Decl(usingDeclarationsWithObjectLiterals2.ts, 1, 13)) +>Symbol.dispose : Symbol(SymbolConstructor.dispose, Decl(lib.esnext.disposable.d.ts, --, --)) +>Symbol : Symbol(Symbol, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2019.symbol.d.ts, --, --)) +>dispose : Symbol(SymbolConstructor.dispose, Decl(lib.esnext.disposable.d.ts, --, --)) +>value : Symbol(value, Decl(usingDeclarationsWithObjectLiterals2.ts, 1, 36)) +} + +async function f() { +>f : Symbol(f, Decl(usingDeclarationsWithObjectLiterals2.ts, 2, 1)) + { + await using _ = { async [Symbol.asyncDispose]() {}, value: null }; +>_ : Symbol(_, Decl(usingDeclarationsWithObjectLiterals2.ts, 6, 15)) +>[Symbol.asyncDispose] : Symbol([Symbol.asyncDispose], Decl(usingDeclarationsWithObjectLiterals2.ts, 6, 21)) +>Symbol.asyncDispose : Symbol(SymbolConstructor.asyncDispose, Decl(lib.esnext.disposable.d.ts, --, --)) +>Symbol : Symbol(Symbol, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2019.symbol.d.ts, --, --)) +>asyncDispose : Symbol(SymbolConstructor.asyncDispose, Decl(lib.esnext.disposable.d.ts, --, --)) +>value : Symbol(value, Decl(usingDeclarationsWithObjectLiterals2.ts, 6, 55)) + } +} + +export {}; + diff --git a/tests/baselines/reference/usingDeclarationsWithObjectLiterals2(noimplicitany=false).types b/tests/baselines/reference/usingDeclarationsWithObjectLiterals2(noimplicitany=false).types new file mode 100644 index 0000000000000..b643e48b8847c --- /dev/null +++ b/tests/baselines/reference/usingDeclarationsWithObjectLiterals2(noimplicitany=false).types @@ -0,0 +1,45 @@ +//// [tests/cases/conformance/statements/VariableStatements/usingDeclarations/usingDeclarationsWithObjectLiterals2.ts] //// + +=== usingDeclarationsWithObjectLiterals2.ts === +{ + using _ = { [Symbol.dispose]() {}, value: null }; +>_ : { [Symbol.dispose](): void; value: any; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>{ [Symbol.dispose]() {}, value: null } : { [Symbol.dispose](): void; value: null; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>[Symbol.dispose] : () => void +> : ^^^^^^^^^^ +>Symbol.dispose : unique symbol +> : ^^^^^^^^^^^^^ +>Symbol : SymbolConstructor +> : ^^^^^^^^^^^^^^^^^ +>dispose : unique symbol +> : ^^^^^^^^^^^^^ +>value : null +> : ^^^^ +} + +async function f() { +>f : () => Promise +> : ^^^^^^^^^^^^^^^^^^^ + { + await using _ = { async [Symbol.asyncDispose]() {}, value: null }; +>_ : { [Symbol.asyncDispose](): Promise; value: any; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>{ async [Symbol.asyncDispose]() {}, value: null } : { [Symbol.asyncDispose](): Promise; value: null; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>[Symbol.asyncDispose] : () => Promise +> : ^^^^^^^^^^^^^^^^^^^ +>Symbol.asyncDispose : unique symbol +> : ^^^^^^^^^^^^^ +>Symbol : SymbolConstructor +> : ^^^^^^^^^^^^^^^^^ +>asyncDispose : unique symbol +> : ^^^^^^^^^^^^^ +>value : null +> : ^^^^ + } +} + +export {}; + diff --git a/tests/baselines/reference/usingDeclarationsWithObjectLiterals2(noimplicitany=true).errors.txt b/tests/baselines/reference/usingDeclarationsWithObjectLiterals2(noimplicitany=true).errors.txt new file mode 100644 index 0000000000000..4a5ac8af46b67 --- /dev/null +++ b/tests/baselines/reference/usingDeclarationsWithObjectLiterals2(noimplicitany=true).errors.txt @@ -0,0 +1,21 @@ +usingDeclarationsWithObjectLiterals2.ts(2,38): error TS7018: Object literal's property 'value' implicitly has an 'any' type. +usingDeclarationsWithObjectLiterals2.ts(7,57): error TS7018: Object literal's property 'value' implicitly has an 'any' type. + + +==== usingDeclarationsWithObjectLiterals2.ts (2 errors) ==== + { + using _ = { [Symbol.dispose]() {}, value: null }; + ~~~~~~~~~~~ +!!! error TS7018: Object literal's property 'value' implicitly has an 'any' type. + } + + async function f() { + { + await using _ = { async [Symbol.asyncDispose]() {}, value: null }; + ~~~~~~~~~~~ +!!! error TS7018: Object literal's property 'value' implicitly has an 'any' type. + } + } + + export {}; + \ No newline at end of file diff --git a/tests/baselines/reference/usingDeclarationsWithObjectLiterals2(noimplicitany=true).symbols b/tests/baselines/reference/usingDeclarationsWithObjectLiterals2(noimplicitany=true).symbols new file mode 100644 index 0000000000000..94cce9ea0ae77 --- /dev/null +++ b/tests/baselines/reference/usingDeclarationsWithObjectLiterals2(noimplicitany=true).symbols @@ -0,0 +1,28 @@ +//// [tests/cases/conformance/statements/VariableStatements/usingDeclarations/usingDeclarationsWithObjectLiterals2.ts] //// + +=== usingDeclarationsWithObjectLiterals2.ts === +{ + using _ = { [Symbol.dispose]() {}, value: null }; +>_ : Symbol(_, Decl(usingDeclarationsWithObjectLiterals2.ts, 1, 7)) +>[Symbol.dispose] : Symbol([Symbol.dispose], Decl(usingDeclarationsWithObjectLiterals2.ts, 1, 13)) +>Symbol.dispose : Symbol(SymbolConstructor.dispose, Decl(lib.esnext.disposable.d.ts, --, --)) +>Symbol : Symbol(Symbol, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2019.symbol.d.ts, --, --)) +>dispose : Symbol(SymbolConstructor.dispose, Decl(lib.esnext.disposable.d.ts, --, --)) +>value : Symbol(value, Decl(usingDeclarationsWithObjectLiterals2.ts, 1, 36)) +} + +async function f() { +>f : Symbol(f, Decl(usingDeclarationsWithObjectLiterals2.ts, 2, 1)) + { + await using _ = { async [Symbol.asyncDispose]() {}, value: null }; +>_ : Symbol(_, Decl(usingDeclarationsWithObjectLiterals2.ts, 6, 15)) +>[Symbol.asyncDispose] : Symbol([Symbol.asyncDispose], Decl(usingDeclarationsWithObjectLiterals2.ts, 6, 21)) +>Symbol.asyncDispose : Symbol(SymbolConstructor.asyncDispose, Decl(lib.esnext.disposable.d.ts, --, --)) +>Symbol : Symbol(Symbol, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2019.symbol.d.ts, --, --)) +>asyncDispose : Symbol(SymbolConstructor.asyncDispose, Decl(lib.esnext.disposable.d.ts, --, --)) +>value : Symbol(value, Decl(usingDeclarationsWithObjectLiterals2.ts, 6, 55)) + } +} + +export {}; + diff --git a/tests/baselines/reference/usingDeclarationsWithObjectLiterals2(noimplicitany=true).types b/tests/baselines/reference/usingDeclarationsWithObjectLiterals2(noimplicitany=true).types new file mode 100644 index 0000000000000..b643e48b8847c --- /dev/null +++ b/tests/baselines/reference/usingDeclarationsWithObjectLiterals2(noimplicitany=true).types @@ -0,0 +1,45 @@ +//// [tests/cases/conformance/statements/VariableStatements/usingDeclarations/usingDeclarationsWithObjectLiterals2.ts] //// + +=== usingDeclarationsWithObjectLiterals2.ts === +{ + using _ = { [Symbol.dispose]() {}, value: null }; +>_ : { [Symbol.dispose](): void; value: any; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>{ [Symbol.dispose]() {}, value: null } : { [Symbol.dispose](): void; value: null; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>[Symbol.dispose] : () => void +> : ^^^^^^^^^^ +>Symbol.dispose : unique symbol +> : ^^^^^^^^^^^^^ +>Symbol : SymbolConstructor +> : ^^^^^^^^^^^^^^^^^ +>dispose : unique symbol +> : ^^^^^^^^^^^^^ +>value : null +> : ^^^^ +} + +async function f() { +>f : () => Promise +> : ^^^^^^^^^^^^^^^^^^^ + { + await using _ = { async [Symbol.asyncDispose]() {}, value: null }; +>_ : { [Symbol.asyncDispose](): Promise; value: any; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>{ async [Symbol.asyncDispose]() {}, value: null } : { [Symbol.asyncDispose](): Promise; value: null; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>[Symbol.asyncDispose] : () => Promise +> : ^^^^^^^^^^^^^^^^^^^ +>Symbol.asyncDispose : unique symbol +> : ^^^^^^^^^^^^^ +>Symbol : SymbolConstructor +> : ^^^^^^^^^^^^^^^^^ +>asyncDispose : unique symbol +> : ^^^^^^^^^^^^^ +>value : null +> : ^^^^ + } +} + +export {}; + diff --git a/tests/cases/conformance/statements/VariableStatements/usingDeclarations/usingDeclarationsWithObjectLiterals1.ts b/tests/cases/conformance/statements/VariableStatements/usingDeclarations/usingDeclarationsWithObjectLiterals1.ts new file mode 100644 index 0000000000000..4665bd0010b75 --- /dev/null +++ b/tests/cases/conformance/statements/VariableStatements/usingDeclarations/usingDeclarationsWithObjectLiterals1.ts @@ -0,0 +1,47 @@ +// @strict: true +// @target: esnext +// @module: esnext +// @lib: esnext +// @noEmit: true + +interface MyDisposable { + value: number; + [Symbol.dispose](): void; +} + +{ + using _ = { [Symbol.dispose]() {} }; +} + +{ + using _ = { [Symbol.dispose]() {}, value: 1 }; +} + +{ + using _: MyDisposable = { [Symbol.dispose]() {}, value: 1, extra: "foo" }; +} + +interface MyAsyncDisposable { + value: number; + [Symbol.asyncDispose](): Promise; +} + +async function f() { + { + await using _ = { async [Symbol.asyncDispose]() {} }; + } + + { + await using _ = { async [Symbol.asyncDispose]() {}, value: 1 }; + } + + { + await using _: MyAsyncDisposable = { + async [Symbol.asyncDispose]() {}, + value: 1, + extra: "foo", + }; + } +} + +export {}; diff --git a/tests/cases/conformance/statements/VariableStatements/usingDeclarations/usingDeclarationsWithObjectLiterals2.ts b/tests/cases/conformance/statements/VariableStatements/usingDeclarations/usingDeclarationsWithObjectLiterals2.ts new file mode 100644 index 0000000000000..d38baca72e75e --- /dev/null +++ b/tests/cases/conformance/statements/VariableStatements/usingDeclarations/usingDeclarationsWithObjectLiterals2.ts @@ -0,0 +1,18 @@ +// @strictNullChecks: false +// @noImplicitAny: true, false +// @target: esnext +// @module: esnext +// @lib: esnext +// @noEmit: true + +{ + using _ = { [Symbol.dispose]() {}, value: null }; +} + +async function f() { + { + await using _ = { async [Symbol.asyncDispose]() {}, value: null }; + } +} + +export {}; From 195203e9715897d093efe17a75c0ffd3f55d973e Mon Sep 17 00:00:00 2001 From: Jake Bailey <5341706+jakebailey@users.noreply.github.com> Date: Tue, 13 Aug 2024 14:16:53 -0700 Subject: [PATCH 29/50] Add regex eslint plugin, fix lints (#59371) --- eslint.config.mjs | 3 + package-lock.json | 136 ++++++++++++++++++ package.json | 1 + scripts/build/tests.mjs | 2 +- scripts/configurePrerelease.mjs | 2 +- scripts/failed-tests.cjs | 2 +- .../generateLocalizedDiagnosticMessages.mjs | 4 +- scripts/processDiagnosticMessages.mjs | 2 +- .../regenerate-unicode-identifier-parts.mjs | 4 +- src/compiler/checker.ts | 4 +- src/compiler/commandLineParser.ts | 2 +- src/compiler/debug.ts | 2 +- src/compiler/emitter.ts | 4 +- src/compiler/parser.ts | 6 +- src/compiler/path.ts | 4 +- src/compiler/program.ts | 2 +- src/compiler/resolutionCache.ts | 4 +- src/compiler/semver.ts | 10 +- src/compiler/sourcemap.ts | 4 +- src/compiler/sys.ts | 4 +- src/compiler/transformers/jsx.ts | 2 +- src/compiler/utilities.ts | 22 +-- src/compiler/utilitiesPublic.ts | 4 +- src/harness/documentsUtil.ts | 4 +- src/harness/fourslashImpl.ts | 6 +- src/harness/harnessIO.ts | 14 +- src/harness/harnessUtils.ts | 8 +- src/harness/incrementalUtils.ts | 2 +- src/harness/runnerbase.ts | 2 +- src/harness/typeWriter.ts | 2 +- src/harness/util.ts | 4 +- src/harness/vpathUtil.ts | 2 +- src/server/editorServices.ts | 2 +- src/services/classifier.ts | 4 +- .../codefixes/convertTypedefToType.ts | 2 +- src/services/navigationBar.ts | 2 +- src/services/outliningElementsCollector.ts | 18 ++- src/services/services.ts | 2 +- src/services/sourcemaps.ts | 2 +- src/testRunner/runner.ts | 4 +- .../unittests/config/initializeTSConfig.ts | 2 +- src/testRunner/unittests/config/showConfig.ts | 2 +- src/testRunner/unittests/helpers/baseline.ts | 4 +- .../unittests/jsonParserRecovery.ts | 2 +- src/testRunner/unittests/printer.ts | 4 +- .../unittests/services/transpile.ts | 2 +- .../tsserver/cachingFileSystemInformation.ts | 2 +- 47 files changed, 236 insertions(+), 92 deletions(-) diff --git a/eslint.config.mjs b/eslint.config.mjs index cadd9bb1f38f3..195ca4293e4be 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -1,5 +1,6 @@ // @ts-check import eslint from "@eslint/js"; +import * as regexpPlugin from "eslint-plugin-regexp"; import fs from "fs"; import globals from "globals"; import { createRequire } from "module"; @@ -36,6 +37,7 @@ export default tseslint.config( eslint.configs.recommended, ...tseslint.configs.recommended, ...tseslint.configs.stylistic, + regexpPlugin.configs["flat/recommended"], { plugins: { local: { @@ -208,6 +210,7 @@ export default tseslint.config( files: ["src/harness/**", "src/testRunner/**"], rules: { "no-restricted-globals": "off", + "regexp/no-super-linear-backtracking": "off", "local/no-direct-import": "off", }, }, diff --git a/package-lock.json b/package-lock.json index 5f2bbab16ea7a..eb0db3e839ac6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -38,6 +38,7 @@ "esbuild": "^0.23.0", "eslint": "^9.9.0", "eslint-formatter-autolinkable-stylish": "^1.4.0", + "eslint-plugin-regexp": "^2.6.0", "fast-xml-parser": "^4.4.1", "glob": "^10.4.5", "globals": "^15.9.0", @@ -1844,6 +1845,15 @@ "node": ">= 6" } }, + "node_modules/comment-parser": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/comment-parser/-/comment-parser-1.4.1.tgz", + "integrity": "sha512-buhp5kePrmda3vhc5B9t7pUQXAb2Tnd0qgpkIhPhkHXxJpiPJ11H0ZEU0oBpJ2QztSbzG/ZxMj/CHsYJqRHmyg==", + "dev": true, + "engines": { + "node": ">= 12.0.0" + } + }, "node_modules/concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", @@ -2239,6 +2249,27 @@ "eslint": "^8.3.0 || ^9.0.0" } }, + "node_modules/eslint-plugin-regexp": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-regexp/-/eslint-plugin-regexp-2.6.0.tgz", + "integrity": "sha512-FCL851+kislsTEQEMioAlpDuK5+E5vs0hi1bF8cFlPlHcEjeRhuAzEsGikXRreE+0j4WhW2uO54MqTjXtYOi3A==", + "dev": true, + "dependencies": { + "@eslint-community/eslint-utils": "^4.2.0", + "@eslint-community/regexpp": "^4.9.1", + "comment-parser": "^1.4.0", + "jsdoc-type-pratt-parser": "^4.0.0", + "refa": "^0.12.1", + "regexp-ast-analysis": "^0.7.1", + "scslre": "^0.3.0" + }, + "engines": { + "node": "^18 || >=20" + }, + "peerDependencies": { + "eslint": ">=8.44.0" + } + }, "node_modules/eslint-scope": { "version": "8.0.2", "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-8.0.2.tgz", @@ -3058,6 +3089,15 @@ "js-yaml": "bin/js-yaml.js" } }, + "node_modules/jsdoc-type-pratt-parser": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/jsdoc-type-pratt-parser/-/jsdoc-type-pratt-parser-4.1.0.tgz", + "integrity": "sha512-Hicd6JK5Njt2QB6XYFS7ok9e37O8AYk3jTcppG4YVQnYjOemymvTcmc7OWsmq/Qqj5TdRFO5/x/tIPmBeRtGHg==", + "dev": true, + "engines": { + "node": ">=12.0.0" + } + }, "node_modules/json-buffer": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", @@ -3945,6 +3985,31 @@ "node": ">=6" } }, + "node_modules/refa": { + "version": "0.12.1", + "resolved": "https://registry.npmjs.org/refa/-/refa-0.12.1.tgz", + "integrity": "sha512-J8rn6v4DBb2nnFqkqwy6/NnTYMcgLA+sLr0iIO41qpv0n+ngb7ksag2tMRl0inb1bbO/esUwzW1vbJi7K0sI0g==", + "dev": true, + "dependencies": { + "@eslint-community/regexpp": "^4.8.0" + }, + "engines": { + "node": "^12.0.0 || ^14.0.0 || >=16.0.0" + } + }, + "node_modules/regexp-ast-analysis": { + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/regexp-ast-analysis/-/regexp-ast-analysis-0.7.1.tgz", + "integrity": "sha512-sZuz1dYW/ZsfG17WSAG7eS85r5a0dDsvg+7BiiYR5o6lKCAtUrEwdmRmaGF6rwVj3LcmAeYkOWKEPlbPzN3Y3A==", + "dev": true, + "dependencies": { + "@eslint-community/regexpp": "^4.8.0", + "refa": "^0.12.1" + }, + "engines": { + "node": "^12.0.0 || ^14.0.0 || >=16.0.0" + } + }, "node_modules/require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", @@ -4016,6 +4081,20 @@ } ] }, + "node_modules/scslre": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/scslre/-/scslre-0.3.0.tgz", + "integrity": "sha512-3A6sD0WYP7+QrjbfNA2FN3FsOaGGFoekCVgTyypy53gPxhbkCIjtO6YWgdrfM+n/8sI8JeXZOIxsHjMTNxQ4nQ==", + "dev": true, + "dependencies": { + "@eslint-community/regexpp": "^4.8.0", + "refa": "^0.12.0", + "regexp-ast-analysis": "^0.7.0" + }, + "engines": { + "node": "^14.0.0 || >=16.0.0" + } + }, "node_modules/semver": { "version": "7.6.3", "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", @@ -5926,6 +6005,12 @@ "integrity": "sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==", "dev": true }, + "comment-parser": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/comment-parser/-/comment-parser-1.4.1.tgz", + "integrity": "sha512-buhp5kePrmda3vhc5B9t7pUQXAb2Tnd0qgpkIhPhkHXxJpiPJ11H0ZEU0oBpJ2QztSbzG/ZxMj/CHsYJqRHmyg==", + "dev": true + }, "concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", @@ -6244,6 +6329,21 @@ "plur": "^4.0.0" } }, + "eslint-plugin-regexp": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-regexp/-/eslint-plugin-regexp-2.6.0.tgz", + "integrity": "sha512-FCL851+kislsTEQEMioAlpDuK5+E5vs0hi1bF8cFlPlHcEjeRhuAzEsGikXRreE+0j4WhW2uO54MqTjXtYOi3A==", + "dev": true, + "requires": { + "@eslint-community/eslint-utils": "^4.2.0", + "@eslint-community/regexpp": "^4.9.1", + "comment-parser": "^1.4.0", + "jsdoc-type-pratt-parser": "^4.0.0", + "refa": "^0.12.1", + "regexp-ast-analysis": "^0.7.1", + "scslre": "^0.3.0" + } + }, "eslint-scope": { "version": "8.0.2", "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-8.0.2.tgz", @@ -6800,6 +6900,12 @@ "argparse": "^2.0.1" } }, + "jsdoc-type-pratt-parser": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/jsdoc-type-pratt-parser/-/jsdoc-type-pratt-parser-4.1.0.tgz", + "integrity": "sha512-Hicd6JK5Njt2QB6XYFS7ok9e37O8AYk3jTcppG4YVQnYjOemymvTcmc7OWsmq/Qqj5TdRFO5/x/tIPmBeRtGHg==", + "dev": true + }, "json-buffer": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", @@ -7418,6 +7524,25 @@ "integrity": "sha512-EJ4UNY/U1t2P/2k6oqotuX2Cc3T6nxJwsM0N0asT7dhrtH1ltUxDn4NalSYmPE2rCkVpcf/X6R0wDwcFpzhd4w==", "dev": true }, + "refa": { + "version": "0.12.1", + "resolved": "https://registry.npmjs.org/refa/-/refa-0.12.1.tgz", + "integrity": "sha512-J8rn6v4DBb2nnFqkqwy6/NnTYMcgLA+sLr0iIO41qpv0n+ngb7ksag2tMRl0inb1bbO/esUwzW1vbJi7K0sI0g==", + "dev": true, + "requires": { + "@eslint-community/regexpp": "^4.8.0" + } + }, + "regexp-ast-analysis": { + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/regexp-ast-analysis/-/regexp-ast-analysis-0.7.1.tgz", + "integrity": "sha512-sZuz1dYW/ZsfG17WSAG7eS85r5a0dDsvg+7BiiYR5o6lKCAtUrEwdmRmaGF6rwVj3LcmAeYkOWKEPlbPzN3Y3A==", + "dev": true, + "requires": { + "@eslint-community/regexpp": "^4.8.0", + "refa": "^0.12.1" + } + }, "require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", @@ -7451,6 +7576,17 @@ "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", "dev": true }, + "scslre": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/scslre/-/scslre-0.3.0.tgz", + "integrity": "sha512-3A6sD0WYP7+QrjbfNA2FN3FsOaGGFoekCVgTyypy53gPxhbkCIjtO6YWgdrfM+n/8sI8JeXZOIxsHjMTNxQ4nQ==", + "dev": true, + "requires": { + "@eslint-community/regexpp": "^4.8.0", + "refa": "^0.12.0", + "regexp-ast-analysis": "^0.7.0" + } + }, "semver": { "version": "7.6.3", "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", diff --git a/package.json b/package.json index ec6a428e90984..05e08606a75ed 100644 --- a/package.json +++ b/package.json @@ -64,6 +64,7 @@ "esbuild": "^0.23.0", "eslint": "^9.9.0", "eslint-formatter-autolinkable-stylish": "^1.4.0", + "eslint-plugin-regexp": "^2.6.0", "fast-xml-parser": "^4.4.1", "glob": "^10.4.5", "globals": "^15.9.0", diff --git a/scripts/build/tests.mjs b/scripts/build/tests.mjs index c2d11b3b569d4..ba9e03548a01b 100644 --- a/scripts/build/tests.mjs +++ b/scripts/build/tests.mjs @@ -105,7 +105,7 @@ export async function runConsoleTests(runJs, defaultReporter, runInParallel, opt } if (failed) { const grep = fs.readFileSync(".failed-tests", "utf8") - .split(/\r?\n/g) + .split(/\r?\n/) .map(test => test.trim()) .filter(test => test.length > 0) .map(regExpEscape) diff --git a/scripts/configurePrerelease.mjs b/scripts/configurePrerelease.mjs index 03795196ddfcf..1e7d9483c4678 100644 --- a/scripts/configurePrerelease.mjs +++ b/scripts/configurePrerelease.mjs @@ -112,7 +112,7 @@ function getPrereleasePatch(tag, plainPatch) { // but we'd prefer to just remove separators and limit ourselves to YYYYMMDD. // UTC time will always be implicit here. const now = new Date(); - const timeStr = now.toISOString().replace(/:|T|\.|-/g, "").slice(0, 8); + const timeStr = now.toISOString().replace(/[:T.-]/g, "").slice(0, 8); return `${plainPatch}-${tag}.${timeStr}`; } diff --git a/scripts/failed-tests.cjs b/scripts/failed-tests.cjs index e871cb37a2888..4ef79cfb68ac9 100644 --- a/scripts/failed-tests.cjs +++ b/scripts/failed-tests.cjs @@ -124,7 +124,7 @@ class FailedTestsReporter extends Mocha.reporters.Base { function readTests() { return fs.readFileSync(file, "utf8") - .split(/\r?\n/g) + .split(/\r?\n/) .map(line => line.trim()) .filter(line => line.length > 0); } diff --git a/scripts/generateLocalizedDiagnosticMessages.mjs b/scripts/generateLocalizedDiagnosticMessages.mjs index 531c0702bfa42..578a5f8f3234c 100644 --- a/scripts/generateLocalizedDiagnosticMessages.mjs +++ b/scripts/generateLocalizedDiagnosticMessages.mjs @@ -113,7 +113,7 @@ async function main() { ItemId = ItemId.slice(1); // remove leading semicolon } - val = val.replace(/]5D;/, "]"); // unescape `]` + val = val.replace(/\]5D;/, "]"); // unescape `]` out[ItemId] = val; } return JSON.stringify(out, undefined, 2); @@ -146,7 +146,7 @@ async function main() { */ function getItemXML(key, value) { // escape entrt value - value = value.replace(/]/g, "]5D;"); + value = value.replace(/\]/g, "]5D;"); return ` diff --git a/scripts/processDiagnosticMessages.mjs b/scripts/processDiagnosticMessages.mjs index b3f398b802c18..85f029e1d3765 100644 --- a/scripts/processDiagnosticMessages.mjs +++ b/scripts/processDiagnosticMessages.mjs @@ -150,7 +150,7 @@ function convertPropertyName(origName) { result = result.replace(/_+/g, "_"); // remove any leading underscore, unless it is followed by a number. - result = result.replace(/^_([^\d])/, "$1"); + result = result.replace(/^_(\D)/, "$1"); // get rid of all trailing underscores. result = result.replace(/_$/, ""); diff --git a/scripts/regenerate-unicode-identifier-parts.mjs b/scripts/regenerate-unicode-identifier-parts.mjs index 4dbc0354ebe87..0abd43be69e85 100644 --- a/scripts/regenerate-unicode-identifier-parts.mjs +++ b/scripts/regenerate-unicode-identifier-parts.mjs @@ -1,8 +1,8 @@ const MAX_UNICODE_CODEPOINT = 0x10FFFF; /** @type {(c: string) => boolean} */ -const isStart = c => /[\p{ID_Start}\u{2118}\u{212E}\u{309B}\u{309C}]/u.test(c); // Other_ID_Start explicitly included for back compat - see http://www.unicode.org/reports/tr31/#Introduction +const isStart = c => /\p{ID_Start}/u.test(c); // Other_ID_Start explicitly included for back compat - see http://www.unicode.org/reports/tr31/#Introduction /** @type {(c: string) => boolean} */ -const isPart = c => /[\p{ID_Continue}\u{00B7}\u{0387}\u{19DA}\u{1369}\u{136A}\u{136B}\u{136C}\u{136D}\u{136E}\u{136F}\u{1370}\u{1371}]/u.test(c) || isStart(c); // Likewise for Other_ID_Continue +const isPart = c => /\p{ID_Continue}/u.test(c) || isStart(c); // Likewise for Other_ID_Continue const parts = []; let partsActive = false; let startsActive = false; diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 71256ad716036..6008bb2da1ffe 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -10678,7 +10678,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { else if (localName === InternalSymbolName.ExportEquals) { localName = "_exports"; } - localName = isIdentifierText(localName, languageVersion) && !isStringANonContextualKeyword(localName) ? localName : "_" + localName.replace(/[^a-zA-Z0-9]/g, "_"); + localName = isIdentifierText(localName, languageVersion) && !isStringANonContextualKeyword(localName) ? localName : "_" + localName.replace(/[^a-z0-9]/gi, "_"); return localName; } @@ -34355,7 +34355,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { function containerSeemsToBeEmptyDomElement(containingType: Type) { return (compilerOptions.lib && !compilerOptions.lib.includes("dom")) && - everyContainedType(containingType, type => type.symbol && /^(EventTarget|Node|((HTML[a-zA-Z]*)?Element))$/.test(unescapeLeadingUnderscores(type.symbol.escapedName))) && + everyContainedType(containingType, type => type.symbol && /^(?:EventTarget|Node|(?:HTML[a-zA-Z]*)?Element)$/.test(unescapeLeadingUnderscores(type.symbol.escapedName))) && isEmptyObjectType(containingType); } diff --git a/src/compiler/commandLineParser.ts b/src/compiler/commandLineParser.ts index 1775bce71232e..86bb598c2a8df 100644 --- a/src/compiler/commandLineParser.ts +++ b/src/compiler/commandLineParser.ts @@ -3762,7 +3762,7 @@ function convertJsonOptionOfListType( * \*\* # matches the recursive directory wildcard "**". * \/?$ # matches an optional trailing directory separator at the end of the string. */ -const invalidTrailingRecursionPattern = /(^|\/)\*\*\/?$/; +const invalidTrailingRecursionPattern = /(?:^|\/)\*\*\/?$/; /** * Matches the portion of a wildcard path that does not contain wildcards. diff --git a/src/compiler/debug.ts b/src/compiler/debug.ts index 298c628907eed..7468b2aeceaaa 100644 --- a/src/compiler/debug.ts +++ b/src/compiler/debug.ts @@ -581,7 +581,7 @@ export namespace Debug { // This regex can trigger slow backtracking because of overlapping potential captures. // We don't care, this is debug code that's only enabled with a debugger attached - // we're just taking note of it for anyone checking regex performance in the future. - defaultValue = String(defaultValue).replace(/(?:,[\s\w\d_]+:[^,]+)+\]$/, "]"); + defaultValue = String(defaultValue).replace(/(?:,[\s\w]+:[^,]+)+\]$/, "]"); return `NodeArray ${defaultValue}`; }, }, diff --git a/src/compiler/emitter.ts b/src/compiler/emitter.ts index 493e60af2b820..f79fdf2136407 100644 --- a/src/compiler/emitter.ts +++ b/src/compiler/emitter.ts @@ -4005,7 +4005,7 @@ export function createPrinter(printerOptions: PrinterOptions = {}, handlers: Pri if (node.comment) { const text = getTextOfJSDocComment(node.comment); if (text) { - const lines = text.split(/\r\n?|\n/g); + const lines = text.split(/\r\n?|\n/); for (const line of lines) { writeLine(); writeSpace(); @@ -4880,7 +4880,7 @@ export function createPrinter(printerOptions: PrinterOptions = {}, handlers: Pri } function writeLines(text: string): void { - const lines = text.split(/\r\n?|\n/g); + const lines = text.split(/\r\n?|\n/); const indentation = guessIndentation(lines); for (const lineText of lines) { const line = indentation ? lineText.slice(indentation) : lineText; diff --git a/src/compiler/parser.ts b/src/compiler/parser.ts index b20d4b8b8b52e..c95c4759b9c12 100644 --- a/src/compiler/parser.ts +++ b/src/compiler/parser.ts @@ -10653,8 +10653,8 @@ function getNamedArgRegEx(name: string): RegExp { return result; } -const tripleSlashXMLCommentStartRegEx = /^\/\/\/\s*<(\S+)\s.*?\/>/im; -const singleLinePragmaRegEx = /^\/\/\/?\s*@([^\s:]+)(.*)\s*$/im; +const tripleSlashXMLCommentStartRegEx = /^\/\/\/\s*<(\S+)\s.*?\/>/m; +const singleLinePragmaRegEx = /^\/\/\/?\s*@([^\s:]+)((?:[^\S\r\n]|:).*)?$/m; function extractPragmas(pragmas: PragmaPseudoMapEntry[], range: CommentRange, text: string) { const tripleSlash = range.kind === SyntaxKind.SingleLineCommentTrivia && tripleSlashXMLCommentStartRegEx.exec(text); if (tripleSlash) { @@ -10700,7 +10700,7 @@ function extractPragmas(pragmas: PragmaPseudoMapEntry[], range: CommentRange, te } if (range.kind === SyntaxKind.MultiLineCommentTrivia) { - const multiLinePragmaRegEx = /@(\S+)(\s+.*)?$/gim; // Defined inline since it uses the "g" flag, which keeps a persistent index (for iterating) + const multiLinePragmaRegEx = /@(\S+)(\s+(?:\S.*)?)?$/gm; // Defined inline since it uses the "g" flag, which keeps a persistent index (for iterating) let multiLineMatch: RegExpExecArray | null; // eslint-disable-line no-restricted-syntax while (multiLineMatch = multiLinePragmaRegEx.exec(text)) { addPragmaForMatch(pragmas, range, PragmaKindFlags.MultiLine, multiLineMatch); diff --git a/src/compiler/path.ts b/src/compiler/path.ts index f4841c97cdf4e..00c0e4b671b23 100644 --- a/src/compiler/path.ts +++ b/src/compiler/path.ts @@ -98,7 +98,7 @@ export function pathIsAbsolute(path: string): boolean { * @internal */ export function pathIsRelative(path: string): boolean { - return /^\.\.?($|[\\/])/.test(path); + return /^\.\.?(?:$|[\\/])/.test(path); } /** @@ -779,7 +779,7 @@ export function changeFullExtension(path: string, newExtension: string) { //// Path Comparisons // check path for these segments: '', '.'. '..' -const relativePathSegmentRegExp = /(?:\/\/)|(?:^|\/)\.\.?(?:$|\/)/; +const relativePathSegmentRegExp = /\/\/|(?:^|\/)\.\.?(?:$|\/)/; function comparePathsWorker(a: string, b: string, componentComparer: (a: string, b: string) => Comparison) { if (a === b) return Comparison.EqualTo; diff --git a/src/compiler/program.ts b/src/compiler/program.ts index bd9b42caae953..06bb19f84d158 100644 --- a/src/compiler/program.ts +++ b/src/compiler/program.ts @@ -3109,7 +3109,7 @@ export function createProgram(rootNamesOrOptions: readonly string[] | CreateProg // Stop searching if the line is not empty and not a comment const lineText = file.text.slice(lineStarts[line], lineStarts[line + 1]).trim(); - if (lineText !== "" && !/^(\s*)\/\/(.*)$/.test(lineText)) { + if (lineText !== "" && !/^\s*\/\/.*$/.test(lineText)) { return -1; } diff --git a/src/compiler/resolutionCache.ts b/src/compiler/resolutionCache.ts index 65c41be92f883..cfe6b95555244 100644 --- a/src/compiler/resolutionCache.ts +++ b/src/compiler/resolutionCache.ts @@ -267,11 +267,11 @@ function perceivedOsRootLengthForWatching(pathComponents: Readonly Numeric identifiers MUST NOT include leading zeroes. -const numericIdentifierRegExp = /^(0|[1-9]\d*)$/; +const numericIdentifierRegExp = /^(?:0|[1-9]\d*)$/; /** * Describes a precise semantic version number, https://semver.org @@ -244,8 +244,8 @@ interface Comparator { // range-set ::= range ( logical-or range ) * // range ::= hyphen | simple ( ' ' simple ) * | '' // logical-or ::= ( ' ' ) * '||' ( ' ' ) * -const logicalOrRegExp = /\|\|/g; -const whitespaceRegExp = /\s+/g; +const logicalOrRegExp = /\|\|/; +const whitespaceRegExp = /\s+/; // https://github.com/npm/node-semver#range-grammar // @@ -257,7 +257,7 @@ const whitespaceRegExp = /\s+/g; // build ::= parts // parts ::= part ( '.' part ) * // part ::= nr | [-0-9A-Za-z]+ -const partialRegExp = /^([xX*0]|[1-9]\d*)(?:\.([xX*0]|[1-9]\d*)(?:\.([xX*0]|[1-9]\d*)(?:-([a-z0-9-.]+))?(?:\+([a-z0-9-.]+))?)?)?$/i; +const partialRegExp = /^([x*0]|[1-9]\d*)(?:\.([x*0]|[1-9]\d*)(?:\.([x*0]|[1-9]\d*)(?:-([a-z0-9-.]+))?(?:\+([a-z0-9-.]+))?)?)?$/i; // https://github.com/npm/node-semver#range-grammar // @@ -270,7 +270,7 @@ const hyphenRegExp = /^\s*([a-z0-9-+.*]+)\s+-\s+([a-z0-9-+.*]+)\s*$/i; // primitive ::= ( '<' | '>' | '>=' | '<=' | '=' ) partial // tilde ::= '~' partial // caret ::= '^' partial -const rangeRegExp = /^(~|\^|<|<=|>|>=|=)?\s*([a-z0-9-+.*]+)$/i; +const rangeRegExp = /^([~^<>=]|<=|>=)?\s*([a-z0-9-+.*]+)$/i; function parseRange(text: string) { const alternatives: Comparator[][] = []; diff --git a/src/compiler/sourcemap.ts b/src/compiler/sourcemap.ts index fff807e98cf6a..9f3c5a05d4266 100644 --- a/src/compiler/sourcemap.ts +++ b/src/compiler/sourcemap.ts @@ -360,9 +360,9 @@ export function createSourceMapGenerator(host: EmitHost, file: string, sourceRoo // Sometimes tools can see the following line as a source mapping url comment, so we mangle it a bit (the [M]) /** @internal */ -export const sourceMapCommentRegExpDontCareLineStart = /\/\/[@#] source[M]appingURL=(.+)\r?\n?$/; +export const sourceMapCommentRegExpDontCareLineStart = /\/\/[@#] source[M]appingURL=(.+)\r?\n?$/; // eslint-disable-line regexp/no-useless-character-class /** @internal */ -export const sourceMapCommentRegExp = /^\/\/[@#] source[M]appingURL=(.+)\r?\n?$/; +export const sourceMapCommentRegExp = /^\/\/[@#] source[M]appingURL=(.+)\r?\n?$/; // eslint-disable-line regexp/no-useless-character-class /** @internal */ export const whitespaceOrMapCommentRegExp = /^\s*(\/\/[@#] .*)?$/; diff --git a/src/compiler/sys.ts b/src/compiler/sys.ts index 13340095ce102..a5b24bf854319 100644 --- a/src/compiler/sys.ts +++ b/src/compiler/sys.ts @@ -1466,7 +1466,7 @@ export let sys: System = (() => { const byteOrderMarkIndicator = "\uFEFF"; function getNodeSystem(): System { - const nativePattern = /^native |^\([^)]+\)$|^(internal[\\/]|[a-zA-Z0-9_\s]+(\.js)?$)/; + const nativePattern = /^native |^\([^)]+\)$|^(?:internal[\\/]|[\w\s]+(?:\.js)?$)/; const _fs: typeof import("fs") = require("fs"); const _path: typeof import("path") = require("path"); const _os = require("os"); @@ -1592,7 +1592,7 @@ export let sys: System = (() => { disableCPUProfiler, cpuProfilingEnabled: () => !!activeSession || contains(process.execArgv, "--cpu-prof") || contains(process.execArgv, "--prof"), realpath, - debugMode: !!process.env.NODE_INSPECTOR_IPC || !!process.env.VSCODE_INSPECTOR_OPTIONS || some(process.execArgv, arg => /^--(inspect|debug)(-brk)?(=\d+)?$/i.test(arg)) || !!(process as any).recordreplay, + debugMode: !!process.env.NODE_INSPECTOR_IPC || !!process.env.VSCODE_INSPECTOR_OPTIONS || some(process.execArgv, arg => /^--(?:inspect|debug)(?:-brk)?(?:=\d+)?$/i.test(arg)) || !!(process as any).recordreplay, tryEnableSourceMapsForHost() { try { (require("source-map-support") as typeof import("source-map-support")).install(); diff --git a/src/compiler/transformers/jsx.ts b/src/compiler/transformers/jsx.ts index 49d04a2fd8280..bcb0cbf8ee2cc 100644 --- a/src/compiler/transformers/jsx.ts +++ b/src/compiler/transformers/jsx.ts @@ -667,7 +667,7 @@ export function transformJsx(context: TransformationContext): (x: SourceFile | B const name = node.name; if (isIdentifier(name)) { const text = idText(name); - return (/^[A-Za-z_]\w*$/.test(text)) ? name : factory.createStringLiteral(text); + return (/^[A-Z_]\w*$/i.test(text)) ? name : factory.createStringLiteral(text); } return factory.createStringLiteral(idText(name.namespace) + ":" + idText(name.name)); } diff --git a/src/compiler/utilities.ts b/src/compiler/utilities.ts index 2c647c697c4cf..76849b847038c 100644 --- a/src/compiler/utilities.ts +++ b/src/compiler/utilities.ts @@ -2622,12 +2622,12 @@ export function getJSDocCommentRanges(node: Node, text: string) { text.charCodeAt(comment.pos + 3) !== CharacterCodes.slash); } -const fullTripleSlashReferencePathRegEx = /^(\/\/\/\s*/; -const fullTripleSlashReferenceTypeReferenceDirectiveRegEx = /^(\/\/\/\s*/; -const fullTripleSlashLibReferenceRegEx = /^(\/\/\/\s*/; -const fullTripleSlashAMDReferencePathRegEx = /^(\/\/\/\s*/; -const fullTripleSlashAMDModuleRegEx = /^\/\/\/\s*/; -const defaultLibReferenceRegEx = /^(\/\/\/\s*/; +const fullTripleSlashReferencePathRegEx = /^\/\/\/\s*/; +const fullTripleSlashReferenceTypeReferenceDirectiveRegEx = /^\/\/\/\s*/; +const fullTripleSlashLibReferenceRegEx = /^\/\/\/\s*/; +const fullTripleSlashAMDReferencePathRegEx = /^\/\/\/\s*/; +const fullTripleSlashAMDModuleRegEx = /^\/\/\/\s*/; +const defaultLibReferenceRegEx = /^\/\/\/\s*/; export function isPartOfTypeNode(node: Node): boolean { if (SyntaxKind.FirstTypeNode <= node.kind && node.kind <= SyntaxKind.LastTypeNode) { @@ -5988,10 +5988,10 @@ export function hasInvalidEscape(template: TemplateLiteral): boolean { // the language service. These characters should be escaped when printing, and if any characters are added, // the map below must be updated. Note that this regexp *does not* include the 'delete' character. // There is no reason for this other than that JSON.stringify does not handle it either. -const doubleQuoteEscapedCharsRegExp = /[\\"\u0000-\u001f\t\v\f\b\r\n\u2028\u2029\u0085]/g; -const singleQuoteEscapedCharsRegExp = /[\\'\u0000-\u001f\t\v\f\b\r\n\u2028\u2029\u0085]/g; +const doubleQuoteEscapedCharsRegExp = /[\\"\u0000-\u001f\u2028\u2029\u0085]/g; +const singleQuoteEscapedCharsRegExp = /[\\'\u0000-\u001f\u2028\u2029\u0085]/g; // Template strings preserve simple LF newlines, still encode CRLF (or CR) -const backtickQuoteEscapedCharsRegExp = /\r\n|[\\`\u0000-\u001f\t\v\f\b\r\u2028\u2029\u0085]/g; +const backtickQuoteEscapedCharsRegExp = /\r\n|[\\`\u0000-\u001f\u2028\u2029\u0085]/g; const escapedCharsMap = new Map(Object.entries({ "\t": "\\t", "\v": "\\v", @@ -8365,7 +8365,7 @@ export function setObjectAllocator(alloc: ObjectAllocator) { /** @internal */ export function formatStringFromArgs(text: string, args: DiagnosticArguments): string { - return text.replace(/{(\d+)}/g, (_match, index: string) => "" + Debug.checkDefined(args[+index])); + return text.replace(/\{(\d+)\}/g, (_match, index: string) => "" + Debug.checkDefined(args[+index])); } let localizedDiagnosticMessages: MapLike | undefined; @@ -10623,7 +10623,7 @@ export function isFunctionExpressionOrArrowFunction(node: Node): node is Functio /** @internal */ export function escapeSnippetText(text: string): string { - return text.replace(/\$/gm, () => "\\$"); + return text.replace(/\$/g, () => "\\$"); } /** @internal */ diff --git a/src/compiler/utilitiesPublic.ts b/src/compiler/utilitiesPublic.ts index a5b8b44ca5957..325f9739c5641 100644 --- a/src/compiler/utilitiesPublic.ts +++ b/src/compiler/utilitiesPublic.ts @@ -681,7 +681,7 @@ export function validateLocaleAndSetLanguage( errors?: Diagnostic[], ) { const lowerCaseLocale = locale.toLowerCase(); - const matchResult = /^([a-z]+)([_-]([a-z]+))?$/.exec(lowerCaseLocale); + const matchResult = /^([a-z]+)(?:[_-]([a-z]+))?$/.exec(lowerCaseLocale); if (!matchResult) { if (errors) { @@ -691,7 +691,7 @@ export function validateLocaleAndSetLanguage( } const language = matchResult[1]; - const territory = matchResult[3]; + const territory = matchResult[2]; // First try the entire locale, then fall back to just language if that's all we have. // Either ways do not fail, and fallback to the English diagnostic strings. diff --git a/src/harness/documentsUtil.ts b/src/harness/documentsUtil.ts index 8a96d4d290f3e..cf3d7c7f08184 100644 --- a/src/harness/documentsUtil.ts +++ b/src/harness/documentsUtil.ts @@ -72,8 +72,8 @@ export class SourceMap { public readonly mappings: readonly Mapping[] = []; public readonly names: readonly string[] | undefined; - private static readonly _mappingRegExp = /([A-Za-z0-9+/]+),?|(;)|./g; - private static readonly _sourceMappingURLRegExp = /^\/\/[#@]\s*sourceMappingURL\s*=\s*(.*?)\s*$/mig; + private static readonly _mappingRegExp = /([A-Z0-9+/]+),?|(;)|./gi; + private static readonly _sourceMappingURLRegExp = /^\/\/[#@]\s*sourceMappingURL\s*=\s*(.*?)\s*$/gim; private static readonly _dataURLRegExp = /^data:application\/json;base64,([a-z0-9+/=]+)$/i; private static readonly _base64Chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; diff --git a/src/harness/fourslashImpl.ts b/src/harness/fourslashImpl.ts index 4d3d6cea32e69..04beb984ae538 100644 --- a/src/harness/fourslashImpl.ts +++ b/src/harness/fourslashImpl.ts @@ -966,7 +966,7 @@ export class TestState { const annotations = ts.map(hints.sort(sortHints), hint => { if (hint.displayParts) { hint.displayParts = ts.map(hint.displayParts, part => { - if (part.file && /lib(?:.*)\.d\.ts$/.test(part.file)) { + if (part.file && /lib.*\.d\.ts$/.test(part.file)) { part.span!.start = -1; } return part; @@ -1547,7 +1547,7 @@ export class TestState { }: BaselineDocumentSpansWithFileContentsOptions, spanToContextId: Map, ) { - const isLibFile = /lib(?:.*)\.d\.ts$/.test(fileName); + const isLibFile = /lib.*\.d\.ts$/.test(fileName); let readableContents = `// === ${fileName} ===`; let newContent = ""; interface Detail { @@ -2514,7 +2514,7 @@ export class TestState { for (const part of tag.text ?? ts.emptyArray) { if (part.kind === "linkName") { const link = part as ts.JSDocLinkDisplayPart; - if (/lib(?:.*)\.d\.ts$/.test(link.target.fileName)) { + if (/lib.*\.d\.ts$/.test(link.target.fileName)) { // The object literal isn't a complete TextSpan, but we're only going to // use these results in the baseline for diffing, so just overwrite. (link.target.textSpan as any) = { start: "--", length: "--" }; diff --git a/src/harness/harnessIO.ts b/src/harness/harnessIO.ts index d73092a297aeb..e27cf3cf949c0 100644 --- a/src/harness/harnessIO.ts +++ b/src/harness/harnessIO.ts @@ -582,7 +582,7 @@ export namespace Compiler { let location = info.file ? " " + ts.formatLocation(info.file, info.start!, formatDiagnsoticHost, ts.identity) : ""; location = Utils.removeTestPathPrefixes(location); if (location && isDefaultLibraryFile(info.file!.fileName)) { - location = location.replace(/(lib(?:.*)\.d\.ts):\d+:\d+/i, "$1:--:--"); + location = location.replace(/(lib.*\.d\.ts):\d+:\d+/i, "$1:--:--"); } errLines.push(`!!! related TS${info.code}${location}: ${ts.flattenDiagnosticMessageText(info.messageText, IO.newLine())}`); } @@ -603,7 +603,7 @@ export namespace Compiler { let topDiagnostics = minimalDiagnosticsToString(diagnostics, options && options.pretty); topDiagnostics = Utils.removeTestPathPrefixes(topDiagnostics); - topDiagnostics = topDiagnostics.replace(/^(lib(?:.*)\.d\.ts)\(\d+,\d+\)/igm, "$1(--,--)"); + topDiagnostics = topDiagnostics.replace(/^(lib.*\.d\.ts)\(\d+,\d+\)/gim, "$1(--,--)"); yield [diagnosticSummaryMarker, topDiagnostics + IO.newLine() + IO.newLine(), diagnostics.length]; @@ -666,7 +666,7 @@ export namespace Compiler { // Calculate the start of the squiggle const squiggleStart = Math.max(0, relativeOffset); // TODO/REVIEW: this doesn't work quite right in the browser if a multi file test has files whose names are just the right length relative to one another - outputLines += newLine() + " " + line.substr(0, squiggleStart).replace(/[^\s]/g, " ") + new Array(Math.min(length, line.length - squiggleStart) + 1).join("~"); + outputLines += newLine() + " " + line.substr(0, squiggleStart).replace(/\S/g, " ") + new Array(Math.min(length, line.length - squiggleStart) + 1).join("~"); // If the error ended here, or we're at the end of the file, emit its message if ((lineIndex === lines.length - 1) || nextLineStart > end) { @@ -862,7 +862,7 @@ export namespace Compiler { for (const file of allFiles) { const { unitName } = file; let typeLines = "=== " + unitName + " ===\r\n"; - const codeLines = ts.flatMap(file.content.split(/\r?\n/g), e => e.split(/[\r\u2028\u2029]/g)); + const codeLines = ts.flatMap(file.content.split(/\r?\n/), e => e.split(/[\r\u2028\u2029]/)); const gen: IterableIterator = isSymbolBaseline ? fullWalker.getSymbols(unitName) : fullWalker.getTypes(unitName); let lastIndexWritten: number | undefined; for (const result of gen) { @@ -1103,7 +1103,7 @@ function splitVaryBySettingValue(text: string, varyBy: string): string[] | undef let star = false; const includes: string[] = []; const excludes: string[] = []; - for (let s of text.split(/,/g)) { + for (let s of text.split(/,/)) { s = s.trim().toLowerCase(); if (s.length === 0) continue; if (s === "*") { @@ -1247,8 +1247,8 @@ export namespace TestCaseParser { } // Regex for parsing options in the format "@Alpha: Value of any sort" - const optionRegex = /^[/]{2}\s*@(\w+)\s*:\s*([^\r\n]*)/gm; // multiple matches on multiple lines - const linkRegex = /^[/]{2}\s*@link\s*:\s*([^\r\n]*)\s*->\s*([^\r\n]*)/gm; // multiple matches on multiple lines + const optionRegex = /^\/{2}\s*@(\w+)\s*:\s*([^\r\n]*)/gm; // multiple matches on multiple lines + const linkRegex = /^\/{2}\s*@link\s*:\s*([^\r\n]*)\s*->\s*([^\r\n]*)/gm; // multiple matches on multiple lines export function parseSymlinkFromTest(line: string, symlinks: vfs.FileSet | undefined, absoluteRootDir?: string) { const linkMetaData = linkRegex.exec(line); diff --git a/src/harness/harnessUtils.ts b/src/harness/harnessUtils.ts index c93cf652656bf..372202d08e443 100644 --- a/src/harness/harnessUtils.ts +++ b/src/harness/harnessUtils.ts @@ -333,7 +333,7 @@ const maxHarnessFrames = 1; export function filterStack(error: Error, stackTraceLimit = Infinity) { const stack = (error as any).stack as string; if (stack) { - const lines = stack.split(/\r\n?|\n/g); + const lines = stack.split(/\r\n?|\n/); const filtered: string[] = []; let frameCount = 0; let harnessFrameCount = 0; @@ -355,7 +355,7 @@ export function filterStack(error: Error, stackTraceLimit = Infinity) { harnessFrameCount++; } - line = line.replace(/\bfile:\/\/\/(.*?)(?=(:\d+)*($|\)))/, (_, path) => ts.sys.resolvePath(path)); + line = line.replace(/\bfile:\/\/\/(.*?)(?=(?::\d+)*(?:$|\)))/, (_, path) => ts.sys.resolvePath(path)); frameCount++; } @@ -373,11 +373,11 @@ function isStackFrame(line: string) { } function isMocha(line: string) { - return /[\\/](node_modules|components)[\\/]mocha(js)?[\\/]|[\\/]mocha\.js/.test(line); + return /[\\/](?:node_modules|components)[\\/]mocha(?:js)?[\\/]|[\\/]mocha\.js/.test(line); } function isNode(line: string) { - return /\((timers|events|node|module)\.js:/.test(line); + return /\((?:timers|events|node|module)\.js:/.test(line); } function isHarness(line: string) { diff --git a/src/harness/incrementalUtils.ts b/src/harness/incrementalUtils.ts index 72df2718621e8..42464ceb4c1de 100644 --- a/src/harness/incrementalUtils.ts +++ b/src/harness/incrementalUtils.ts @@ -159,7 +159,7 @@ function getProgramStructure(program: ts.Program | undefined) { const baseline: string[] = []; program?.getSourceFiles().slice().sort((f1, f2) => ts.comparePathsCaseSensitive(f1.path, f2.path)).forEach(f => { baseline.push(` File: ${f.fileName} Path: ${f.path} ResolvedPath: ${f.resolvedPath} impliedNodeFormat: ${f.impliedNodeFormat}`); - baseline.push(f.text.split(/\r?\n/g).map(l => l ? " " + l : "").join("\n")); + baseline.push(f.text.split(/\r?\n/).map(l => l ? " " + l : "").join("\n")); getResolutionCacheDetails( baseline, "Modules", diff --git a/src/harness/runnerbase.ts b/src/harness/runnerbase.ts index 17c6e5cb556a2..7173eb3ab4fcd 100644 --- a/src/harness/runnerbase.ts +++ b/src/harness/runnerbase.ts @@ -55,7 +55,7 @@ export abstract class RunnerBase { /** Replaces instances of full paths with fileNames only */ static removeFullPaths(path: string) { // If its a full path (starts with "C:" or "/") replace with just the filename - let fixedPath = /^(\w:|\/)/.test(path) ? ts.getBaseFileName(path) : path; + let fixedPath = /^(?:\w:|\/)/.test(path) ? ts.getBaseFileName(path) : path; // when running in the browser the 'full path' is the host name, shows up in error baselines const localHost = /http:\/localhost:\d+/g; diff --git a/src/harness/typeWriter.ts b/src/harness/typeWriter.ts index 96bd527077d8e..6bee2b5fe9f25 100644 --- a/src/harness/typeWriter.ts +++ b/src/harness/typeWriter.ts @@ -321,7 +321,7 @@ export class TypeWriterWalker { const declSourceFile = declaration.getSourceFile(); const declLineAndCharacter = declSourceFile.getLineAndCharacterOfPosition(declaration.pos); const fileName = ts.getBaseFileName(declSourceFile.fileName); - const isLibFile = /lib(.*)\.d\.ts/i.test(fileName); + const isLibFile = /lib.*\.d\.ts/i.test(fileName); const declText = `Decl(${fileName}, ${isLibFile ? "--" : declLineAndCharacter.line}, ${isLibFile ? "--" : declLineAndCharacter.character})`; symbolString += declText; (declaration as any).__symbolTestOutputCache = declText; diff --git a/src/harness/util.ts b/src/harness/util.ts index 4b0f7e28b9a09..a31a60ada18e5 100644 --- a/src/harness/util.ts +++ b/src/harness/util.ts @@ -4,13 +4,13 @@ import * as ts from "./_namespaces/ts.js"; * Common utilities */ -const testPathPrefixRegExp = /(?:(file:\/{3})|\/)\.(ts|lib|src)\//g; +const testPathPrefixRegExp = /(?:(file:\/{3})|\/)\.(?:ts|lib|src)\//g; export function removeTestPathPrefixes(text: string, retainTrailingDirectorySeparator?: boolean): string { return text !== undefined ? text.replace(testPathPrefixRegExp, (_, scheme) => scheme || (retainTrailingDirectorySeparator ? "/" : "")) : undefined!; // TODO: GH#18217 } function createDiagnosticMessageReplacer string[]>(diagnosticMessage: ts.DiagnosticMessage, replacer: R) { - const messageParts = diagnosticMessage.message.split(/{\d+}/g); + const messageParts = diagnosticMessage.message.split(/\{\d+\}/); const regExp = new RegExp(`^(?:${messageParts.map(ts.regExpEscape).join("(.*?)")})$`); type Args = R extends (messageArgs: string[], ...args: infer A) => string[] ? A : []; return (text: string, ...args: Args) => text.replace(regExp, (_, ...fixedArgs) => ts.formatStringFromArgs(diagnosticMessage.message, replacer(fixedArgs, ...args))); diff --git a/src/harness/vpathUtil.ts b/src/harness/vpathUtil.ts index c7c1ef4ce47c8..fa26c4a7fd1de 100644 --- a/src/harness/vpathUtil.ts +++ b/src/harness/vpathUtil.ts @@ -26,7 +26,7 @@ export import changeExtension = ts.changeAnyExtension; export import isTypeScript = ts.hasTSFileExtension; export import isJavaScript = ts.hasJSFileExtension; -const invalidRootComponentRegExp = /^(?!(\/|\/\/\w+\/|[a-zA-Z]:\/?|)$)/; +const invalidRootComponentRegExp = /^(?!(?:\/|\/\/\w+\/|[a-z]:\/?)?$)/i; const invalidNavigableComponentRegExp = /[:*?"<>|]/; const invalidNavigableComponentWithWildcardsRegExp = /[:"<>|]/; const invalidNonNavigableComponentRegExp = /^\.{1,2}$|[:*?"<>|]/; diff --git a/src/server/editorServices.ts b/src/server/editorServices.ts index 14427e48b456c..012873f211253 100644 --- a/src/server/editorServices.ts +++ b/src/server/editorServices.ts @@ -5041,7 +5041,7 @@ export class ProjectService { if ( !pluginConfigEntry.name || isExternalModuleNameRelative(pluginConfigEntry.name) || - /[\\/]\.\.?($|[\\/])/.test(pluginConfigEntry.name) + /[\\/]\.\.?(?:$|[\\/])/.test(pluginConfigEntry.name) ) { this.logger.info(`Skipped loading plugin ${pluginConfigEntry.name || JSON.stringify(pluginConfigEntry)} because only package name is allowed plugin name`); return; diff --git a/src/services/classifier.ts b/src/services/classifier.ts index 0e9e509edcaa7..cf2b087aeb85f 100644 --- a/src/services/classifier.ts +++ b/src/services/classifier.ts @@ -927,9 +927,9 @@ export function getEncodedSyntacticClassifications(cancellationToken: Cancellati } function tryClassifyTripleSlashComment(start: number, width: number): boolean { - const tripleSlashXMLCommentRegEx = /^(\/\/\/\s*)(<)(?:(\S+)((?:[^/]|\/[^>])*)(\/>)?)?/im; + const tripleSlashXMLCommentRegEx = /^(\/\/\/\s*)(<)(?:(\S+)((?:[^/]|\/[^>])*)(\/>)?)?/m; // Require a leading whitespace character (the parser already does) to prevent terrible backtracking performance - const attributeRegex = /(\s)(\S+)(\s*)(=)(\s*)('[^']+'|"[^"]+")/img; + const attributeRegex = /(\s)(\S+)(\s*)(=)(\s*)('[^']+'|"[^"]+")/g; const text = sourceFile.text.substr(start, width); const match = tripleSlashXMLCommentRegEx.exec(text); diff --git a/src/services/codefixes/convertTypedefToType.ts b/src/services/codefixes/convertTypedefToType.ts index 70d02fb846678..51e6290d46e11 100644 --- a/src/services/codefixes/convertTypedefToType.ts +++ b/src/services/codefixes/convertTypedefToType.ts @@ -147,7 +147,7 @@ function findEndOfTextBetween(jsDocComment: JSDoc, from: number, to: number): nu const comment = jsDocComment.getText().substring(from - jsDocComment.getStart(), to - jsDocComment.getStart()); for (let i = comment.length; i > 0; i--) { - if (!/[*/\s]/g.test(comment.substring(i - 1, i))) { + if (!/[*/\s]/.test(comment.substring(i - 1, i))) { return from + i; } } diff --git a/src/services/navigationBar.ts b/src/services/navigationBar.ts index fc2a316361c06..6ca2a1804a8ce 100644 --- a/src/services/navigationBar.ts +++ b/src/services/navigationBar.ts @@ -1100,5 +1100,5 @@ function cleanText(text: string): string { // \r - Carriage Return // \u2028 - Line separator // \u2029 - Paragraph separator - return text.replace(/\\?(\r?\n|\r|\u2028|\u2029)/g, ""); + return text.replace(/\\?(?:\r?\n|[\r\u2028\u2029])/g, ""); } diff --git a/src/services/outliningElementsCollector.ts b/src/services/outliningElementsCollector.ts index 19d1438c6ea3f..0254620c1e6d8 100644 --- a/src/services/outliningElementsCollector.ts +++ b/src/services/outliningElementsCollector.ts @@ -138,14 +138,14 @@ function addRegionOutliningSpans(sourceFile: SourceFile, out: OutliningSpan[]): for (const currentLineStart of lineStarts) { const lineEnd = sourceFile.getLineEndOfPosition(currentLineStart); const lineText = sourceFile.text.substring(currentLineStart, lineEnd); - const result = isRegionDelimiter(lineText); + const result = parseRegionDelimiter(lineText); if (!result || isInComment(sourceFile, currentLineStart)) { continue; } - if (!result[1]) { + if (result.isStart) { const span = createTextSpanFromBounds(sourceFile.text.indexOf("//", currentLineStart), lineEnd); - regions.push(createOutliningSpan(span, OutliningSpanKind.Region, span, /*autoCollapse*/ false, result[2] || "#region")); + regions.push(createOutliningSpan(span, OutliningSpanKind.Region, span, /*autoCollapse*/ false, result.name || "#region")); } else { const region = regions.pop(); @@ -158,8 +158,8 @@ function addRegionOutliningSpans(sourceFile: SourceFile, out: OutliningSpan[]): } } -const regionDelimiterRegExp = /^#(end)?region(?:\s+(.*))?(?:\r)?$/; -function isRegionDelimiter(lineText: string) { +const regionDelimiterRegExp = /^#(end)?region(.*)\r?$/; +function parseRegionDelimiter(lineText: string) { // We trim the leading whitespace and // without the regex since the // multiple potential whitespace matches can make for some gnarly backtracking behavior lineText = lineText.trimStart(); @@ -167,7 +167,11 @@ function isRegionDelimiter(lineText: string) { return null; // eslint-disable-line no-restricted-syntax } lineText = lineText.slice(2).trim(); - return regionDelimiterRegExp.exec(lineText); + const result = regionDelimiterRegExp.exec(lineText); + if (result) { + return { isStart: !result[1], name: result[2].trim() }; + } + return undefined; } function addOutliningForLeadingCommentsForPos(pos: number, sourceFile: SourceFile, cancellationToken: CancellationToken, out: OutliningSpan[]): void { @@ -184,7 +188,7 @@ function addOutliningForLeadingCommentsForPos(pos: number, sourceFile: SourceFil case SyntaxKind.SingleLineCommentTrivia: // never fold region delimiters into single-line comment regions const commentText = sourceText.slice(pos, end); - if (isRegionDelimiter(commentText)) { + if (parseRegionDelimiter(commentText)) { combineAndAddMultipleSingleLineComments(); singleLineCommentCount = 0; break; diff --git a/src/services/services.ts b/src/services/services.ts index f20e99cc88c0a..5bccc5fc677b9 100644 --- a/src/services/services.ts +++ b/src/services/services.ts @@ -3166,7 +3166,7 @@ export function createLanguageService( // // The following three regexps are used to match the start of the text up to the TODO // comment portion. - const singleLineCommentStart = /(?:\/\/+\s*)/.source; + const singleLineCommentStart = /(?:\/{2,}\s*)/.source; const multiLineCommentStart = /(?:\/\*+\s*)/.source; const anyNumberOfSpacesAndAsterisksAtStartOfLine = /(?:^(?:\s|\*)*)/.source; diff --git a/src/services/sourcemaps.ts b/src/services/sourcemaps.ts index dffc7f51ea8e4..a8c168eb320aa 100644 --- a/src/services/sourcemaps.ts +++ b/src/services/sourcemaps.ts @@ -27,7 +27,7 @@ import { tryParseRawSourceMap, } from "./_namespaces/ts.js"; -const base64UrlRegExp = /^data:(?:application\/json(?:;charset=[uU][tT][fF]-8);base64,([A-Za-z0-9+/=]+)$)?/; +const base64UrlRegExp = /^data:(?:application\/json;charset=[uU][tT][fF]-8;base64,([A-Za-z0-9+/=]+)$)?/; /** @internal */ export interface SourceMapper { diff --git a/src/testRunner/runner.ts b/src/testRunner/runner.ts index b460ab810c56e..f33b71114e110 100644 --- a/src/testRunner/runner.ts +++ b/src/testRunner/runner.ts @@ -31,7 +31,7 @@ function runTests(runners: RunnerBase[]) { for (const full of runner.enumerateTestFiles()) { const base = vpath.basename(full).toLowerCase(); // allow existing dupes in fourslash/shims and fourslash/server - if (seen.has(base) && !/fourslash\/(shim|server)/.test(full)) { + if (seen.has(base) && !/fourslash\/(?:shim|server)/.test(full)) { dupes.push([seen.get(base)!, full]); } else { @@ -52,7 +52,7 @@ function tryGetConfig(args: string[]) { const prefix = "--config="; const configPath = ts.forEach(args, arg => arg.lastIndexOf(prefix, 0) === 0 && arg.substr(prefix.length)); // strip leading and trailing quotes from the path (necessary on Windows since shell does not do it automatically) - return configPath && configPath.replace(/(^["'])|(["']$)/g, ""); + return configPath && configPath.replace(/^["']|["']$/g, ""); } export function createRunner(kind: TestRunnerKind): RunnerBase { diff --git a/src/testRunner/unittests/config/initializeTSConfig.ts b/src/testRunner/unittests/config/initializeTSConfig.ts index 713c693d0e807..916bc9f3ac35f 100644 --- a/src/testRunner/unittests/config/initializeTSConfig.ts +++ b/src/testRunner/unittests/config/initializeTSConfig.ts @@ -6,7 +6,7 @@ describe("unittests:: config:: initTSConfig", () => { describe(name, () => { const commandLine = ts.parseCommandLine(commandLinesArgs); const initResult = ts.generateTSConfig(commandLine.options, commandLine.fileNames, "\n"); - const outputFileName = `config/initTSConfig/${name.replace(/[^a-z0-9\-. ]/ig, "")}/tsconfig.json`; + const outputFileName = `config/initTSConfig/${name.replace(/[^a-z0-9\-. ]/gi, "")}/tsconfig.json`; it(`Correct output for ${outputFileName}`, () => { Harness.Baseline.runBaseline(outputFileName, initResult, { PrintDiff: true }); diff --git a/src/testRunner/unittests/config/showConfig.ts b/src/testRunner/unittests/config/showConfig.ts index 0061df800a223..350b18c06edd8 100644 --- a/src/testRunner/unittests/config/showConfig.ts +++ b/src/testRunner/unittests/config/showConfig.ts @@ -4,7 +4,7 @@ import * as ts from "../../_namespaces/ts.js"; describe("unittests:: config:: showConfig", () => { function showTSConfigCorrectly(name: string, commandLinesArgs: string[], configJson?: object) { describe(name, () => { - const outputFileName = `config/showConfig/${name.replace(/[^a-z0-9\-./ ]/ig, "")}/tsconfig.json`; + const outputFileName = `config/showConfig/${name.replace(/[^a-z0-9\-./ ]/gi, "")}/tsconfig.json`; it(`Correct output for ${outputFileName}`, () => { const cwd = `/${name}`; diff --git a/src/testRunner/unittests/helpers/baseline.ts b/src/testRunner/unittests/helpers/baseline.ts index 7f5cc3e7390cd..aeff3885b94ce 100644 --- a/src/testRunner/unittests/helpers/baseline.ts +++ b/src/testRunner/unittests/helpers/baseline.ts @@ -7,8 +7,8 @@ import { TestServerHost } from "./virtualFileSystemWithWatch.js"; export function sanitizeSysOutput(output: string) { return output - .replace(/Elapsed::\s[0-9]+(?:\.\d+)?ms/g, "Elapsed:: *ms") - .replace(/[0-9][0-9]:[0-9][0-9]:[0-9][0-9]\s(A|P)M/g, "HH:MM:SS AM"); + .replace(/Elapsed::\s\d+(?:\.\d+)?ms/g, "Elapsed:: *ms") + .replace(/\d\d:\d\d:\d\d\s(?:A|P)M/g, "HH:MM:SS AM"); } export type CommandLineProgram = [ts.Program, ts.BuilderProgram?]; diff --git a/src/testRunner/unittests/jsonParserRecovery.ts b/src/testRunner/unittests/jsonParserRecovery.ts index fb03cbf045a6f..844585447848c 100644 --- a/src/testRunner/unittests/jsonParserRecovery.ts +++ b/src/testRunner/unittests/jsonParserRecovery.ts @@ -7,7 +7,7 @@ describe("unittests:: jsonParserRecovery", () => { const file = ts.parseJsonText(name, text); assert(file.parseDiagnostics.length, "Should have parse errors"); Harness.Baseline.runBaseline( - `jsonParserRecovery/${name.replace(/[^a-z0-9_-]/ig, "_")}.errors.txt`, + `jsonParserRecovery/${name.replace(/[^\w-]/g, "_")}.errors.txt`, Harness.Compiler.getErrorBaseline([{ content: text, unitName: name, diff --git a/src/testRunner/unittests/printer.ts b/src/testRunner/unittests/printer.ts index 86a7b41d167af..2e44c6cb73a3c 100644 --- a/src/testRunner/unittests/printer.ts +++ b/src/testRunner/unittests/printer.ts @@ -126,7 +126,7 @@ describe("unittests:: PrinterAPI", () => { const file = program.getSourceFile("/test.d.ts")!; const printer = ts.createPrinter({ newLine: ts.NewLineKind.CarriageReturnLineFeed }); const output = printer.printFile(file); - assert.equal(output.split(/\r?\n/g).length, 3); + assert.equal(output.split(/\r?\n/).length, 3); }); it("with statements", () => { const host = new fakes.CompilerHost( @@ -140,7 +140,7 @@ describe("unittests:: PrinterAPI", () => { const file = program.getSourceFile("/test.d.ts")!; const printer = ts.createPrinter({ newLine: ts.NewLineKind.CarriageReturnLineFeed }); const output = printer.printFile(file); - assert.equal(output.split(/\r?\n/g).length, 4); + assert.equal(output.split(/\r?\n/).length, 4); }); }); diff --git a/src/testRunner/unittests/services/transpile.ts b/src/testRunner/unittests/services/transpile.ts index 640923c53c65e..3a1d1c24c9ae4 100644 --- a/src/testRunner/unittests/services/transpile.ts +++ b/src/testRunner/unittests/services/transpile.ts @@ -40,7 +40,7 @@ describe("unittests:: services:: Transpile", () => { transpileOptions.reportDiagnostics = true; - const justName = "transpile/" + name.replace(/[^a-z0-9\-. ()=]/ig, "") + (transpileOptions.compilerOptions.jsx ? ts.Extension.Tsx : ts.Extension.Ts); + const justName = "transpile/" + name.replace(/[^a-z0-9\-. ()=]/gi, "") + (transpileOptions.compilerOptions.jsx ? ts.Extension.Tsx : ts.Extension.Ts); const toBeCompiled = [{ unitName, content: input, diff --git a/src/testRunner/unittests/tsserver/cachingFileSystemInformation.ts b/src/testRunner/unittests/tsserver/cachingFileSystemInformation.ts index 44ea2d57e82c0..f87ebd36b3726 100644 --- a/src/testRunner/unittests/tsserver/cachingFileSystemInformation.ts +++ b/src/testRunner/unittests/tsserver/cachingFileSystemInformation.ts @@ -526,7 +526,7 @@ describe("unittests:: tsserver:: CachingFileSystemInformation:: tsserverProjectS ts.forEach(filesAndFoldersToAdd, f => { f.path = f.path .replace("/a/b/node_modules/.staging", "/a/b/node_modules") - .replace(/[-.][\d\w][\d\w][\d\w][\d\w][\d\w][\d\w][\d\w][\d\w]/g, ""); + .replace(/[-.]\w\w\w\w\w\w\w\w/g, ""); }); host.deleteFolder(root + "/a/b/node_modules/.staging", /*recursive*/ true); From 77534875918d98c75006123a910ebf89fd4fb1be Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Tue, 13 Aug 2024 17:58:08 -0700 Subject: [PATCH 30/50] Handle delayed or missed watches for project updates (#59625) --- src/compiler/watchUtilities.ts | 12 + src/server/editorServices.ts | 48 +- .../helpers/virtualFileSystemWithWatch.ts | 26 +- .../tsserver/getEditsForFileRename.ts | 88 ++ src/testRunner/unittests/tsserver/projects.ts | 29 +- tests/baselines/reference/api/typescript.d.ts | 1 + ...der-that-already-contains-@types-folder.js | 13 +- ...le-to-and-from-folder-canUseWatchEvents.js | 1074 +++++++++++++++++ ...rks-when-moving-file-to-and-from-folder.js | 844 +++++++++++++ ...project-structure-and-reports-no-errors.js | 18 +- ...directory-watch-invoke-on-file-creation.js | 215 +--- ...polling-when-file-is-added-to-subfolder.js | 43 +- ...tchFile-when-file-is-added-to-subfolder.js | 39 +- 13 files changed, 2203 insertions(+), 247 deletions(-) create mode 100644 tests/baselines/reference/tsserver/getEditsForFileRename/works-when-moving-file-to-and-from-folder-canUseWatchEvents.js create mode 100644 tests/baselines/reference/tsserver/getEditsForFileRename/works-when-moving-file-to-and-from-folder.js diff --git a/src/compiler/watchUtilities.ts b/src/compiler/watchUtilities.ts index e2e5c87cc8fa6..cbeceed07fd6e 100644 --- a/src/compiler/watchUtilities.ts +++ b/src/compiler/watchUtilities.ts @@ -21,6 +21,7 @@ import { FileWatcherCallback, FileWatcherEventKind, find, + forEachAncestorDirectory, getAllowJSCompilerOption, getBaseFileName, getDirectoryPath, @@ -291,6 +292,13 @@ export function createCachedDirectoryStructureHost(host: DirectoryStructureHost, return host.realpath ? host.realpath(s) : s; } + function clearFirstAncestorEntry(fileOrDirectoryPath: Path) { + forEachAncestorDirectory( + getDirectoryPath(fileOrDirectoryPath), + ancestor => cachedReadDirectoryResult.delete(ensureTrailingDirectorySeparator(ancestor)) ? true : undefined, + ); + } + function addOrDeleteFileOrDirectory(fileOrDirectory: string, fileOrDirectoryPath: Path) { const existingResult = getCachedFileSystemEntries(fileOrDirectoryPath); if (existingResult !== undefined) { @@ -302,6 +310,7 @@ export function createCachedDirectoryStructureHost(host: DirectoryStructureHost, const parentResult = getCachedFileSystemEntriesForBaseDir(fileOrDirectoryPath); if (!parentResult) { + clearFirstAncestorEntry(fileOrDirectoryPath); return undefined; } @@ -339,6 +348,9 @@ export function createCachedDirectoryStructureHost(host: DirectoryStructureHost, if (parentResult) { updateFilesOfFileSystemEntry(parentResult, getBaseNameOfFileName(fileName), eventKind === FileWatcherEventKind.Created); } + else { + clearFirstAncestorEntry(filePath); + } } function updateFilesOfFileSystemEntry(parentResult: SortedAndCanonicalizedMutableFileSystemEntries, baseName: string, fileExists: boolean): void { diff --git a/src/server/editorServices.ts b/src/server/editorServices.ts index 012873f211253..acd3088ec250c 100644 --- a/src/server/editorServices.ts +++ b/src/server/editorServices.ts @@ -80,6 +80,7 @@ import { length, map, mapDefinedIterator, + memoize, missingFileModifiedTime, MultiMap, noop, @@ -1912,6 +1913,11 @@ export class ProjectService { this.watchPackageJsonFile(file, fileOrDirectoryPath, wildCardWatcher); } + if (!fsResult?.fileExists) { + // Ensure we send sourceFileChange + this.sendSourceFileChange(fileOrDirectoryPath); + } + const configuredProjectForConfig = this.findConfiguredProjectByProjectName(configFileName); if ( isIgnoredFileFromWildCardWatching({ @@ -3838,6 +3844,34 @@ export class ProjectService { this.logger.close(); } + private sendSourceFileChange(inPath: Path | undefined) { + this.filenameToScriptInfo.forEach(info => { + if (this.openFiles.has(info.path)) return; // Skip open files + if (!info.fileWatcher) return; // not watched file + const eventKind = memoize(() => + this.host.fileExists(info.fileName) ? + info.deferredDelete ? + FileWatcherEventKind.Created : + FileWatcherEventKind.Changed : + FileWatcherEventKind.Deleted + ); + if (inPath) { + // Skip node modules and files that are not in path + if (isScriptInfoWatchedFromNodeModules(info) || !info.path.startsWith(inPath)) return; + // If we are sending delete event and its already deleted, ignore + if (eventKind() === FileWatcherEventKind.Deleted && info.deferredDelete) return; + // In change cases, its hard to know if this is marked correctly across files and projects, so just send the event + this.logger.info(`Invoking sourceFileChange on ${info.fileName}:: ${eventKind()}`); + } + + // Handle as if file is changed or deleted + this.onSourceFileChanged( + info, + eventKind(), + ); + }); + } + /** * This function rebuilds the project for every file opened by the client * This does not reload contents of open files from disk. But we could do that if needed @@ -3850,19 +3884,7 @@ export class ProjectService { // as there is no need to load contents of the files from the disk // Reload script infos - this.filenameToScriptInfo.forEach(info => { - if (this.openFiles.has(info.path)) return; // Skip open files - if (!info.fileWatcher) return; // not watched file - // Handle as if file is changed or deleted - this.onSourceFileChanged( - info, - this.host.fileExists(info.fileName) ? - info.deferredDelete ? - FileWatcherEventKind.Created : - FileWatcherEventKind.Changed : - FileWatcherEventKind.Deleted, - ); - }); + this.sendSourceFileChange(/*inPath*/ undefined); // Cancel all project updates since we will be updating them now this.pendingProjectUpdates.forEach((_project, projectName) => { this.throttledOperations.cancel(projectName); diff --git a/src/testRunner/unittests/helpers/virtualFileSystemWithWatch.ts b/src/testRunner/unittests/helpers/virtualFileSystemWithWatch.ts index 03f49e7d600f9..ccc47bd3161be 100644 --- a/src/testRunner/unittests/helpers/virtualFileSystemWithWatch.ts +++ b/src/testRunner/unittests/helpers/virtualFileSystemWithWatch.ts @@ -556,33 +556,33 @@ export class TestServerHost implements server.ServerHost, FormatDiagnosticsHost, this.addFileOrFolderInFolder(baseFolder, newFile); } - renameFolder(folderName: string, newFolderName: string) { + renameFolder(folderName: string, newFolderName: string, skipFolderEntryWatches?: true) { const fullPath = getNormalizedAbsolutePath(folderName, this.currentDirectory); const path = this.toPath(fullPath); const folder = this.fs.get(path) as FsFolder; Debug.assert(!!folder); + const newFullPath = getNormalizedAbsolutePath(newFolderName, this.currentDirectory); + const newFolder = this.toFsFolder(newFullPath); + + // Invoke watches for files in the folder as deleted (from old path) + this.renameFolderEntries(folder, newFolder, skipFolderEntryWatches); + // Only remove the folder this.removeFileOrFolder(folder, /*isRenaming*/ true); // Add updated folder with new folder name - const newFullPath = getNormalizedAbsolutePath(newFolderName, this.currentDirectory); - const newFolder = this.toFsFolder(newFullPath); const newPath = newFolder.path; - const basePath = getDirectoryPath(path); - Debug.assert(basePath !== path); - Debug.assert(basePath === getDirectoryPath(newPath)); + const basePath = getDirectoryPath(newPath); + this.ensureFileOrFolder({ path: getDirectoryPath(newFullPath) }); const baseFolder = this.fs.get(basePath) as FsFolder; this.addFileOrFolderInFolder(baseFolder, newFolder); - - // Invoke watches for files in the folder as deleted (from old path) - this.renameFolderEntries(folder, newFolder); } - private renameFolderEntries(oldFolder: FsFolder, newFolder: FsFolder) { + private renameFolderEntries(oldFolder: FsFolder, newFolder: FsFolder, skipWatches: true | undefined) { for (const entry of oldFolder.entries) { this.fs.delete(entry.path); - this.invokeFileAndFsWatches(entry.fullPath, FileWatcherEventKind.Deleted, entry.fullPath); + if (!skipWatches) this.invokeFileAndFsWatches(entry.fullPath, FileWatcherEventKind.Deleted, entry.fullPath); entry.fullPath = combinePaths(newFolder.fullPath, getBaseFileName(entry.fullPath)); entry.path = this.toPath(entry.fullPath); @@ -591,9 +591,9 @@ export class TestServerHost implements server.ServerHost, FormatDiagnosticsHost, } this.fs.set(entry.path, entry); this.setInode(entry.path); - this.invokeFileAndFsWatches(entry.fullPath, FileWatcherEventKind.Created, entry.fullPath); + if (!skipWatches) this.invokeFileAndFsWatches(entry.fullPath, FileWatcherEventKind.Created, entry.fullPath); if (isFsFolder(entry)) { - this.renameFolderEntries(entry, entry); + this.renameFolderEntries(entry, entry, skipWatches); } } } diff --git a/src/testRunner/unittests/tsserver/getEditsForFileRename.ts b/src/testRunner/unittests/tsserver/getEditsForFileRename.ts index e3ecbfd203aa8..44797da8f0bbe 100644 --- a/src/testRunner/unittests/tsserver/getEditsForFileRename.ts +++ b/src/testRunner/unittests/tsserver/getEditsForFileRename.ts @@ -1,9 +1,12 @@ import * as ts from "../../_namespaces/ts.js"; +import { dedent } from "../../_namespaces/Utils.js"; import { jsonToReadableText } from "../helpers.js"; +import { libContent } from "../helpers/contents.js"; import { baselineTsserverLogs, closeFilesForSession, openFilesForSession, + protocolTextSpanFromSubstring, TestSession, textSpanFromSubstring, verifyGetErrRequest, @@ -207,4 +210,89 @@ describe("unittests:: tsserver:: getEditsForFileRename", () => { }); }) ); + + [true, false].forEach(canUseWatchEvents => + it(`works when moving file to and from folder${canUseWatchEvents ? " canUseWatchEvents" : ""}`, () => { + const alertText = dedent` + export function alert(message: string) { + console.log(\`ALERT: \${message}\`); + } + `; + const projectRootPath = "/home/src/myprojects/project"; + const indexTs = `${projectRootPath}/index.ts`; + const indexFileText = dedent` + import { alert } from '@app/components/whatever/alert'; + alert('Hello, world!'); + `; + const componentsWhatever = `${projectRootPath}/components/whatever`; + const functionsWhatever = `${projectRootPath}/functions/whatever`; + const host = createServerHost({ + "/home/src/myprojects/project/tsconfig.json": jsonToReadableText({ + compilerOptions: { + target: "es2016", + module: "commonjs", + paths: { + "@app/*": [ + "./*", + ], + }, + esModuleInterop: true, + forceConsistentCasingInFileNames: true, + strict: true, + skipLibCheck: true, + }, + }), + [indexTs]: indexFileText, + [`${componentsWhatever}/alert.ts`]: alertText, + [`${functionsWhatever}/placeholder.txt`]: "", + "/a/lib/lib.es2016.full.d.ts": libContent, + }); + const session = new TestSession({ host, canUseWatchEvents, canUseEvents: true }); + openFilesForSession([{ file: indexTs, projectRootPath }], session); + host.renameFolder(componentsWhatever, functionsWhatever, /*skipFolderEntryWatches*/ true); + if (canUseWatchEvents) session.invokeWatchChanges(); + openFilesForSession([{ + file: `${functionsWhatever}/alert.ts`, + content: alertText, + projectRootPath, + }], session); + session.executeCommandSeq({ + command: ts.server.protocol.CommandTypes.GetEditsForFileRename, + arguments: { oldFilePath: componentsWhatever, newFilePath: functionsWhatever }, + }); + // Apply edit to index.ts + session.executeCommandSeq({ + command: ts.server.protocol.CommandTypes.UpdateOpen, + arguments: { + changedFiles: [{ + fileName: indexTs, + textChanges: [{ + ...protocolTextSpanFromSubstring(indexFileText, "@app/components/whatever/alert"), + newText: "@app/functions/whatever/alert", + }], + }], + }, + }); + host.runQueuedTimeoutCallbacks(); + host.renameFolder(functionsWhatever, componentsWhatever, /*skipFolderEntryWatches*/ true); + session.executeCommandSeq({ + command: ts.server.protocol.CommandTypes.UpdateOpen, + arguments: { + openFiles: [{ + file: `${componentsWhatever}/alert.ts`, + fileContent: alertText, + projectRootPath, + }], + closedFiles: [`${functionsWhatever}/alert.ts`], + }, + }); + session.executeCommandSeq({ + command: ts.server.protocol.CommandTypes.GetEditsForFileRename, + arguments: { oldFilePath: functionsWhatever, newFilePath: componentsWhatever }, + }); + if (canUseWatchEvents) session.invokeWatchChanges(); + host.runQueuedTimeoutCallbacks(); + baselineTsserverLogs("getEditsForFileRename", `works when moving file to and from folder${canUseWatchEvents ? " canUseWatchEvents" : ""}`, session); + }) + ); }); diff --git a/src/testRunner/unittests/tsserver/projects.ts b/src/testRunner/unittests/tsserver/projects.ts index dfa401753906d..9ab3439092b9d 100644 --- a/src/testRunner/unittests/tsserver/projects.ts +++ b/src/testRunner/unittests/tsserver/projects.ts @@ -1375,19 +1375,38 @@ describe("unittests:: tsserver:: projects::", () => { host.runQueuedTimeoutCallbacks(); // file is deleted but watches are not yet invoked - const originalFileExists = host.fileExists; - host.fileExists = s => s === fileA.path ? false : originalFileExists.call(host, s); + const invokeFileWatcher = host.invokeFileWatcher; + const fileWatches: Parameters[] = []; + host.invokeFileWatcher = (fileFullPath, eventKind, modifiedTime) => { + fileWatches.push([fileFullPath, eventKind, modifiedTime]); + }; + const invokeFsWatchesCallbacks = host.invokeFsWatchesCallbacks; + const fsWatches: Parameters[] = []; + host.invokeFsWatchesCallbacks = (fullPath, eventName, eventFullPath, useTildeSuffix) => { + fsWatches.push([fullPath, eventName, eventFullPath, useTildeSuffix]); + }; + const invokeFsWatchesRecursiveCallbacks = host.invokeFsWatchesRecursiveCallbacks; + const fsWatchesRecursive: Parameters[] = []; + host.invokeFsWatchesRecursiveCallbacks = (fullPath, eventName, eventFullPath, useTildeSuffix) => { + fsWatchesRecursive.push([fullPath, eventName, eventFullPath, useTildeSuffix]); + }; + + host.deleteFile(fileA.path); + host.ensureFileOrFolder(fileSubA); closeFilesForSession([fileA], session); // This should create inferred project since fileSubA not on the disk openFile(fileSubA); host.runQueuedTimeoutCallbacks(); // Update configured project and projects for open file - host.fileExists = originalFileExists; + host.invokeFileWatcher = invokeFileWatcher; + host.invokeFsWatchesCallbacks = invokeFsWatchesCallbacks; + host.invokeFsWatchesRecursiveCallbacks = invokeFsWatchesRecursiveCallbacks; // Actually trigger the file move - host.deleteFile(fileA.path); - host.ensureFileOrFolder(fileSubA); + fileWatches.forEach(args => host.invokeFileWatcher(...args)); + fsWatches.forEach(args => host.invokeFsWatchesCallbacks(...args)); + fsWatchesRecursive.forEach(args => host.invokeFsWatchesRecursiveCallbacks(...args)); verifyGetErrRequest({ session, files: [fileB, fileSubA], existingTimeouts: true }); baselineTsserverLogs("projects", "handles delayed directory watch invoke on file creation", session); diff --git a/tests/baselines/reference/api/typescript.d.ts b/tests/baselines/reference/api/typescript.d.ts index 0a0d0a2f8dd95..1b71932e3463f 100644 --- a/tests/baselines/reference/api/typescript.d.ts +++ b/tests/baselines/reference/api/typescript.d.ts @@ -3318,6 +3318,7 @@ declare namespace ts { setHostConfiguration(args: protocol.ConfigureRequestArguments): void; private getWatchOptionsFromProjectWatchOptions; closeLog(): void; + private sendSourceFileChange; /** * This function rebuilds the project for every file opened by the client * This does not reload contents of open files from disk. But we could do that if needed diff --git a/tests/baselines/reference/tscWatch/resolutionCache/works-when-renaming-node_modules-folder-that-already-contains-@types-folder.js b/tests/baselines/reference/tscWatch/resolutionCache/works-when-renaming-node_modules-folder-that-already-contains-@types-folder.js index b2150d972a05a..b40a6feec62ad 100644 --- a/tests/baselines/reference/tscWatch/resolutionCache/works-when-renaming-node_modules-folder-that-already-contains-@types-folder.js +++ b/tests/baselines/reference/tscWatch/resolutionCache/works-when-renaming-node_modules-folder-that-already-contains-@types-folder.js @@ -86,8 +86,8 @@ export {} //// [/user/username/projects/myproject/node_modules2/@types/qqq/index.d.ts] deleted Output:: -sysLog:: /user/username/projects/myproject/node_modules:: Changing watcher to PresentFileSystemEntryWatcher sysLog:: /user/username/projects/myproject/node_modules/@types:: Changing watcher to PresentFileSystemEntryWatcher +sysLog:: /user/username/projects/myproject/node_modules:: Changing watcher to PresentFileSystemEntryWatcher PolledWatches:: @@ -115,14 +115,13 @@ FsWatchesRecursive:: {} Timeout callback:: count: 2 -11: timerToUpdateProgram *new* -13: timerToInvalidateFailedLookupResolutions *new* +7: timerToUpdateProgram *new* +10: timerToInvalidateFailedLookupResolutions *new* Before running Timeout callback:: count: 2 -11: timerToUpdateProgram -13: timerToInvalidateFailedLookupResolutions +7: timerToUpdateProgram +10: timerToInvalidateFailedLookupResolutions -Host is moving to new time After running Timeout callback:: count: 0 Output:: >> Screen clear @@ -167,7 +166,7 @@ FsWatchesRecursive:: {} Timeout callback:: count: 0 -13: timerToInvalidateFailedLookupResolutions *deleted* +10: timerToInvalidateFailedLookupResolutions *deleted* Program root files: [ diff --git a/tests/baselines/reference/tsserver/getEditsForFileRename/works-when-moving-file-to-and-from-folder-canUseWatchEvents.js b/tests/baselines/reference/tsserver/getEditsForFileRename/works-when-moving-file-to-and-from-folder-canUseWatchEvents.js new file mode 100644 index 0000000000000..d18d6b034643b --- /dev/null +++ b/tests/baselines/reference/tsserver/getEditsForFileRename/works-when-moving-file-to-and-from-folder-canUseWatchEvents.js @@ -0,0 +1,1074 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +Before request +//// [/home/src/myprojects/project/tsconfig.json] +{ + "compilerOptions": { + "target": "es2016", + "module": "commonjs", + "paths": { + "@app/*": [ + "./*" + ] + }, + "esModuleInterop": true, + "forceConsistentCasingInFileNames": true, + "strict": true, + "skipLibCheck": true + } +} + +//// [/home/src/myprojects/project/index.ts] +import { alert } from '@app/components/whatever/alert'; +alert('Hello, world!'); + + +//// [/home/src/myprojects/project/components/whatever/alert.ts] +export function alert(message: string) { + console.log(`ALERT: ${message}`); +} + + +//// [/home/src/myprojects/project/functions/whatever/placeholder.txt] + + +//// [/a/lib/lib.es2016.full.d.ts] +/// +interface Boolean {} +interface Function {} +interface CallableFunction {} +interface NewableFunction {} +interface IArguments {} +interface Number { toExponential: any; } +interface Object {} +interface RegExp {} +interface String { charAt: any; } +interface Array { length: number; [n: number]: T; } +interface ReadonlyArray {} +declare const console: { log(msg: any): void; }; + + +Info seq [hh:mm:ss:mss] request: + { + "command": "open", + "arguments": { + "file": "/home/src/myprojects/project/index.ts", + "projectRootPath": "/home/src/myprojects/project" + }, + "seq": 1, + "type": "request" + } +Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /home/src/myprojects/project/index.ts ProjectRootPath: /home/src/myprojects/project:: Result: /home/src/myprojects/project/tsconfig.json +Info seq [hh:mm:ss:mss] Creating configuration project /home/src/myprojects/project/tsconfig.json +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/myprojects/project/tsconfig.json 2000 undefined Project: /home/src/myprojects/project/tsconfig.json WatchType: Config file +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "createFileWatcher", + "body": { + "id": 1, + "path": "/home/src/myprojects/project/tsconfig.json" + } + } +Custom watchFile:: Added:: {"id":1,"path":"/home/src/myprojects/project/tsconfig.json"} +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingStart", + "body": { + "projectName": "/home/src/myprojects/project/tsconfig.json", + "reason": "Creating possible configured project for /home/src/myprojects/project/index.ts to open" + } + } +Info seq [hh:mm:ss:mss] Config: /home/src/myprojects/project/tsconfig.json : { + "rootNames": [ + "/home/src/myprojects/project/index.ts", + "/home/src/myprojects/project/components/whatever/alert.ts" + ], + "options": { + "target": 3, + "module": 1, + "paths": { + "@app/*": [ + "./*" + ] + }, + "esModuleInterop": true, + "forceConsistentCasingInFileNames": true, + "strict": true, + "skipLibCheck": true, + "pathsBasePath": "/home/src/myprojects/project", + "configFilePath": "/home/src/myprojects/project/tsconfig.json" + } +} +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/myprojects/project 1 undefined Config: /home/src/myprojects/project/tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "createDirectoryWatcher", + "body": { + "id": 2, + "path": "/home/src/myprojects/project", + "recursive": true, + "ignoreUpdate": true + } + } +Custom watchDirectory:: Added:: {"id":2,"path":"/home/src/myprojects/project","recursive":true,"ignoreUpdate":true} +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/myprojects/project 1 undefined Config: /home/src/myprojects/project/tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/myprojects/project/components/whatever/alert.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "createFileWatcher", + "body": { + "id": 3, + "path": "/home/src/myprojects/project/components/whatever/alert.ts" + } + } +Custom watchFile:: Added:: {"id":3,"path":"/home/src/myprojects/project/components/whatever/alert.ts"} +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /home/src/myprojects/project/tsconfig.json +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /a/lib/lib.es2016.full.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "createFileWatcher", + "body": { + "id": 4, + "path": "/a/lib/lib.es2016.full.d.ts" + } + } +Custom watchFile:: Added:: {"id":4,"path":"/a/lib/lib.es2016.full.d.ts"} +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/myprojects/project/node_modules/@types 1 undefined Project: /home/src/myprojects/project/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "createDirectoryWatcher", + "body": { + "id": 5, + "path": "/home/src/myprojects/project/node_modules/@types", + "recursive": true, + "ignoreUpdate": true + } + } +Custom watchDirectory:: Added:: {"id":5,"path":"/home/src/myprojects/project/node_modules/@types","recursive":true,"ignoreUpdate":true} +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/myprojects/project/node_modules/@types 1 undefined Project: /home/src/myprojects/project/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/myprojects/node_modules/@types 1 undefined Project: /home/src/myprojects/project/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "createDirectoryWatcher", + "body": { + "id": 6, + "path": "/home/src/myprojects/node_modules/@types", + "recursive": true, + "ignoreUpdate": true + } + } +Custom watchDirectory:: Added:: {"id":6,"path":"/home/src/myprojects/node_modules/@types","recursive":true,"ignoreUpdate":true} +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/myprojects/node_modules/@types 1 undefined Project: /home/src/myprojects/project/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /home/src/myprojects/project/tsconfig.json projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/home/src/myprojects/project/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (3) + /a/lib/lib.es2016.full.d.ts Text-1 "/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };" + /home/src/myprojects/project/components/whatever/alert.ts Text-1 "export function alert(message: string) {\n console.log(`ALERT: ${message}`);\n}\n" + /home/src/myprojects/project/index.ts SVC-1-0 "import { alert } from '@app/components/whatever/alert';\nalert('Hello, world!');\n" + + + ../../../../a/lib/lib.es2016.full.d.ts + Default library for target 'es2016' + components/whatever/alert.ts + Imported via '@app/components/whatever/alert' from file 'index.ts' + Matched by default include pattern '**/*' + index.ts + Matched by default include pattern '**/*' + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingFinish", + "body": { + "projectName": "/home/src/myprojects/project/tsconfig.json" + } + } +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "telemetry", + "body": { + "telemetryEventName": "projectInfo", + "payload": { + "projectId": "8eef2d0b8a0e9b1fea9cc093cf6e65a3858613760d59db089978dadbab81a1fb", + "fileStats": { + "js": 0, + "jsSize": 0, + "jsx": 0, + "jsxSize": 0, + "ts": 2, + "tsSize": 161, + "tsx": 0, + "tsxSize": 0, + "dts": 1, + "dtsSize": 413, + "deferred": 0, + "deferredSize": 0 + }, + "compilerOptions": { + "target": "es2016", + "module": "commonjs", + "paths": "", + "esModuleInterop": true, + "forceConsistentCasingInFileNames": true, + "strict": true, + "skipLibCheck": true + }, + "typeAcquisition": { + "enable": false, + "include": false, + "exclude": false + }, + "extends": false, + "files": false, + "include": false, + "exclude": false, + "compileOnSave": false, + "configFileName": "tsconfig.json", + "projectType": "configured", + "languageServiceEnabled": true, + "version": "FakeVersion" + } + } + } +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "configFileDiag", + "body": { + "triggerFile": "/home/src/myprojects/project/index.ts", + "configFile": "/home/src/myprojects/project/tsconfig.json", + "diagnostics": [] + } + } +Info seq [hh:mm:ss:mss] Project '/home/src/myprojects/project/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (3) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /home/src/myprojects/project/index.ts ProjectRootPath: /home/src/myprojects/project +Info seq [hh:mm:ss:mss] Projects: /home/src/myprojects/project/tsconfig.json +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "open", + "request_seq": 1, + "success": true, + "performanceData": { + "updateGraphDurationMs": * + } + } +After request + +PolledWatches:: +/a/lib/lib.es2016.full.d.ts: *new* + {"event":{"id":4,"path":"/a/lib/lib.es2016.full.d.ts"}} +/home/src/myprojects/project/components/whatever/alert.ts: *new* + {"event":{"id":3,"path":"/home/src/myprojects/project/components/whatever/alert.ts"}} +/home/src/myprojects/project/tsconfig.json: *new* + {"event":{"id":1,"path":"/home/src/myprojects/project/tsconfig.json"}} + +FsWatchesRecursive:: +/home/src/myprojects/node_modules/@types: *new* + {"event":{"id":6,"path":"/home/src/myprojects/node_modules/@types","recursive":true,"ignoreUpdate":true}} +/home/src/myprojects/project: *new* + {"event":{"id":2,"path":"/home/src/myprojects/project","recursive":true,"ignoreUpdate":true}} +/home/src/myprojects/project/node_modules/@types: *new* + {"event":{"id":5,"path":"/home/src/myprojects/project/node_modules/@types","recursive":true,"ignoreUpdate":true}} + +Projects:: +/home/src/myprojects/project/tsconfig.json (Configured) *new* + projectStateVersion: 1 + projectProgramVersion: 1 + +ScriptInfos:: +/a/lib/lib.es2016.full.d.ts *new* + version: Text-1 + containingProjects: 1 + /home/src/myprojects/project/tsconfig.json +/home/src/myprojects/project/components/whatever/alert.ts *new* + version: Text-1 + containingProjects: 1 + /home/src/myprojects/project/tsconfig.json +/home/src/myprojects/project/index.ts (Open) *new* + version: SVC-1-0 + containingProjects: 1 + /home/src/myprojects/project/tsconfig.json *default* + +Custom watchDirectory:: Triggered Ignored:: {"id":2,"path":"/home/src/myprojects/project","recursive":true,"ignoreUpdate":true}:: /home/src/myprojects/project/components/whatever deleted +Custom watchDirectory:: Triggered Ignored:: {"id":2,"path":"/home/src/myprojects/project","recursive":true,"ignoreUpdate":true}:: /home/src/myprojects/project/functions/whatever created +Custom watchDirectory:: Triggered Ignored:: {"id":2,"path":"/home/src/myprojects/project","recursive":true,"ignoreUpdate":true}:: /home/src/myprojects/project/functions/whatever updated +Custom watchDirectory:: Triggered Ignored:: {"id":2,"path":"/home/src/myprojects/project","recursive":true,"ignoreUpdate":true}:: /home/src/myprojects/project/functions updated +Before request +//// [/home/src/myprojects/project/functions/whatever/alert.ts] +export function alert(message: string) { + console.log(`ALERT: ${message}`); +} + + +//// [/home/src/myprojects/project/components/whatever/alert.ts] deleted + +Info seq [hh:mm:ss:mss] request: + { + "command": "watchChange", + "arguments": { + "id": 2, + "deleted": [ + "/home/src/myprojects/project/components/whatever" + ], + "created": [ + "/home/src/myprojects/project/functions/whatever" + ] + }, + "seq": 2, + "type": "request" + } +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Triggered with /home/src/myprojects/project/functions/whatever :: WatchInfo: /home/src/myprojects/project 1 undefined Config: /home/src/myprojects/project/tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] Scheduled: /home/src/myprojects/project/tsconfig.json +Info seq [hh:mm:ss:mss] Scheduled: *ensureProjectForOpenFiles* +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Triggered with /home/src/myprojects/project/functions/whatever :: WatchInfo: /home/src/myprojects/project 1 undefined Config: /home/src/myprojects/project/tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Triggered with /home/src/myprojects/project/components/whatever :: WatchInfo: /home/src/myprojects/project 1 undefined Config: /home/src/myprojects/project/tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] Invoking sourceFileChange on /home/src/myprojects/project/components/whatever/alert.ts:: 2 +Info seq [hh:mm:ss:mss] Scheduled: /home/src/myprojects/project/tsconfig.json, Cancelled earlier one +Info seq [hh:mm:ss:mss] Scheduled: *ensureProjectForOpenFiles*, Cancelled earlier one +Info seq [hh:mm:ss:mss] Scheduled: /home/src/myprojects/project/tsconfig.json, Cancelled earlier one +Info seq [hh:mm:ss:mss] Scheduled: *ensureProjectForOpenFiles*, Cancelled earlier one +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Triggered with /home/src/myprojects/project/components/whatever :: WatchInfo: /home/src/myprojects/project 1 undefined Config: /home/src/myprojects/project/tsconfig.json WatchType: Wild card directory +After request + +Timeout callback:: count: 2 +5: /home/src/myprojects/project/tsconfig.json *new* +6: *ensureProjectForOpenFiles* *new* + +Projects:: +/home/src/myprojects/project/tsconfig.json (Configured) *changed* + projectStateVersion: 2 *changed* + projectProgramVersion: 1 + dirty: true *changed* + +ScriptInfos:: +/a/lib/lib.es2016.full.d.ts + version: Text-1 + containingProjects: 1 + /home/src/myprojects/project/tsconfig.json +/home/src/myprojects/project/components/whatever/alert.ts *changed* + version: Text-1 + pendingReloadFromDisk: true *changed* + deferredDelete: true *changed* + containingProjects: 0 *changed* + /home/src/myprojects/project/tsconfig.json *deleted* +/home/src/myprojects/project/index.ts (Open) + version: SVC-1-0 + containingProjects: 1 + /home/src/myprojects/project/tsconfig.json *default* + +Before request + +Info seq [hh:mm:ss:mss] request: + { + "command": "open", + "arguments": { + "file": "/home/src/myprojects/project/functions/whatever/alert.ts", + "projectRootPath": "/home/src/myprojects/project", + "fileContent": "export function alert(message: string) {\n console.log(`ALERT: ${message}`);\n}\n" + }, + "seq": 3, + "type": "request" + } +Info seq [hh:mm:ss:mss] Invoking /home/src/myprojects/project/tsconfig.json:: wildcard for open scriptInfo:: /home/src/myprojects/project/functions/whatever/alert.ts +Info seq [hh:mm:ss:mss] Scheduled: /home/src/myprojects/project/tsconfig.json, Cancelled earlier one +Info seq [hh:mm:ss:mss] Scheduled: *ensureProjectForOpenFiles*, Cancelled earlier one +Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /home/src/myprojects/project/functions/whatever/alert.ts ProjectRootPath: /home/src/myprojects/project:: Result: /home/src/myprojects/project/tsconfig.json +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /home/src/myprojects/project/tsconfig.json +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/myprojects/project/components 1 undefined Project: /home/src/myprojects/project/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "createDirectoryWatcher", + "body": { + "id": 7, + "path": "/home/src/myprojects/project/components", + "recursive": true, + "ignoreUpdate": true + } + } +Custom watchDirectory:: Added:: {"id":7,"path":"/home/src/myprojects/project/components","recursive":true,"ignoreUpdate":true} +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/myprojects/project/components 1 undefined Project: /home/src/myprojects/project/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/myprojects/project/node_modules 1 undefined Project: /home/src/myprojects/project/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "createDirectoryWatcher", + "body": { + "id": 8, + "path": "/home/src/myprojects/project/node_modules", + "recursive": true + } + } +Custom watchDirectory:: Added:: {"id":8,"path":"/home/src/myprojects/project/node_modules","recursive":true} +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/myprojects/project/node_modules 1 undefined Project: /home/src/myprojects/project/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/myprojects/node_modules 1 undefined Project: /home/src/myprojects/project/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "createDirectoryWatcher", + "body": { + "id": 9, + "path": "/home/src/myprojects/node_modules", + "recursive": true + } + } +Custom watchDirectory:: Added:: {"id":9,"path":"/home/src/myprojects/node_modules","recursive":true} +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/myprojects/node_modules 1 undefined Project: /home/src/myprojects/project/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /home/src/myprojects/project/tsconfig.json projectStateVersion: 2 projectProgramVersion: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/home/src/myprojects/project/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (3) + /a/lib/lib.es2016.full.d.ts Text-1 "/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };" + /home/src/myprojects/project/index.ts SVC-1-0 "import { alert } from '@app/components/whatever/alert';\nalert('Hello, world!');\n" + /home/src/myprojects/project/functions/whatever/alert.ts SVC-1-0 "export function alert(message: string) {\n console.log(`ALERT: ${message}`);\n}\n" + + + ../../../../a/lib/lib.es2016.full.d.ts + Default library for target 'es2016' + index.ts + Matched by default include pattern '**/*' + functions/whatever/alert.ts + Matched by default include pattern '**/*' + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /home/src/myprojects/project/components/whatever/alert.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "closeFileWatcher", + "body": { + "id": 3 + } + } +Custom watchFile:: Close:: {"id":3,"path":"/home/src/myprojects/project/components/whatever/alert.ts"} +Info seq [hh:mm:ss:mss] Project '/home/src/myprojects/project/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (3) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /home/src/myprojects/project/index.ts ProjectRootPath: /home/src/myprojects/project +Info seq [hh:mm:ss:mss] Projects: /home/src/myprojects/project/tsconfig.json +Info seq [hh:mm:ss:mss] FileName: /home/src/myprojects/project/functions/whatever/alert.ts ProjectRootPath: /home/src/myprojects/project +Info seq [hh:mm:ss:mss] Projects: /home/src/myprojects/project/tsconfig.json +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "open", + "request_seq": 3, + "success": true, + "performanceData": { + "updateGraphDurationMs": * + } + } +After request + +PolledWatches:: +/a/lib/lib.es2016.full.d.ts: + {"event":{"id":4,"path":"/a/lib/lib.es2016.full.d.ts"}} +/home/src/myprojects/project/tsconfig.json: + {"event":{"id":1,"path":"/home/src/myprojects/project/tsconfig.json"}} + +PolledWatches *deleted*:: +/home/src/myprojects/project/components/whatever/alert.ts: + {"event":{"id":3,"path":"/home/src/myprojects/project/components/whatever/alert.ts"}} + +FsWatchesRecursive:: +/home/src/myprojects/node_modules: *new* + {"event":{"id":9,"path":"/home/src/myprojects/node_modules","recursive":true}} +/home/src/myprojects/node_modules/@types: + {"event":{"id":6,"path":"/home/src/myprojects/node_modules/@types","recursive":true,"ignoreUpdate":true}} +/home/src/myprojects/project: + {"event":{"id":2,"path":"/home/src/myprojects/project","recursive":true,"ignoreUpdate":true}} +/home/src/myprojects/project/components: *new* + {"event":{"id":7,"path":"/home/src/myprojects/project/components","recursive":true,"ignoreUpdate":true}} +/home/src/myprojects/project/node_modules: *new* + {"event":{"id":8,"path":"/home/src/myprojects/project/node_modules","recursive":true}} +/home/src/myprojects/project/node_modules/@types: + {"event":{"id":5,"path":"/home/src/myprojects/project/node_modules/@types","recursive":true,"ignoreUpdate":true}} + +Timeout callback:: count: 2 +5: /home/src/myprojects/project/tsconfig.json *deleted* +6: *ensureProjectForOpenFiles* *deleted* +7: /home/src/myprojects/project/tsconfig.json *new* +8: *ensureProjectForOpenFiles* *new* + +Projects:: +/home/src/myprojects/project/tsconfig.json (Configured) *changed* + projectStateVersion: 2 + projectProgramVersion: 2 *changed* + dirty: false *changed* + +ScriptInfos:: +/a/lib/lib.es2016.full.d.ts + version: Text-1 + containingProjects: 1 + /home/src/myprojects/project/tsconfig.json +/home/src/myprojects/project/components/whatever/alert.ts *deleted* + version: Text-1 + pendingReloadFromDisk: true + deferredDelete: true + containingProjects: 0 +/home/src/myprojects/project/functions/whatever/alert.ts (Open) *new* + version: SVC-1-0 + containingProjects: 1 + /home/src/myprojects/project/tsconfig.json *default* +/home/src/myprojects/project/index.ts (Open) + version: SVC-1-0 + containingProjects: 1 + /home/src/myprojects/project/tsconfig.json *default* + +Before request + +Info seq [hh:mm:ss:mss] request: + { + "command": "getEditsForFileRename", + "arguments": { + "oldFilePath": "/home/src/myprojects/project/components/whatever", + "newFilePath": "/home/src/myprojects/project/functions/whatever" + }, + "seq": 4, + "type": "request" + } +Info seq [hh:mm:ss:mss] response: + { + "response": [ + { + "fileName": "/home/src/myprojects/project/index.ts", + "textChanges": [ + { + "start": { + "line": 1, + "offset": 24 + }, + "end": { + "line": 1, + "offset": 54 + }, + "newText": "@app/functions/whatever/alert" + } + ] + } + ], + "responseRequired": true + } +After request + +Projects:: +/home/src/myprojects/project/tsconfig.json (Configured) *changed* + projectStateVersion: 2 + projectProgramVersion: 2 + documentPositionMappers: 1 *changed* + /a/lib/lib.es2016.full.d.ts: identitySourceMapConsumer *new* + +ScriptInfos:: +/a/lib/lib.es2016.full.d.ts *changed* + version: Text-1 + sourceMapFilePath: false *changed* + containingProjects: 1 + /home/src/myprojects/project/tsconfig.json +/home/src/myprojects/project/functions/whatever/alert.ts (Open) + version: SVC-1-0 + containingProjects: 1 + /home/src/myprojects/project/tsconfig.json *default* +/home/src/myprojects/project/index.ts (Open) + version: SVC-1-0 + containingProjects: 1 + /home/src/myprojects/project/tsconfig.json *default* + +Before request + +Info seq [hh:mm:ss:mss] request: + { + "command": "updateOpen", + "arguments": { + "changedFiles": [ + { + "fileName": "/home/src/myprojects/project/index.ts", + "textChanges": [ + { + "start": { + "line": 1, + "offset": 24 + }, + "end": { + "line": 1, + "offset": 54 + }, + "newText": "@app/functions/whatever/alert" + } + ] + } + ] + }, + "seq": 5, + "type": "request" + } +Info seq [hh:mm:ss:mss] response: + { + "response": true, + "responseRequired": true + } +After request + +Projects:: +/home/src/myprojects/project/tsconfig.json (Configured) *changed* + projectStateVersion: 3 *changed* + projectProgramVersion: 2 + dirty: true *changed* + +ScriptInfos:: +/a/lib/lib.es2016.full.d.ts + version: Text-1 + sourceMapFilePath: false + containingProjects: 1 + /home/src/myprojects/project/tsconfig.json +/home/src/myprojects/project/functions/whatever/alert.ts (Open) + version: SVC-1-0 + containingProjects: 1 + /home/src/myprojects/project/tsconfig.json *default* +/home/src/myprojects/project/index.ts (Open) *changed* + version: SVC-1-1 *changed* + containingProjects: 1 + /home/src/myprojects/project/tsconfig.json *default* + +Before running Timeout callback:: count: 2 +7: /home/src/myprojects/project/tsconfig.json +8: *ensureProjectForOpenFiles* + +Info seq [hh:mm:ss:mss] Running: /home/src/myprojects/project/tsconfig.json +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /home/src/myprojects/project/tsconfig.json +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /home/src/myprojects/project/components 1 undefined Project: /home/src/myprojects/project/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "closeFileWatcher", + "body": { + "id": 7 + } + } +Custom watchDirectory:: Close:: {"id":7,"path":"/home/src/myprojects/project/components","recursive":true,"ignoreUpdate":true} +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/myprojects/project/components 1 undefined Project: /home/src/myprojects/project/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /home/src/myprojects/project/node_modules 1 undefined Project: /home/src/myprojects/project/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "closeFileWatcher", + "body": { + "id": 8 + } + } +Custom watchDirectory:: Close:: {"id":8,"path":"/home/src/myprojects/project/node_modules","recursive":true} +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/myprojects/project/node_modules 1 undefined Project: /home/src/myprojects/project/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /home/src/myprojects/node_modules 1 undefined Project: /home/src/myprojects/project/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "closeFileWatcher", + "body": { + "id": 9 + } + } +Custom watchDirectory:: Close:: {"id":9,"path":"/home/src/myprojects/node_modules","recursive":true} +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/myprojects/node_modules 1 undefined Project: /home/src/myprojects/project/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /home/src/myprojects/project/tsconfig.json projectStateVersion: 3 projectProgramVersion: 2 structureChanged: true structureIsReused:: SafeModules Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/home/src/myprojects/project/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (3) + /a/lib/lib.es2016.full.d.ts Text-1 "/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };" + /home/src/myprojects/project/functions/whatever/alert.ts SVC-1-0 "export function alert(message: string) {\n console.log(`ALERT: ${message}`);\n}\n" + /home/src/myprojects/project/index.ts SVC-1-1 "import { alert } from '@app/functions/whatever/alert';\nalert('Hello, world!');\n" + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Running: *ensureProjectForOpenFiles* +Info seq [hh:mm:ss:mss] Before ensureProjectForOpenFiles: +Info seq [hh:mm:ss:mss] Project '/home/src/myprojects/project/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (3) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /home/src/myprojects/project/index.ts ProjectRootPath: /home/src/myprojects/project +Info seq [hh:mm:ss:mss] Projects: /home/src/myprojects/project/tsconfig.json +Info seq [hh:mm:ss:mss] FileName: /home/src/myprojects/project/functions/whatever/alert.ts ProjectRootPath: /home/src/myprojects/project +Info seq [hh:mm:ss:mss] Projects: /home/src/myprojects/project/tsconfig.json +Info seq [hh:mm:ss:mss] After ensureProjectForOpenFiles: +Info seq [hh:mm:ss:mss] Project '/home/src/myprojects/project/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (3) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /home/src/myprojects/project/index.ts ProjectRootPath: /home/src/myprojects/project +Info seq [hh:mm:ss:mss] Projects: /home/src/myprojects/project/tsconfig.json +Info seq [hh:mm:ss:mss] FileName: /home/src/myprojects/project/functions/whatever/alert.ts ProjectRootPath: /home/src/myprojects/project +Info seq [hh:mm:ss:mss] Projects: /home/src/myprojects/project/tsconfig.json +Info seq [hh:mm:ss:mss] got projects updated in background /home/src/myprojects/project/index.ts,/home/src/myprojects/project/functions/whatever/alert.ts +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectsUpdatedInBackground", + "body": { + "openFiles": [ + "/home/src/myprojects/project/index.ts", + "/home/src/myprojects/project/functions/whatever/alert.ts" + ] + } + } +After running Timeout callback:: count: 0 + +PolledWatches:: +/a/lib/lib.es2016.full.d.ts: + {"event":{"id":4,"path":"/a/lib/lib.es2016.full.d.ts"}} +/home/src/myprojects/project/tsconfig.json: + {"event":{"id":1,"path":"/home/src/myprojects/project/tsconfig.json"}} + +FsWatchesRecursive:: +/home/src/myprojects/node_modules/@types: + {"event":{"id":6,"path":"/home/src/myprojects/node_modules/@types","recursive":true,"ignoreUpdate":true}} +/home/src/myprojects/project: + {"event":{"id":2,"path":"/home/src/myprojects/project","recursive":true,"ignoreUpdate":true}} +/home/src/myprojects/project/node_modules/@types: + {"event":{"id":5,"path":"/home/src/myprojects/project/node_modules/@types","recursive":true,"ignoreUpdate":true}} + +FsWatchesRecursive *deleted*:: +/home/src/myprojects/node_modules: + {"event":{"id":9,"path":"/home/src/myprojects/node_modules","recursive":true}} +/home/src/myprojects/project/components: + {"event":{"id":7,"path":"/home/src/myprojects/project/components","recursive":true,"ignoreUpdate":true}} +/home/src/myprojects/project/node_modules: + {"event":{"id":8,"path":"/home/src/myprojects/project/node_modules","recursive":true}} + +Projects:: +/home/src/myprojects/project/tsconfig.json (Configured) *changed* + projectStateVersion: 3 + projectProgramVersion: 3 *changed* + dirty: false *changed* + documentPositionMappers: 0 *changed* + /a/lib/lib.es2016.full.d.ts: identitySourceMapConsumer *deleted* + +Custom watchDirectory:: Triggered Ignored:: {"id":2,"path":"/home/src/myprojects/project","recursive":true,"ignoreUpdate":true}:: /home/src/myprojects/project/functions/whatever deleted +Custom watchDirectory:: Triggered Ignored:: {"id":2,"path":"/home/src/myprojects/project","recursive":true,"ignoreUpdate":true}:: /home/src/myprojects/project/components/whatever created +Custom watchDirectory:: Triggered Ignored:: {"id":2,"path":"/home/src/myprojects/project","recursive":true,"ignoreUpdate":true}:: /home/src/myprojects/project/components/whatever updated +Custom watchDirectory:: Triggered Ignored:: {"id":2,"path":"/home/src/myprojects/project","recursive":true,"ignoreUpdate":true}:: /home/src/myprojects/project/components updated +Before request +//// [/home/src/myprojects/project/components/whatever/alert.ts] +export function alert(message: string) { + console.log(`ALERT: ${message}`); +} + + +//// [/home/src/myprojects/project/functions/whatever/alert.ts] deleted + +Info seq [hh:mm:ss:mss] request: + { + "command": "updateOpen", + "arguments": { + "openFiles": [ + { + "file": "/home/src/myprojects/project/components/whatever/alert.ts", + "fileContent": "export function alert(message: string) {\n console.log(`ALERT: ${message}`);\n}\n", + "projectRootPath": "/home/src/myprojects/project" + } + ], + "closedFiles": [ + "/home/src/myprojects/project/functions/whatever/alert.ts" + ] + }, + "seq": 6, + "type": "request" + } +Info seq [hh:mm:ss:mss] Scheduled: /home/src/myprojects/project/tsconfig.json +Info seq [hh:mm:ss:mss] Scheduled: *ensureProjectForOpenFiles* +Info seq [hh:mm:ss:mss] Invoking /home/src/myprojects/project/tsconfig.json:: wildcard for open scriptInfo:: /home/src/myprojects/project/components/whatever/alert.ts +Info seq [hh:mm:ss:mss] Scheduled: /home/src/myprojects/project/tsconfig.json, Cancelled earlier one +Info seq [hh:mm:ss:mss] Scheduled: *ensureProjectForOpenFiles*, Cancelled earlier one +Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /home/src/myprojects/project/components/whatever/alert.ts ProjectRootPath: /home/src/myprojects/project:: Result: /home/src/myprojects/project/tsconfig.json +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /home/src/myprojects/project/tsconfig.json +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/myprojects/project/functions 1 undefined Project: /home/src/myprojects/project/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "createDirectoryWatcher", + "body": { + "id": 10, + "path": "/home/src/myprojects/project/functions", + "recursive": true, + "ignoreUpdate": true + } + } +Custom watchDirectory:: Added:: {"id":10,"path":"/home/src/myprojects/project/functions","recursive":true,"ignoreUpdate":true} +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/myprojects/project/functions 1 undefined Project: /home/src/myprojects/project/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/myprojects/project/node_modules 1 undefined Project: /home/src/myprojects/project/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "createDirectoryWatcher", + "body": { + "id": 11, + "path": "/home/src/myprojects/project/node_modules", + "recursive": true + } + } +Custom watchDirectory:: Added:: {"id":11,"path":"/home/src/myprojects/project/node_modules","recursive":true} +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/myprojects/project/node_modules 1 undefined Project: /home/src/myprojects/project/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/myprojects/node_modules 1 undefined Project: /home/src/myprojects/project/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "createDirectoryWatcher", + "body": { + "id": 12, + "path": "/home/src/myprojects/node_modules", + "recursive": true + } + } +Custom watchDirectory:: Added:: {"id":12,"path":"/home/src/myprojects/node_modules","recursive":true} +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/myprojects/node_modules 1 undefined Project: /home/src/myprojects/project/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /home/src/myprojects/project/tsconfig.json projectStateVersion: 4 projectProgramVersion: 3 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/home/src/myprojects/project/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (3) + /a/lib/lib.es2016.full.d.ts Text-1 "/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };" + /home/src/myprojects/project/index.ts SVC-1-1 "import { alert } from '@app/functions/whatever/alert';\nalert('Hello, world!');\n" + /home/src/myprojects/project/components/whatever/alert.ts SVC-2-0 "export function alert(message: string) {\n console.log(`ALERT: ${message}`);\n}\n" + + + ../../../../a/lib/lib.es2016.full.d.ts + Default library for target 'es2016' + index.ts + Matched by default include pattern '**/*' + components/whatever/alert.ts + Matched by default include pattern '**/*' + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/home/src/myprojects/project/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (3) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /home/src/myprojects/project/index.ts ProjectRootPath: /home/src/myprojects/project +Info seq [hh:mm:ss:mss] Projects: /home/src/myprojects/project/tsconfig.json +Info seq [hh:mm:ss:mss] FileName: /home/src/myprojects/project/components/whatever/alert.ts ProjectRootPath: /home/src/myprojects/project +Info seq [hh:mm:ss:mss] Projects: /home/src/myprojects/project/tsconfig.json +Info seq [hh:mm:ss:mss] response: + { + "response": true, + "responseRequired": true, + "performanceData": { + "updateGraphDurationMs": * + } + } +After request + +PolledWatches:: +/a/lib/lib.es2016.full.d.ts: + {"event":{"id":4,"path":"/a/lib/lib.es2016.full.d.ts"}} +/home/src/myprojects/project/tsconfig.json: + {"event":{"id":1,"path":"/home/src/myprojects/project/tsconfig.json"}} + +FsWatchesRecursive:: +/home/src/myprojects/node_modules: *new* + {"event":{"id":12,"path":"/home/src/myprojects/node_modules","recursive":true}} +/home/src/myprojects/node_modules/@types: + {"event":{"id":6,"path":"/home/src/myprojects/node_modules/@types","recursive":true,"ignoreUpdate":true}} +/home/src/myprojects/project: + {"event":{"id":2,"path":"/home/src/myprojects/project","recursive":true,"ignoreUpdate":true}} +/home/src/myprojects/project/functions: *new* + {"event":{"id":10,"path":"/home/src/myprojects/project/functions","recursive":true,"ignoreUpdate":true}} +/home/src/myprojects/project/node_modules: *new* + {"event":{"id":11,"path":"/home/src/myprojects/project/node_modules","recursive":true}} +/home/src/myprojects/project/node_modules/@types: + {"event":{"id":5,"path":"/home/src/myprojects/project/node_modules/@types","recursive":true,"ignoreUpdate":true}} + +Timeout callback:: count: 2 +11: /home/src/myprojects/project/tsconfig.json *new* +12: *ensureProjectForOpenFiles* *new* + +Projects:: +/home/src/myprojects/project/tsconfig.json (Configured) *changed* + projectStateVersion: 4 *changed* + projectProgramVersion: 4 *changed* + +ScriptInfos:: +/a/lib/lib.es2016.full.d.ts + version: Text-1 + sourceMapFilePath: false + containingProjects: 1 + /home/src/myprojects/project/tsconfig.json +/home/src/myprojects/project/components/whatever/alert.ts (Open) *new* + version: SVC-2-0 + containingProjects: 1 + /home/src/myprojects/project/tsconfig.json *default* +/home/src/myprojects/project/functions/whatever/alert.ts *deleted* + open: false *changed* + version: SVC-1-0 + containingProjects: 0 *changed* + /home/src/myprojects/project/tsconfig.json *deleted* +/home/src/myprojects/project/index.ts (Open) + version: SVC-1-1 + containingProjects: 1 + /home/src/myprojects/project/tsconfig.json *default* + +Before request + +Info seq [hh:mm:ss:mss] request: + { + "command": "getEditsForFileRename", + "arguments": { + "oldFilePath": "/home/src/myprojects/project/functions/whatever", + "newFilePath": "/home/src/myprojects/project/components/whatever" + }, + "seq": 7, + "type": "request" + } +Info seq [hh:mm:ss:mss] response: + { + "response": [ + { + "fileName": "/home/src/myprojects/project/index.ts", + "textChanges": [ + { + "start": { + "line": 1, + "offset": 24 + }, + "end": { + "line": 1, + "offset": 53 + }, + "newText": "@app/components/whatever/alert" + } + ] + } + ], + "responseRequired": true + } +After request + +Projects:: +/home/src/myprojects/project/tsconfig.json (Configured) *changed* + projectStateVersion: 4 + projectProgramVersion: 4 + documentPositionMappers: 1 *changed* + /a/lib/lib.es2016.full.d.ts: identitySourceMapConsumer *new* + +Before request + +Info seq [hh:mm:ss:mss] request: + { + "command": "watchChange", + "arguments": { + "id": 2, + "deleted": [ + "/home/src/myprojects/project/functions/whatever" + ], + "created": [ + "/home/src/myprojects/project/components/whatever" + ] + }, + "seq": 8, + "type": "request" + } +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Triggered with /home/src/myprojects/project/components/whatever :: WatchInfo: /home/src/myprojects/project 1 undefined Config: /home/src/myprojects/project/tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] Scheduled: /home/src/myprojects/project/tsconfig.json, Cancelled earlier one +Info seq [hh:mm:ss:mss] Scheduled: *ensureProjectForOpenFiles*, Cancelled earlier one +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Triggered with /home/src/myprojects/project/components/whatever :: WatchInfo: /home/src/myprojects/project 1 undefined Config: /home/src/myprojects/project/tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Triggered with /home/src/myprojects/project/functions/whatever :: WatchInfo: /home/src/myprojects/project 1 undefined Config: /home/src/myprojects/project/tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] Scheduled: /home/src/myprojects/project/tsconfig.json, Cancelled earlier one +Info seq [hh:mm:ss:mss] Scheduled: *ensureProjectForOpenFiles*, Cancelled earlier one +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Triggered with /home/src/myprojects/project/functions/whatever :: WatchInfo: /home/src/myprojects/project 1 undefined Config: /home/src/myprojects/project/tsconfig.json WatchType: Wild card directory +After request + +Timeout callback:: count: 2 +11: /home/src/myprojects/project/tsconfig.json *deleted* +12: *ensureProjectForOpenFiles* *deleted* +15: /home/src/myprojects/project/tsconfig.json *new* +16: *ensureProjectForOpenFiles* *new* + +Projects:: +/home/src/myprojects/project/tsconfig.json (Configured) *changed* + projectStateVersion: 5 *changed* + projectProgramVersion: 4 + dirty: true *changed* + +Before running Timeout callback:: count: 2 +15: /home/src/myprojects/project/tsconfig.json +16: *ensureProjectForOpenFiles* + +Info seq [hh:mm:ss:mss] Running: /home/src/myprojects/project/tsconfig.json +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /home/src/myprojects/project/tsconfig.json +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /home/src/myprojects/project/tsconfig.json projectStateVersion: 5 projectProgramVersion: 4 structureChanged: false structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Same program as before +Info seq [hh:mm:ss:mss] Running: *ensureProjectForOpenFiles* +Info seq [hh:mm:ss:mss] Before ensureProjectForOpenFiles: +Info seq [hh:mm:ss:mss] Project '/home/src/myprojects/project/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (3) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /home/src/myprojects/project/index.ts ProjectRootPath: /home/src/myprojects/project +Info seq [hh:mm:ss:mss] Projects: /home/src/myprojects/project/tsconfig.json +Info seq [hh:mm:ss:mss] FileName: /home/src/myprojects/project/components/whatever/alert.ts ProjectRootPath: /home/src/myprojects/project +Info seq [hh:mm:ss:mss] Projects: /home/src/myprojects/project/tsconfig.json +Info seq [hh:mm:ss:mss] After ensureProjectForOpenFiles: +Info seq [hh:mm:ss:mss] Project '/home/src/myprojects/project/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (3) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /home/src/myprojects/project/index.ts ProjectRootPath: /home/src/myprojects/project +Info seq [hh:mm:ss:mss] Projects: /home/src/myprojects/project/tsconfig.json +Info seq [hh:mm:ss:mss] FileName: /home/src/myprojects/project/components/whatever/alert.ts ProjectRootPath: /home/src/myprojects/project +Info seq [hh:mm:ss:mss] Projects: /home/src/myprojects/project/tsconfig.json +Info seq [hh:mm:ss:mss] got projects updated in background /home/src/myprojects/project/index.ts,/home/src/myprojects/project/components/whatever/alert.ts +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectsUpdatedInBackground", + "body": { + "openFiles": [ + "/home/src/myprojects/project/index.ts", + "/home/src/myprojects/project/components/whatever/alert.ts" + ] + } + } +After running Timeout callback:: count: 0 + +Projects:: +/home/src/myprojects/project/tsconfig.json (Configured) *changed* + projectStateVersion: 5 + projectProgramVersion: 4 + dirty: false *changed* diff --git a/tests/baselines/reference/tsserver/getEditsForFileRename/works-when-moving-file-to-and-from-folder.js b/tests/baselines/reference/tsserver/getEditsForFileRename/works-when-moving-file-to-and-from-folder.js new file mode 100644 index 0000000000000..2ea00eaedc382 --- /dev/null +++ b/tests/baselines/reference/tsserver/getEditsForFileRename/works-when-moving-file-to-and-from-folder.js @@ -0,0 +1,844 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +Before request +//// [/home/src/myprojects/project/tsconfig.json] +{ + "compilerOptions": { + "target": "es2016", + "module": "commonjs", + "paths": { + "@app/*": [ + "./*" + ] + }, + "esModuleInterop": true, + "forceConsistentCasingInFileNames": true, + "strict": true, + "skipLibCheck": true + } +} + +//// [/home/src/myprojects/project/index.ts] +import { alert } from '@app/components/whatever/alert'; +alert('Hello, world!'); + + +//// [/home/src/myprojects/project/components/whatever/alert.ts] +export function alert(message: string) { + console.log(`ALERT: ${message}`); +} + + +//// [/home/src/myprojects/project/functions/whatever/placeholder.txt] + + +//// [/a/lib/lib.es2016.full.d.ts] +/// +interface Boolean {} +interface Function {} +interface CallableFunction {} +interface NewableFunction {} +interface IArguments {} +interface Number { toExponential: any; } +interface Object {} +interface RegExp {} +interface String { charAt: any; } +interface Array { length: number; [n: number]: T; } +interface ReadonlyArray {} +declare const console: { log(msg: any): void; }; + + +Info seq [hh:mm:ss:mss] request: + { + "command": "open", + "arguments": { + "file": "/home/src/myprojects/project/index.ts", + "projectRootPath": "/home/src/myprojects/project" + }, + "seq": 1, + "type": "request" + } +Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /home/src/myprojects/project/index.ts ProjectRootPath: /home/src/myprojects/project:: Result: /home/src/myprojects/project/tsconfig.json +Info seq [hh:mm:ss:mss] Creating configuration project /home/src/myprojects/project/tsconfig.json +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/myprojects/project/tsconfig.json 2000 undefined Project: /home/src/myprojects/project/tsconfig.json WatchType: Config file +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingStart", + "body": { + "projectName": "/home/src/myprojects/project/tsconfig.json", + "reason": "Creating possible configured project for /home/src/myprojects/project/index.ts to open" + } + } +Info seq [hh:mm:ss:mss] Config: /home/src/myprojects/project/tsconfig.json : { + "rootNames": [ + "/home/src/myprojects/project/index.ts", + "/home/src/myprojects/project/components/whatever/alert.ts" + ], + "options": { + "target": 3, + "module": 1, + "paths": { + "@app/*": [ + "./*" + ] + }, + "esModuleInterop": true, + "forceConsistentCasingInFileNames": true, + "strict": true, + "skipLibCheck": true, + "pathsBasePath": "/home/src/myprojects/project", + "configFilePath": "/home/src/myprojects/project/tsconfig.json" + } +} +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/myprojects/project 1 undefined Config: /home/src/myprojects/project/tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/myprojects/project 1 undefined Config: /home/src/myprojects/project/tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/myprojects/project/components/whatever/alert.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /home/src/myprojects/project/tsconfig.json +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /a/lib/lib.es2016.full.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/myprojects/project/node_modules/@types 1 undefined Project: /home/src/myprojects/project/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/myprojects/project/node_modules/@types 1 undefined Project: /home/src/myprojects/project/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/myprojects/node_modules/@types 1 undefined Project: /home/src/myprojects/project/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/myprojects/node_modules/@types 1 undefined Project: /home/src/myprojects/project/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /home/src/myprojects/project/tsconfig.json projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/home/src/myprojects/project/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (3) + /a/lib/lib.es2016.full.d.ts Text-1 "/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };" + /home/src/myprojects/project/components/whatever/alert.ts Text-1 "export function alert(message: string) {\n console.log(`ALERT: ${message}`);\n}\n" + /home/src/myprojects/project/index.ts SVC-1-0 "import { alert } from '@app/components/whatever/alert';\nalert('Hello, world!');\n" + + + ../../../../a/lib/lib.es2016.full.d.ts + Default library for target 'es2016' + components/whatever/alert.ts + Imported via '@app/components/whatever/alert' from file 'index.ts' + Matched by default include pattern '**/*' + index.ts + Matched by default include pattern '**/*' + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingFinish", + "body": { + "projectName": "/home/src/myprojects/project/tsconfig.json" + } + } +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "telemetry", + "body": { + "telemetryEventName": "projectInfo", + "payload": { + "projectId": "8eef2d0b8a0e9b1fea9cc093cf6e65a3858613760d59db089978dadbab81a1fb", + "fileStats": { + "js": 0, + "jsSize": 0, + "jsx": 0, + "jsxSize": 0, + "ts": 2, + "tsSize": 161, + "tsx": 0, + "tsxSize": 0, + "dts": 1, + "dtsSize": 413, + "deferred": 0, + "deferredSize": 0 + }, + "compilerOptions": { + "target": "es2016", + "module": "commonjs", + "paths": "", + "esModuleInterop": true, + "forceConsistentCasingInFileNames": true, + "strict": true, + "skipLibCheck": true + }, + "typeAcquisition": { + "enable": false, + "include": false, + "exclude": false + }, + "extends": false, + "files": false, + "include": false, + "exclude": false, + "compileOnSave": false, + "configFileName": "tsconfig.json", + "projectType": "configured", + "languageServiceEnabled": true, + "version": "FakeVersion" + } + } + } +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "configFileDiag", + "body": { + "triggerFile": "/home/src/myprojects/project/index.ts", + "configFile": "/home/src/myprojects/project/tsconfig.json", + "diagnostics": [] + } + } +Info seq [hh:mm:ss:mss] Project '/home/src/myprojects/project/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (3) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /home/src/myprojects/project/index.ts ProjectRootPath: /home/src/myprojects/project +Info seq [hh:mm:ss:mss] Projects: /home/src/myprojects/project/tsconfig.json +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "open", + "request_seq": 1, + "success": true, + "performanceData": { + "updateGraphDurationMs": * + } + } +After request + +PolledWatches:: +/home/src/myprojects/node_modules/@types: *new* + {"pollingInterval":500} +/home/src/myprojects/project/node_modules/@types: *new* + {"pollingInterval":500} + +FsWatches:: +/a/lib/lib.es2016.full.d.ts: *new* + {} +/home/src/myprojects/project/components/whatever/alert.ts: *new* + {} +/home/src/myprojects/project/tsconfig.json: *new* + {} + +FsWatchesRecursive:: +/home/src/myprojects/project: *new* + {} + +Projects:: +/home/src/myprojects/project/tsconfig.json (Configured) *new* + projectStateVersion: 1 + projectProgramVersion: 1 + +ScriptInfos:: +/a/lib/lib.es2016.full.d.ts *new* + version: Text-1 + containingProjects: 1 + /home/src/myprojects/project/tsconfig.json +/home/src/myprojects/project/components/whatever/alert.ts *new* + version: Text-1 + containingProjects: 1 + /home/src/myprojects/project/tsconfig.json +/home/src/myprojects/project/index.ts (Open) *new* + version: SVC-1-0 + containingProjects: 1 + /home/src/myprojects/project/tsconfig.json *default* + +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Triggered with /home/src/myprojects/project/components/whatever :: WatchInfo: /home/src/myprojects/project 1 undefined Config: /home/src/myprojects/project/tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] Invoking sourceFileChange on /home/src/myprojects/project/components/whatever/alert.ts:: 2 +Info seq [hh:mm:ss:mss] Scheduled: /home/src/myprojects/project/tsconfig.json +Info seq [hh:mm:ss:mss] Scheduled: *ensureProjectForOpenFiles* +Info seq [hh:mm:ss:mss] Scheduled: /home/src/myprojects/project/tsconfig.json, Cancelled earlier one +Info seq [hh:mm:ss:mss] Scheduled: *ensureProjectForOpenFiles*, Cancelled earlier one +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Triggered with /home/src/myprojects/project/components/whatever :: WatchInfo: /home/src/myprojects/project 1 undefined Config: /home/src/myprojects/project/tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Triggered with /home/src/myprojects/project/functions/whatever :: WatchInfo: /home/src/myprojects/project 1 undefined Config: /home/src/myprojects/project/tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] Scheduled: /home/src/myprojects/project/tsconfig.json, Cancelled earlier one +Info seq [hh:mm:ss:mss] Scheduled: *ensureProjectForOpenFiles*, Cancelled earlier one +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Triggered with /home/src/myprojects/project/functions/whatever :: WatchInfo: /home/src/myprojects/project 1 undefined Config: /home/src/myprojects/project/tsconfig.json WatchType: Wild card directory +Before request +//// [/home/src/myprojects/project/functions/whatever/alert.ts] +export function alert(message: string) { + console.log(`ALERT: ${message}`); +} + + +//// [/home/src/myprojects/project/components/whatever/alert.ts] deleted + +Timeout callback:: count: 2 +5: /home/src/myprojects/project/tsconfig.json *new* +6: *ensureProjectForOpenFiles* *new* + +Projects:: +/home/src/myprojects/project/tsconfig.json (Configured) *changed* + projectStateVersion: 2 *changed* + projectProgramVersion: 1 + dirty: true *changed* + +ScriptInfos:: +/a/lib/lib.es2016.full.d.ts + version: Text-1 + containingProjects: 1 + /home/src/myprojects/project/tsconfig.json +/home/src/myprojects/project/components/whatever/alert.ts *changed* + version: Text-1 + pendingReloadFromDisk: true *changed* + deferredDelete: true *changed* + containingProjects: 0 *changed* + /home/src/myprojects/project/tsconfig.json *deleted* +/home/src/myprojects/project/index.ts (Open) + version: SVC-1-0 + containingProjects: 1 + /home/src/myprojects/project/tsconfig.json *default* + +Info seq [hh:mm:ss:mss] request: + { + "command": "open", + "arguments": { + "file": "/home/src/myprojects/project/functions/whatever/alert.ts", + "projectRootPath": "/home/src/myprojects/project", + "fileContent": "export function alert(message: string) {\n console.log(`ALERT: ${message}`);\n}\n" + }, + "seq": 2, + "type": "request" + } +Info seq [hh:mm:ss:mss] Invoking /home/src/myprojects/project/tsconfig.json:: wildcard for open scriptInfo:: /home/src/myprojects/project/functions/whatever/alert.ts +Info seq [hh:mm:ss:mss] Scheduled: /home/src/myprojects/project/tsconfig.json, Cancelled earlier one +Info seq [hh:mm:ss:mss] Scheduled: *ensureProjectForOpenFiles*, Cancelled earlier one +Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /home/src/myprojects/project/functions/whatever/alert.ts ProjectRootPath: /home/src/myprojects/project:: Result: /home/src/myprojects/project/tsconfig.json +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /home/src/myprojects/project/tsconfig.json +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/myprojects/project/components 1 undefined Project: /home/src/myprojects/project/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/myprojects/project/components 1 undefined Project: /home/src/myprojects/project/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/myprojects/project/node_modules 1 undefined Project: /home/src/myprojects/project/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/myprojects/project/node_modules 1 undefined Project: /home/src/myprojects/project/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/myprojects/node_modules 1 undefined Project: /home/src/myprojects/project/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/myprojects/node_modules 1 undefined Project: /home/src/myprojects/project/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /home/src/myprojects/project/tsconfig.json projectStateVersion: 2 projectProgramVersion: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/home/src/myprojects/project/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (3) + /a/lib/lib.es2016.full.d.ts Text-1 "/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };" + /home/src/myprojects/project/index.ts SVC-1-0 "import { alert } from '@app/components/whatever/alert';\nalert('Hello, world!');\n" + /home/src/myprojects/project/functions/whatever/alert.ts SVC-1-0 "export function alert(message: string) {\n console.log(`ALERT: ${message}`);\n}\n" + + + ../../../../a/lib/lib.es2016.full.d.ts + Default library for target 'es2016' + index.ts + Matched by default include pattern '**/*' + functions/whatever/alert.ts + Matched by default include pattern '**/*' + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /home/src/myprojects/project/components/whatever/alert.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Project '/home/src/myprojects/project/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (3) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /home/src/myprojects/project/index.ts ProjectRootPath: /home/src/myprojects/project +Info seq [hh:mm:ss:mss] Projects: /home/src/myprojects/project/tsconfig.json +Info seq [hh:mm:ss:mss] FileName: /home/src/myprojects/project/functions/whatever/alert.ts ProjectRootPath: /home/src/myprojects/project +Info seq [hh:mm:ss:mss] Projects: /home/src/myprojects/project/tsconfig.json +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "open", + "request_seq": 2, + "success": true, + "performanceData": { + "updateGraphDurationMs": * + } + } +After request + +PolledWatches:: +/home/src/myprojects/node_modules: *new* + {"pollingInterval":500} +/home/src/myprojects/node_modules/@types: + {"pollingInterval":500} +/home/src/myprojects/project/node_modules: *new* + {"pollingInterval":500} +/home/src/myprojects/project/node_modules/@types: + {"pollingInterval":500} + +FsWatches:: +/a/lib/lib.es2016.full.d.ts: + {} +/home/src/myprojects/project/tsconfig.json: + {} + +FsWatches *deleted*:: +/home/src/myprojects/project/components/whatever/alert.ts: + {} + +FsWatchesRecursive:: +/home/src/myprojects/project: + {} +/home/src/myprojects/project/components: *new* + {} + +Timeout callback:: count: 2 +5: /home/src/myprojects/project/tsconfig.json *deleted* +6: *ensureProjectForOpenFiles* *deleted* +7: /home/src/myprojects/project/tsconfig.json *new* +8: *ensureProjectForOpenFiles* *new* + +Projects:: +/home/src/myprojects/project/tsconfig.json (Configured) *changed* + projectStateVersion: 2 + projectProgramVersion: 2 *changed* + dirty: false *changed* + +ScriptInfos:: +/a/lib/lib.es2016.full.d.ts + version: Text-1 + containingProjects: 1 + /home/src/myprojects/project/tsconfig.json +/home/src/myprojects/project/components/whatever/alert.ts *deleted* + version: Text-1 + pendingReloadFromDisk: true + deferredDelete: true + containingProjects: 0 +/home/src/myprojects/project/functions/whatever/alert.ts (Open) *new* + version: SVC-1-0 + containingProjects: 1 + /home/src/myprojects/project/tsconfig.json *default* +/home/src/myprojects/project/index.ts (Open) + version: SVC-1-0 + containingProjects: 1 + /home/src/myprojects/project/tsconfig.json *default* + +Before request + +Info seq [hh:mm:ss:mss] request: + { + "command": "getEditsForFileRename", + "arguments": { + "oldFilePath": "/home/src/myprojects/project/components/whatever", + "newFilePath": "/home/src/myprojects/project/functions/whatever" + }, + "seq": 3, + "type": "request" + } +Info seq [hh:mm:ss:mss] response: + { + "response": [ + { + "fileName": "/home/src/myprojects/project/index.ts", + "textChanges": [ + { + "start": { + "line": 1, + "offset": 24 + }, + "end": { + "line": 1, + "offset": 54 + }, + "newText": "@app/functions/whatever/alert" + } + ] + } + ], + "responseRequired": true + } +After request + +Projects:: +/home/src/myprojects/project/tsconfig.json (Configured) *changed* + projectStateVersion: 2 + projectProgramVersion: 2 + documentPositionMappers: 1 *changed* + /a/lib/lib.es2016.full.d.ts: identitySourceMapConsumer *new* + +ScriptInfos:: +/a/lib/lib.es2016.full.d.ts *changed* + version: Text-1 + sourceMapFilePath: false *changed* + containingProjects: 1 + /home/src/myprojects/project/tsconfig.json +/home/src/myprojects/project/functions/whatever/alert.ts (Open) + version: SVC-1-0 + containingProjects: 1 + /home/src/myprojects/project/tsconfig.json *default* +/home/src/myprojects/project/index.ts (Open) + version: SVC-1-0 + containingProjects: 1 + /home/src/myprojects/project/tsconfig.json *default* + +Before request + +Info seq [hh:mm:ss:mss] request: + { + "command": "updateOpen", + "arguments": { + "changedFiles": [ + { + "fileName": "/home/src/myprojects/project/index.ts", + "textChanges": [ + { + "start": { + "line": 1, + "offset": 24 + }, + "end": { + "line": 1, + "offset": 54 + }, + "newText": "@app/functions/whatever/alert" + } + ] + } + ] + }, + "seq": 4, + "type": "request" + } +Info seq [hh:mm:ss:mss] response: + { + "response": true, + "responseRequired": true + } +After request + +Projects:: +/home/src/myprojects/project/tsconfig.json (Configured) *changed* + projectStateVersion: 3 *changed* + projectProgramVersion: 2 + dirty: true *changed* + +ScriptInfos:: +/a/lib/lib.es2016.full.d.ts + version: Text-1 + sourceMapFilePath: false + containingProjects: 1 + /home/src/myprojects/project/tsconfig.json +/home/src/myprojects/project/functions/whatever/alert.ts (Open) + version: SVC-1-0 + containingProjects: 1 + /home/src/myprojects/project/tsconfig.json *default* +/home/src/myprojects/project/index.ts (Open) *changed* + version: SVC-1-1 *changed* + containingProjects: 1 + /home/src/myprojects/project/tsconfig.json *default* + +Before running Timeout callback:: count: 2 +7: /home/src/myprojects/project/tsconfig.json +8: *ensureProjectForOpenFiles* + +Info seq [hh:mm:ss:mss] Running: /home/src/myprojects/project/tsconfig.json +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /home/src/myprojects/project/tsconfig.json +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /home/src/myprojects/project/components 1 undefined Project: /home/src/myprojects/project/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/myprojects/project/components 1 undefined Project: /home/src/myprojects/project/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /home/src/myprojects/project/node_modules 1 undefined Project: /home/src/myprojects/project/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/myprojects/project/node_modules 1 undefined Project: /home/src/myprojects/project/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /home/src/myprojects/node_modules 1 undefined Project: /home/src/myprojects/project/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/myprojects/node_modules 1 undefined Project: /home/src/myprojects/project/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /home/src/myprojects/project/tsconfig.json projectStateVersion: 3 projectProgramVersion: 2 structureChanged: true structureIsReused:: SafeModules Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/home/src/myprojects/project/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (3) + /a/lib/lib.es2016.full.d.ts Text-1 "/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };" + /home/src/myprojects/project/functions/whatever/alert.ts SVC-1-0 "export function alert(message: string) {\n console.log(`ALERT: ${message}`);\n}\n" + /home/src/myprojects/project/index.ts SVC-1-1 "import { alert } from '@app/functions/whatever/alert';\nalert('Hello, world!');\n" + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Running: *ensureProjectForOpenFiles* +Info seq [hh:mm:ss:mss] Before ensureProjectForOpenFiles: +Info seq [hh:mm:ss:mss] Project '/home/src/myprojects/project/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (3) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /home/src/myprojects/project/index.ts ProjectRootPath: /home/src/myprojects/project +Info seq [hh:mm:ss:mss] Projects: /home/src/myprojects/project/tsconfig.json +Info seq [hh:mm:ss:mss] FileName: /home/src/myprojects/project/functions/whatever/alert.ts ProjectRootPath: /home/src/myprojects/project +Info seq [hh:mm:ss:mss] Projects: /home/src/myprojects/project/tsconfig.json +Info seq [hh:mm:ss:mss] After ensureProjectForOpenFiles: +Info seq [hh:mm:ss:mss] Project '/home/src/myprojects/project/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (3) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /home/src/myprojects/project/index.ts ProjectRootPath: /home/src/myprojects/project +Info seq [hh:mm:ss:mss] Projects: /home/src/myprojects/project/tsconfig.json +Info seq [hh:mm:ss:mss] FileName: /home/src/myprojects/project/functions/whatever/alert.ts ProjectRootPath: /home/src/myprojects/project +Info seq [hh:mm:ss:mss] Projects: /home/src/myprojects/project/tsconfig.json +Info seq [hh:mm:ss:mss] got projects updated in background /home/src/myprojects/project/index.ts,/home/src/myprojects/project/functions/whatever/alert.ts +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectsUpdatedInBackground", + "body": { + "openFiles": [ + "/home/src/myprojects/project/index.ts", + "/home/src/myprojects/project/functions/whatever/alert.ts" + ] + } + } +After running Timeout callback:: count: 0 + +PolledWatches:: +/home/src/myprojects/node_modules/@types: + {"pollingInterval":500} +/home/src/myprojects/project/node_modules/@types: + {"pollingInterval":500} + +PolledWatches *deleted*:: +/home/src/myprojects/node_modules: + {"pollingInterval":500} +/home/src/myprojects/project/node_modules: + {"pollingInterval":500} + +FsWatches:: +/a/lib/lib.es2016.full.d.ts: + {} +/home/src/myprojects/project/tsconfig.json: + {} + +FsWatchesRecursive:: +/home/src/myprojects/project: + {} + +FsWatchesRecursive *deleted*:: +/home/src/myprojects/project/components: + {} + +Projects:: +/home/src/myprojects/project/tsconfig.json (Configured) *changed* + projectStateVersion: 3 + projectProgramVersion: 3 *changed* + dirty: false *changed* + documentPositionMappers: 0 *changed* + /a/lib/lib.es2016.full.d.ts: identitySourceMapConsumer *deleted* + +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Triggered with /home/src/myprojects/project/functions/whatever :: WatchInfo: /home/src/myprojects/project 1 undefined Config: /home/src/myprojects/project/tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] Scheduled: /home/src/myprojects/project/tsconfig.json +Info seq [hh:mm:ss:mss] Scheduled: *ensureProjectForOpenFiles* +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Triggered with /home/src/myprojects/project/functions/whatever :: WatchInfo: /home/src/myprojects/project 1 undefined Config: /home/src/myprojects/project/tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Triggered with /home/src/myprojects/project/components/whatever :: WatchInfo: /home/src/myprojects/project 1 undefined Config: /home/src/myprojects/project/tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] Scheduled: /home/src/myprojects/project/tsconfig.json, Cancelled earlier one +Info seq [hh:mm:ss:mss] Scheduled: *ensureProjectForOpenFiles*, Cancelled earlier one +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Triggered with /home/src/myprojects/project/components/whatever :: WatchInfo: /home/src/myprojects/project 1 undefined Config: /home/src/myprojects/project/tsconfig.json WatchType: Wild card directory +Before request +//// [/home/src/myprojects/project/components/whatever/alert.ts] +export function alert(message: string) { + console.log(`ALERT: ${message}`); +} + + +//// [/home/src/myprojects/project/functions/whatever/alert.ts] deleted + +Timeout callback:: count: 2 +11: /home/src/myprojects/project/tsconfig.json *new* +12: *ensureProjectForOpenFiles* *new* + +Projects:: +/home/src/myprojects/project/tsconfig.json (Configured) *changed* + projectStateVersion: 4 *changed* + projectProgramVersion: 3 + dirty: true *changed* + +Info seq [hh:mm:ss:mss] request: + { + "command": "updateOpen", + "arguments": { + "openFiles": [ + { + "file": "/home/src/myprojects/project/components/whatever/alert.ts", + "fileContent": "export function alert(message: string) {\n console.log(`ALERT: ${message}`);\n}\n", + "projectRootPath": "/home/src/myprojects/project" + } + ], + "closedFiles": [ + "/home/src/myprojects/project/functions/whatever/alert.ts" + ] + }, + "seq": 5, + "type": "request" + } +Info seq [hh:mm:ss:mss] Scheduled: /home/src/myprojects/project/tsconfig.json, Cancelled earlier one +Info seq [hh:mm:ss:mss] Scheduled: *ensureProjectForOpenFiles*, Cancelled earlier one +Info seq [hh:mm:ss:mss] Invoking /home/src/myprojects/project/tsconfig.json:: wildcard for open scriptInfo:: /home/src/myprojects/project/components/whatever/alert.ts +Info seq [hh:mm:ss:mss] Scheduled: /home/src/myprojects/project/tsconfig.json, Cancelled earlier one +Info seq [hh:mm:ss:mss] Scheduled: *ensureProjectForOpenFiles*, Cancelled earlier one +Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /home/src/myprojects/project/components/whatever/alert.ts ProjectRootPath: /home/src/myprojects/project:: Result: /home/src/myprojects/project/tsconfig.json +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /home/src/myprojects/project/tsconfig.json +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/myprojects/project/functions 1 undefined Project: /home/src/myprojects/project/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/myprojects/project/functions 1 undefined Project: /home/src/myprojects/project/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/myprojects/project/node_modules 1 undefined Project: /home/src/myprojects/project/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/myprojects/project/node_modules 1 undefined Project: /home/src/myprojects/project/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/myprojects/node_modules 1 undefined Project: /home/src/myprojects/project/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/myprojects/node_modules 1 undefined Project: /home/src/myprojects/project/tsconfig.json WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /home/src/myprojects/project/tsconfig.json projectStateVersion: 4 projectProgramVersion: 3 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/home/src/myprojects/project/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (3) + /a/lib/lib.es2016.full.d.ts Text-1 "/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };" + /home/src/myprojects/project/index.ts SVC-1-1 "import { alert } from '@app/functions/whatever/alert';\nalert('Hello, world!');\n" + /home/src/myprojects/project/components/whatever/alert.ts SVC-2-0 "export function alert(message: string) {\n console.log(`ALERT: ${message}`);\n}\n" + + + ../../../../a/lib/lib.es2016.full.d.ts + Default library for target 'es2016' + index.ts + Matched by default include pattern '**/*' + components/whatever/alert.ts + Matched by default include pattern '**/*' + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/home/src/myprojects/project/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (3) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /home/src/myprojects/project/index.ts ProjectRootPath: /home/src/myprojects/project +Info seq [hh:mm:ss:mss] Projects: /home/src/myprojects/project/tsconfig.json +Info seq [hh:mm:ss:mss] FileName: /home/src/myprojects/project/components/whatever/alert.ts ProjectRootPath: /home/src/myprojects/project +Info seq [hh:mm:ss:mss] Projects: /home/src/myprojects/project/tsconfig.json +Info seq [hh:mm:ss:mss] response: + { + "response": true, + "responseRequired": true, + "performanceData": { + "updateGraphDurationMs": * + } + } +After request + +PolledWatches:: +/home/src/myprojects/node_modules: *new* + {"pollingInterval":500} +/home/src/myprojects/node_modules/@types: + {"pollingInterval":500} +/home/src/myprojects/project/node_modules: *new* + {"pollingInterval":500} +/home/src/myprojects/project/node_modules/@types: + {"pollingInterval":500} + +FsWatches:: +/a/lib/lib.es2016.full.d.ts: + {} +/home/src/myprojects/project/tsconfig.json: + {} + +FsWatchesRecursive:: +/home/src/myprojects/project: + {} +/home/src/myprojects/project/functions: *new* + {} + +Timeout callback:: count: 2 +11: /home/src/myprojects/project/tsconfig.json *deleted* +12: *ensureProjectForOpenFiles* *deleted* +15: /home/src/myprojects/project/tsconfig.json *new* +16: *ensureProjectForOpenFiles* *new* + +Projects:: +/home/src/myprojects/project/tsconfig.json (Configured) *changed* + projectStateVersion: 4 + projectProgramVersion: 4 *changed* + dirty: false *changed* + +ScriptInfos:: +/a/lib/lib.es2016.full.d.ts + version: Text-1 + sourceMapFilePath: false + containingProjects: 1 + /home/src/myprojects/project/tsconfig.json +/home/src/myprojects/project/components/whatever/alert.ts (Open) *new* + version: SVC-2-0 + containingProjects: 1 + /home/src/myprojects/project/tsconfig.json *default* +/home/src/myprojects/project/functions/whatever/alert.ts *deleted* + open: false *changed* + version: SVC-1-0 + containingProjects: 0 *changed* + /home/src/myprojects/project/tsconfig.json *deleted* +/home/src/myprojects/project/index.ts (Open) + version: SVC-1-1 + containingProjects: 1 + /home/src/myprojects/project/tsconfig.json *default* + +Before request + +Info seq [hh:mm:ss:mss] request: + { + "command": "getEditsForFileRename", + "arguments": { + "oldFilePath": "/home/src/myprojects/project/functions/whatever", + "newFilePath": "/home/src/myprojects/project/components/whatever" + }, + "seq": 6, + "type": "request" + } +Info seq [hh:mm:ss:mss] response: + { + "response": [ + { + "fileName": "/home/src/myprojects/project/index.ts", + "textChanges": [ + { + "start": { + "line": 1, + "offset": 24 + }, + "end": { + "line": 1, + "offset": 53 + }, + "newText": "@app/components/whatever/alert" + } + ] + } + ], + "responseRequired": true + } +After request + +Projects:: +/home/src/myprojects/project/tsconfig.json (Configured) *changed* + projectStateVersion: 4 + projectProgramVersion: 4 + documentPositionMappers: 1 *changed* + /a/lib/lib.es2016.full.d.ts: identitySourceMapConsumer *new* + +Before running Timeout callback:: count: 2 +15: /home/src/myprojects/project/tsconfig.json +16: *ensureProjectForOpenFiles* + +Info seq [hh:mm:ss:mss] Running: /home/src/myprojects/project/tsconfig.json +Info seq [hh:mm:ss:mss] Running: *ensureProjectForOpenFiles* +Info seq [hh:mm:ss:mss] Before ensureProjectForOpenFiles: +Info seq [hh:mm:ss:mss] Project '/home/src/myprojects/project/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (3) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /home/src/myprojects/project/index.ts ProjectRootPath: /home/src/myprojects/project +Info seq [hh:mm:ss:mss] Projects: /home/src/myprojects/project/tsconfig.json +Info seq [hh:mm:ss:mss] FileName: /home/src/myprojects/project/components/whatever/alert.ts ProjectRootPath: /home/src/myprojects/project +Info seq [hh:mm:ss:mss] Projects: /home/src/myprojects/project/tsconfig.json +Info seq [hh:mm:ss:mss] After ensureProjectForOpenFiles: +Info seq [hh:mm:ss:mss] Project '/home/src/myprojects/project/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (3) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /home/src/myprojects/project/index.ts ProjectRootPath: /home/src/myprojects/project +Info seq [hh:mm:ss:mss] Projects: /home/src/myprojects/project/tsconfig.json +Info seq [hh:mm:ss:mss] FileName: /home/src/myprojects/project/components/whatever/alert.ts ProjectRootPath: /home/src/myprojects/project +Info seq [hh:mm:ss:mss] Projects: /home/src/myprojects/project/tsconfig.json +Info seq [hh:mm:ss:mss] got projects updated in background /home/src/myprojects/project/index.ts,/home/src/myprojects/project/components/whatever/alert.ts +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectsUpdatedInBackground", + "body": { + "openFiles": [ + "/home/src/myprojects/project/index.ts", + "/home/src/myprojects/project/components/whatever/alert.ts" + ] + } + } +After running Timeout callback:: count: 0 diff --git a/tests/baselines/reference/tsserver/projectErrors/folder-rename-updates-project-structure-and-reports-no-errors.js b/tests/baselines/reference/tsserver/projectErrors/folder-rename-updates-project-structure-and-reports-no-errors.js index 54571ebe3d431..7f7f7a0c3fe9d 100644 --- a/tests/baselines/reference/tsserver/projectErrors/folder-rename-updates-project-structure-and-reports-no-errors.js +++ b/tests/baselines/reference/tsserver/projectErrors/folder-rename-updates-project-structure-and-reports-no-errors.js @@ -338,17 +338,9 @@ Info seq [hh:mm:ss:mss] event: } After running Immedidate callback:: count: 0 -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Triggered with /a/b/projects/myproject/foo :: WatchInfo: /a/b/projects/myproject 1 undefined Config: /a/b/projects/myproject/tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] FileWatcher:: Triggered with /a/b/projects/myproject/foo/foo.ts 2:: WatchInfo: /a/b/projects/myproject/foo/foo.ts 500 undefined WatchType: Closed Script info Info seq [hh:mm:ss:mss] Scheduled: /a/b/projects/myproject/tsconfig.json Info seq [hh:mm:ss:mss] Scheduled: *ensureProjectForOpenFiles* -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Triggered with /a/b/projects/myproject/foo :: WatchInfo: /a/b/projects/myproject 1 undefined Config: /a/b/projects/myproject/tsconfig.json WatchType: Wild card directory -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Triggered with /a/b/projects/myproject/foo2 :: WatchInfo: /a/b/projects/myproject 1 undefined Config: /a/b/projects/myproject/tsconfig.json WatchType: Wild card directory -Info seq [hh:mm:ss:mss] Scheduled: /a/b/projects/myproject/tsconfig.json, Cancelled earlier one -Info seq [hh:mm:ss:mss] Scheduled: *ensureProjectForOpenFiles*, Cancelled earlier one -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Triggered with /a/b/projects/myproject/foo2 :: WatchInfo: /a/b/projects/myproject 1 undefined Config: /a/b/projects/myproject/tsconfig.json WatchType: Wild card directory -Info seq [hh:mm:ss:mss] FileWatcher:: Triggered with /a/b/projects/myproject/foo/foo.ts 2:: WatchInfo: /a/b/projects/myproject/foo/foo.ts 500 undefined WatchType: Closed Script info -Info seq [hh:mm:ss:mss] Scheduled: /a/b/projects/myproject/tsconfig.json, Cancelled earlier one -Info seq [hh:mm:ss:mss] Scheduled: *ensureProjectForOpenFiles*, Cancelled earlier one Info seq [hh:mm:ss:mss] Elapsed:: *ms FileWatcher:: Triggered with /a/b/projects/myproject/foo/foo.ts 2:: WatchInfo: /a/b/projects/myproject/foo/foo.ts 500 undefined WatchType: Closed Script info Info seq [hh:mm:ss:mss] DirectoryWatcher:: Triggered with /a/b/projects/myproject/foo/foo.ts :: WatchInfo: /a/b/projects/myproject 1 undefined Config: /a/b/projects/myproject/tsconfig.json WatchType: Wild card directory Info seq [hh:mm:ss:mss] Scheduled: /a/b/projects/myproject/tsconfig.json, Cancelled earlier one @@ -358,6 +350,14 @@ Info seq [hh:mm:ss:mss] DirectoryWatcher:: Triggered with /a/b/projects/myproje Info seq [hh:mm:ss:mss] Scheduled: /a/b/projects/myproject/tsconfig.json, Cancelled earlier one Info seq [hh:mm:ss:mss] Scheduled: *ensureProjectForOpenFiles*, Cancelled earlier one Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Triggered with /a/b/projects/myproject/foo2/foo.ts :: WatchInfo: /a/b/projects/myproject 1 undefined Config: /a/b/projects/myproject/tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Triggered with /a/b/projects/myproject/foo :: WatchInfo: /a/b/projects/myproject 1 undefined Config: /a/b/projects/myproject/tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] Scheduled: /a/b/projects/myproject/tsconfig.json, Cancelled earlier one +Info seq [hh:mm:ss:mss] Scheduled: *ensureProjectForOpenFiles*, Cancelled earlier one +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Triggered with /a/b/projects/myproject/foo :: WatchInfo: /a/b/projects/myproject 1 undefined Config: /a/b/projects/myproject/tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Triggered with /a/b/projects/myproject/foo2 :: WatchInfo: /a/b/projects/myproject 1 undefined Config: /a/b/projects/myproject/tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] Scheduled: /a/b/projects/myproject/tsconfig.json, Cancelled earlier one +Info seq [hh:mm:ss:mss] Scheduled: *ensureProjectForOpenFiles*, Cancelled earlier one +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Triggered with /a/b/projects/myproject/foo2 :: WatchInfo: /a/b/projects/myproject 1 undefined Config: /a/b/projects/myproject/tsconfig.json WatchType: Wild card directory Before running Timeout callback:: count: 2 10: /a/b/projects/myproject/tsconfig.json 11: *ensureProjectForOpenFiles* diff --git a/tests/baselines/reference/tsserver/projects/handles-delayed-directory-watch-invoke-on-file-creation.js b/tests/baselines/reference/tsserver/projects/handles-delayed-directory-watch-invoke-on-file-creation.js index ad74a6b9f1dcd..66a2bb1f39afa 100644 --- a/tests/baselines/reference/tsserver/projects/handles-delayed-directory-watch-invoke-on-file-creation.js +++ b/tests/baselines/reference/tsserver/projects/handles-delayed-directory-watch-invoke-on-file-creation.js @@ -469,6 +469,10 @@ Info seq [hh:mm:ss:mss] event: After running Timeout callback:: count: 0 Before request +//// [/users/username/projects/project/sub/a.ts] +export const a = 10; + +//// [/users/username/projects/project/a.ts] deleted Info seq [hh:mm:ss:mss] request: { @@ -542,65 +546,29 @@ Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /users/username/projec Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /users/username/projects/project/tsconfig.json Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /users/username/projects/project/tsconfig.json projectStateVersion: 3 projectProgramVersion: 2 structureChanged: true structureIsReused:: Not Elapsed:: *ms Info seq [hh:mm:ss:mss] Project '/users/username/projects/project/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (2) +Info seq [hh:mm:ss:mss] Files (3) /a/lib/lib.d.ts Text-1 "/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }" /users/username/projects/project/b.ts SVC-1-0 "export const b = 10;" + /users/username/projects/project/sub/a.ts SVC-2-0 "export const a = 10;" ../../../../a/lib/lib.d.ts Default library for target 'es5' b.ts Matched by default include pattern '**/*' - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /users/username/projects/project/tsconfig.json ProjectRootPath: /users/username/projects/project:: Result: undefined -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "configFileDiag", - "body": { - "triggerFile": "/users/username/projects/project/sub/a.ts", - "configFile": "/users/username/projects/project/tsconfig.json", - "diagnostics": [] - } - } -Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /users/username/projects/project/sub/tsconfig.json 2000 undefined WatchType: Config file for the inferred project root -Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /users/username/projects/project/sub/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root -Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /users/username/projects/project/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root -Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /users/username/projects/project/sub/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /users/username/projects/project/sub/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /users/username/projects/project/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /users/username/projects/project/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /users/username/projects/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /users/username/projects/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots -Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms -Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) -Info seq [hh:mm:ss:mss] Files (2) - /a/lib/lib.d.ts Text-1 "/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }" - /users/username/projects/project/sub/a.ts SVC-2-0 "" - - - ../../../../../a/lib/lib.d.ts - Default library for target 'es5' - a.ts - Root file specified for compilation + sub/a.ts + Matched by default include pattern '**/*' Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Project '/users/username/projects/project/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (2) - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) -Info seq [hh:mm:ss:mss] Files (2) +Info seq [hh:mm:ss:mss] Files (3) Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: Info seq [hh:mm:ss:mss] FileName: /users/username/projects/project/b.ts ProjectRootPath: /users/username/projects/project Info seq [hh:mm:ss:mss] Projects: /users/username/projects/project/tsconfig.json Info seq [hh:mm:ss:mss] FileName: /users/username/projects/project/sub/a.ts ProjectRootPath: /users/username/projects/project -Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] Projects: /users/username/projects/project/tsconfig.json Info seq [hh:mm:ss:mss] response: { "seq": 0, @@ -614,30 +582,6 @@ Info seq [hh:mm:ss:mss] response: } After request -PolledWatches:: -/users/username/projects/node_modules/@types: - {"pollingInterval":500} -/users/username/projects/project/jsconfig.json: *new* - {"pollingInterval":2000} -/users/username/projects/project/node_modules/@types: - {"pollingInterval":500} -/users/username/projects/project/sub/jsconfig.json: *new* - {"pollingInterval":2000} -/users/username/projects/project/sub/node_modules/@types: *new* - {"pollingInterval":500} -/users/username/projects/project/sub/tsconfig.json: *new* - {"pollingInterval":2000} - -FsWatches:: -/a/lib/lib.d.ts: - {} -/users/username/projects/project/tsconfig.json: - {} - -FsWatchesRecursive:: -/users/username/projects/project: - {} - Timeout callback:: count: 2 9: /users/username/projects/project/tsconfig.json *deleted* 10: *ensureProjectForOpenFiles* *deleted* @@ -645,20 +589,16 @@ Timeout callback:: count: 2 12: *ensureProjectForOpenFiles* *new* Projects:: -/dev/null/inferredProject1* (Inferred) *new* - projectStateVersion: 1 - projectProgramVersion: 1 /users/username/projects/project/tsconfig.json (Configured) *changed* projectStateVersion: 3 projectProgramVersion: 3 *changed* dirty: false *changed* ScriptInfos:: -/a/lib/lib.d.ts *changed* +/a/lib/lib.d.ts version: Text-1 - containingProjects: 2 *changed* + containingProjects: 1 /users/username/projects/project/tsconfig.json - /dev/null/inferredProject1* *new* /users/username/projects/project/b.ts (Open) version: SVC-1-0 containingProjects: 1 @@ -666,7 +606,7 @@ ScriptInfos:: /users/username/projects/project/sub/a.ts (Open) *new* version: SVC-2-0 containingProjects: 1 - /dev/null/inferredProject1* *default* + /users/username/projects/project/tsconfig.json *default* Before running Timeout callback:: count: 2 11: /users/username/projects/project/tsconfig.json @@ -676,32 +616,24 @@ Info seq [hh:mm:ss:mss] Running: /users/username/projects/project/tsconfig.json Info seq [hh:mm:ss:mss] Running: *ensureProjectForOpenFiles* Info seq [hh:mm:ss:mss] Before ensureProjectForOpenFiles: Info seq [hh:mm:ss:mss] Project '/users/username/projects/project/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (2) - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) -Info seq [hh:mm:ss:mss] Files (2) +Info seq [hh:mm:ss:mss] Files (3) Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: Info seq [hh:mm:ss:mss] FileName: /users/username/projects/project/b.ts ProjectRootPath: /users/username/projects/project Info seq [hh:mm:ss:mss] Projects: /users/username/projects/project/tsconfig.json Info seq [hh:mm:ss:mss] FileName: /users/username/projects/project/sub/a.ts ProjectRootPath: /users/username/projects/project -Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] Projects: /users/username/projects/project/tsconfig.json Info seq [hh:mm:ss:mss] After ensureProjectForOpenFiles: Info seq [hh:mm:ss:mss] Project '/users/username/projects/project/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (2) - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) -Info seq [hh:mm:ss:mss] Files (2) +Info seq [hh:mm:ss:mss] Files (3) Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: Info seq [hh:mm:ss:mss] FileName: /users/username/projects/project/b.ts ProjectRootPath: /users/username/projects/project Info seq [hh:mm:ss:mss] Projects: /users/username/projects/project/tsconfig.json Info seq [hh:mm:ss:mss] FileName: /users/username/projects/project/sub/a.ts ProjectRootPath: /users/username/projects/project -Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] Projects: /users/username/projects/project/tsconfig.json Info seq [hh:mm:ss:mss] got projects updated in background /users/username/projects/project/b.ts,/users/username/projects/project/sub/a.ts Info seq [hh:mm:ss:mss] event: { @@ -726,23 +658,14 @@ Info seq [hh:mm:ss:mss] Scheduled: /users/username/projects/project/tsconfig.js Info seq [hh:mm:ss:mss] Scheduled: *ensureProjectForOpenFiles*, Cancelled earlier one Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Triggered with /users/username/projects/project/sub :: WatchInfo: /users/username/projects/project 1 undefined Config: /users/username/projects/project/tsconfig.json WatchType: Wild card directory Info seq [hh:mm:ss:mss] DirectoryWatcher:: Triggered with /users/username/projects/project/sub/a.ts :: WatchInfo: /users/username/projects/project 1 undefined Config: /users/username/projects/project/tsconfig.json WatchType: Wild card directory -Info seq [hh:mm:ss:mss] Scheduled: /users/username/projects/project/tsconfig.json, Cancelled earlier one -Info seq [hh:mm:ss:mss] Scheduled: *ensureProjectForOpenFiles*, Cancelled earlier one Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Triggered with /users/username/projects/project/sub/a.ts :: WatchInfo: /users/username/projects/project 1 undefined Config: /users/username/projects/project/tsconfig.json WatchType: Wild card directory Before request -//// [/users/username/projects/project/sub/a.ts] -export const a = 10; - -//// [/users/username/projects/project/a.ts] deleted Timeout callback:: count: 2 -17: /users/username/projects/project/tsconfig.json *new* -18: *ensureProjectForOpenFiles* *new* +15: /users/username/projects/project/tsconfig.json *new* +16: *ensureProjectForOpenFiles* *new* Projects:: -/dev/null/inferredProject1* (Inferred) - projectStateVersion: 1 - projectProgramVersion: 1 /users/username/projects/project/tsconfig.json (Configured) *changed* projectStateVersion: 4 *changed* projectProgramVersion: 3 @@ -764,36 +687,19 @@ Info seq [hh:mm:ss:mss] request: After request Timeout callback:: count: 3 -17: /users/username/projects/project/tsconfig.json -18: *ensureProjectForOpenFiles* -19: checkOne *new* +15: /users/username/projects/project/tsconfig.json +16: *ensureProjectForOpenFiles* +17: checkOne *new* Before running Timeout callback:: count: 3 -17: /users/username/projects/project/tsconfig.json -18: *ensureProjectForOpenFiles* -19: checkOne - -Invoking Timeout callback:: timeoutId:: 19:: checkOne -Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /users/username/projects/project/sub/tsconfig.json 2000 undefined WatchType: Config file for the inferred project root -Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /users/username/projects/project/sub/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root -Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /users/username/projects/project/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root -Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /users/username/projects/project/tsconfig.json -Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /users/username/projects/project/tsconfig.json projectStateVersion: 4 projectProgramVersion: 3 structureChanged: true structureIsReused:: Not Elapsed:: *ms -Info seq [hh:mm:ss:mss] Project '/users/username/projects/project/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (3) - /a/lib/lib.d.ts Text-1 "/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }" - /users/username/projects/project/b.ts SVC-1-0 "export const b = 10;" - /users/username/projects/project/sub/a.ts SVC-2-0 "" - - - ../../../../a/lib/lib.d.ts - Default library for target 'es5' - b.ts - Matched by default include pattern '**/*' - sub/a.ts - Matched by default include pattern '**/*' +15: /users/username/projects/project/tsconfig.json +16: *ensureProjectForOpenFiles* +17: checkOne -Info seq [hh:mm:ss:mss] ----------------------------------------------- +Invoking Timeout callback:: timeoutId:: 17:: checkOne +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /users/username/projects/project/tsconfig.json +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /users/username/projects/project/tsconfig.json projectStateVersion: 4 projectProgramVersion: 3 structureChanged: false structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Same program as before Info seq [hh:mm:ss:mss] event: { "seq": 0, @@ -806,62 +712,15 @@ Info seq [hh:mm:ss:mss] event: } After running Timeout callback:: count: 2 -PolledWatches:: -/users/username/projects/node_modules/@types: - {"pollingInterval":500} -/users/username/projects/project/node_modules/@types: - {"pollingInterval":500} -/users/username/projects/project/sub/node_modules/@types: - {"pollingInterval":500} - -PolledWatches *deleted*:: -/users/username/projects/project/jsconfig.json: - {"pollingInterval":2000} -/users/username/projects/project/sub/jsconfig.json: - {"pollingInterval":2000} -/users/username/projects/project/sub/tsconfig.json: - {"pollingInterval":2000} - -FsWatches:: -/a/lib/lib.d.ts: - {} -/users/username/projects/project/tsconfig.json: - {} - -FsWatchesRecursive:: -/users/username/projects/project: - {} - Immedidate callback:: count: 1 1: semanticCheck *new* Projects:: -/dev/null/inferredProject1* (Inferred) *changed* - projectStateVersion: 2 *changed* - projectProgramVersion: 1 - dirty: true *changed* - isOrphan: true *changed* /users/username/projects/project/tsconfig.json (Configured) *changed* projectStateVersion: 4 - projectProgramVersion: 4 *changed* + projectProgramVersion: 3 dirty: false *changed* -ScriptInfos:: -/a/lib/lib.d.ts - version: Text-1 - containingProjects: 2 - /users/username/projects/project/tsconfig.json - /dev/null/inferredProject1* -/users/username/projects/project/b.ts (Open) - version: SVC-1-0 - containingProjects: 1 - /users/username/projects/project/tsconfig.json *default* -/users/username/projects/project/sub/a.ts (Open) *changed* - version: SVC-2-0 - containingProjects: 1 *changed* - /users/username/projects/project/tsconfig.json *default* *new* - /dev/null/inferredProject1* *deleted* - Before running Immedidate callback:: count: 1 1: semanticCheck @@ -896,16 +755,16 @@ Info seq [hh:mm:ss:mss] event: After running Immedidate callback:: count: 0 Timeout callback:: count: 3 -17: /users/username/projects/project/tsconfig.json -18: *ensureProjectForOpenFiles* -20: checkOne *new* +15: /users/username/projects/project/tsconfig.json +16: *ensureProjectForOpenFiles* +18: checkOne *new* Before running Timeout callback:: count: 3 -17: /users/username/projects/project/tsconfig.json -18: *ensureProjectForOpenFiles* -20: checkOne +15: /users/username/projects/project/tsconfig.json +16: *ensureProjectForOpenFiles* +18: checkOne -Invoking Timeout callback:: timeoutId:: 20:: checkOne +Invoking Timeout callback:: timeoutId:: 18:: checkOne Info seq [hh:mm:ss:mss] event: { "seq": 0, diff --git a/tests/baselines/reference/tsserver/watchEnvironment/uses-dynamic-polling-when-file-is-added-to-subfolder.js b/tests/baselines/reference/tsserver/watchEnvironment/uses-dynamic-polling-when-file-is-added-to-subfolder.js index 7ba98c5fe9364..14a80c3b9f562 100644 --- a/tests/baselines/reference/tsserver/watchEnvironment/uses-dynamic-polling-when-file-is-added-to-subfolder.js +++ b/tests/baselines/reference/tsserver/watchEnvironment/uses-dynamic-polling-when-file-is-added-to-subfolder.js @@ -241,8 +241,11 @@ Before running Timeout callback:: count: 1 Info seq [hh:mm:ss:mss] DirectoryWatcher:: Triggered with /a/username/project/src :: WatchInfo: /a/username/project 1 {"synchronousWatchDirectory":true} Config: /a/username/project/tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] Invoking sourceFileChange on /a/username/project/src/file1.ts:: 1 Info seq [hh:mm:ss:mss] Scheduled: /a/username/project/tsconfig.json Info seq [hh:mm:ss:mss] Scheduled: *ensureProjectForOpenFiles* +Info seq [hh:mm:ss:mss] Scheduled: /a/username/project/tsconfig.json, Cancelled earlier one +Info seq [hh:mm:ss:mss] Scheduled: *ensureProjectForOpenFiles*, Cancelled earlier one Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Triggered with /a/username/project/src :: WatchInfo: /a/username/project 1 {"synchronousWatchDirectory":true} Config: /a/username/project/tsconfig.json WatchType: Wild card directory Info seq [hh:mm:ss:mss] DirectoryWatcher:: Triggered with /a/username/project/src :: WatchInfo: /a/username/project/src 1 {"synchronousWatchDirectory":true} Project: /a/username/project/tsconfig.json WatchType: Failed Lookup Locations Info seq [hh:mm:ss:mss] Scheduled: /a/username/project/tsconfig.jsonFailedLookupInvalidation @@ -250,11 +253,11 @@ Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Triggered with /a/user After running Timeout callback:: count: 5 Timeout callback:: count: 5 -2: /a/username/project/tsconfig.json *new* -3: *ensureProjectForOpenFiles* *new* -4: /a/username/project/tsconfig.jsonFailedLookupInvalidation *new* -5: pollLowPollingIntervalQueue *new* -6: pollPollingIntervalQueue *new* +4: /a/username/project/tsconfig.json *new* +5: *ensureProjectForOpenFiles* *new* +6: /a/username/project/tsconfig.jsonFailedLookupInvalidation *new* +7: pollLowPollingIntervalQueue *new* +8: pollPollingIntervalQueue *new* Projects:: /a/username/project/tsconfig.json (Configured) *changed* @@ -262,6 +265,21 @@ Projects:: projectProgramVersion: 1 dirty: true *changed* +ScriptInfos:: +/a/lib/lib.d.ts + version: Text-1 + containingProjects: 1 + /a/username/project/tsconfig.json +/a/username/project/src/file1.ts *changed* + version: Text-1 + pendingReloadFromDisk: true *changed* + containingProjects: 1 + /a/username/project/tsconfig.json +/a/username/project/src/index.ts (Open) + version: SVC-1-0 + containingProjects: 1 + /a/username/project/tsconfig.json *default* + Before request Info seq [hh:mm:ss:mss] request: @@ -338,12 +356,12 @@ FsWatches:: {"inode":7} Timeout callback:: count: 4 -3: *ensureProjectForOpenFiles* *deleted* -4: /a/username/project/tsconfig.jsonFailedLookupInvalidation *deleted* -2: /a/username/project/tsconfig.json -5: pollLowPollingIntervalQueue -6: pollPollingIntervalQueue -7: *ensureProjectForOpenFiles* *new* +5: *ensureProjectForOpenFiles* *deleted* +6: /a/username/project/tsconfig.jsonFailedLookupInvalidation *deleted* +4: /a/username/project/tsconfig.json +7: pollLowPollingIntervalQueue +8: pollPollingIntervalQueue +9: *ensureProjectForOpenFiles* *new* Projects:: /a/username/project/tsconfig.json (Configured) *changed* @@ -356,8 +374,9 @@ ScriptInfos:: version: Text-1 containingProjects: 1 /a/username/project/tsconfig.json -/a/username/project/src/file1.ts +/a/username/project/src/file1.ts *changed* version: Text-1 + pendingReloadFromDisk: false *changed* containingProjects: 1 /a/username/project/tsconfig.json /a/username/project/src/file2.ts *new* diff --git a/tests/baselines/reference/tsserver/watchEnvironment/uses-watchFile-when-file-is-added-to-subfolder.js b/tests/baselines/reference/tsserver/watchEnvironment/uses-watchFile-when-file-is-added-to-subfolder.js index e67501a767228..70f2a47e414de 100644 --- a/tests/baselines/reference/tsserver/watchEnvironment/uses-watchFile-when-file-is-added-to-subfolder.js +++ b/tests/baselines/reference/tsserver/watchEnvironment/uses-watchFile-when-file-is-added-to-subfolder.js @@ -240,24 +240,27 @@ Info seq [hh:mm:ss:mss] response: After request Info seq [hh:mm:ss:mss] DirectoryWatcher:: Triggered with /a/username/project/src :: WatchInfo: /a/username/project 1 {"synchronousWatchDirectory":true} Config: /a/username/project/tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] Invoking sourceFileChange on /a/username/project/src/file1.ts:: 1 Info seq [hh:mm:ss:mss] Scheduled: /a/username/project/tsconfig.json Info seq [hh:mm:ss:mss] Scheduled: *ensureProjectForOpenFiles* +Info seq [hh:mm:ss:mss] Scheduled: /a/username/project/tsconfig.json, Cancelled earlier one +Info seq [hh:mm:ss:mss] Scheduled: *ensureProjectForOpenFiles*, Cancelled earlier one Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Triggered with /a/username/project/src :: WatchInfo: /a/username/project 1 {"synchronousWatchDirectory":true} Config: /a/username/project/tsconfig.json WatchType: Wild card directory Info seq [hh:mm:ss:mss] DirectoryWatcher:: Triggered with /a/username/project/src :: WatchInfo: /a/username/project/src 1 {"synchronousWatchDirectory":true} Project: /a/username/project/tsconfig.json WatchType: Failed Lookup Locations Info seq [hh:mm:ss:mss] Scheduled: /a/username/project/tsconfig.jsonFailedLookupInvalidation Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Triggered with /a/username/project/src :: WatchInfo: /a/username/project/src 1 {"synchronousWatchDirectory":true} Project: /a/username/project/tsconfig.json WatchType: Failed Lookup Locations Before running Timeout callback:: count: 3 -1: /a/username/project/tsconfig.json -2: *ensureProjectForOpenFiles* -3: /a/username/project/tsconfig.jsonFailedLookupInvalidation +3: /a/username/project/tsconfig.json +4: *ensureProjectForOpenFiles* +5: /a/username/project/tsconfig.jsonFailedLookupInvalidation //// [/a/username/project/src/file2.ts] Inode:: 10 Timeout callback:: count: 3 -1: /a/username/project/tsconfig.json *new* -2: *ensureProjectForOpenFiles* *new* -3: /a/username/project/tsconfig.jsonFailedLookupInvalidation *new* +3: /a/username/project/tsconfig.json *new* +4: *ensureProjectForOpenFiles* *new* +5: /a/username/project/tsconfig.jsonFailedLookupInvalidation *new* Projects:: /a/username/project/tsconfig.json (Configured) *changed* @@ -265,6 +268,21 @@ Projects:: projectProgramVersion: 1 dirty: true *changed* +ScriptInfos:: +/a/lib/lib.d.ts + version: Text-1 + containingProjects: 1 + /a/username/project/tsconfig.json +/a/username/project/src/file1.ts *changed* + version: Text-1 + pendingReloadFromDisk: true *changed* + containingProjects: 1 + /a/username/project/tsconfig.json +/a/username/project/src/index.ts (Open) + version: SVC-1-0 + containingProjects: 1 + /a/username/project/tsconfig.json *default* + Info seq [hh:mm:ss:mss] Running: /a/username/project/tsconfig.json Info seq [hh:mm:ss:mss] Scheduled: *ensureProjectForOpenFiles*, Cancelled earlier one Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /a/username/project/src/file2.ts 500 undefined WatchType: Closed Script info @@ -310,9 +328,9 @@ FsWatches:: {"inode":7} Timeout callback:: count: 1 -2: *ensureProjectForOpenFiles* *deleted* -3: /a/username/project/tsconfig.jsonFailedLookupInvalidation *deleted* -4: *ensureProjectForOpenFiles* *new* +4: *ensureProjectForOpenFiles* *deleted* +5: /a/username/project/tsconfig.jsonFailedLookupInvalidation *deleted* +6: *ensureProjectForOpenFiles* *new* Projects:: /a/username/project/tsconfig.json (Configured) *changed* @@ -325,8 +343,9 @@ ScriptInfos:: version: Text-1 containingProjects: 1 /a/username/project/tsconfig.json -/a/username/project/src/file1.ts +/a/username/project/src/file1.ts *changed* version: Text-1 + pendingReloadFromDisk: false *changed* containingProjects: 1 /a/username/project/tsconfig.json /a/username/project/src/file2.ts *new* From 25e09d9fc37ee680a7bb7134c5a14ffbf7d8c654 Mon Sep 17 00:00:00 2001 From: Jake Bailey <5341706+jakebailey@users.noreply.github.com> Date: Wed, 14 Aug 2024 09:28:57 -0700 Subject: [PATCH 31/50] Add custom eslint rule 'no-array-mutating-method-expressions' (#59526) --- eslint.config.mjs | 1 + package-lock.json | 1 + package.json | 1 + .../no-array-mutating-method-expressions.cjs | 126 ++++++++++++++++++ src/harness/fourslashImpl.ts | 16 +-- src/harness/projectServiceStateLogger.ts | 3 +- src/services/mapCode.ts | 5 +- src/services/navigateTo.ts | 3 +- src/services/outliningElementsCollector.ts | 3 +- src/services/refactors/extractSymbol.ts | 6 +- src/services/suggestionDiagnostics.ts | 3 +- .../unittests/services/extract/ranges.ts | 4 +- 12 files changed, 153 insertions(+), 19 deletions(-) create mode 100644 scripts/eslint/rules/no-array-mutating-method-expressions.cjs diff --git a/eslint.config.mjs b/eslint.config.mjs index 195ca4293e4be..9fd6276e584fc 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -155,6 +155,7 @@ export default tseslint.config( "local/no-keywords": "error", "local/jsdoc-format": "error", "local/js-extensions": "error", + "local/no-array-mutating-method-expressions": "error", }, }, { diff --git a/package-lock.json b/package-lock.json index eb0db3e839ac6..baeb2565e5f66 100644 --- a/package-lock.json +++ b/package-lock.json @@ -27,6 +27,7 @@ "@types/source-map-support": "^0.5.10", "@types/which": "^3.0.4", "@typescript-eslint/rule-tester": "^8.1.0", + "@typescript-eslint/type-utils": "^8.1.0", "@typescript-eslint/utils": "^8.1.0", "azure-devops-node-api": "^14.0.2", "c8": "^10.1.2", diff --git a/package.json b/package.json index 05e08606a75ed..2528f6b59b353 100644 --- a/package.json +++ b/package.json @@ -53,6 +53,7 @@ "@types/source-map-support": "^0.5.10", "@types/which": "^3.0.4", "@typescript-eslint/rule-tester": "^8.1.0", + "@typescript-eslint/type-utils": "^8.1.0", "@typescript-eslint/utils": "^8.1.0", "azure-devops-node-api": "^14.0.2", "c8": "^10.1.2", diff --git a/scripts/eslint/rules/no-array-mutating-method-expressions.cjs b/scripts/eslint/rules/no-array-mutating-method-expressions.cjs new file mode 100644 index 0000000000000..b085933953b19 --- /dev/null +++ b/scripts/eslint/rules/no-array-mutating-method-expressions.cjs @@ -0,0 +1,126 @@ +const { ESLintUtils } = require("@typescript-eslint/utils"); +const { createRule } = require("./utils.cjs"); +const { getConstrainedTypeAtLocation, isTypeArrayTypeOrUnionOfArrayTypes } = require("@typescript-eslint/type-utils"); + +/** + * @import { TSESTree } from "@typescript-eslint/utils" + */ +void 0; + +module.exports = createRule({ + name: "no-array-mutating-method-expressions", + meta: { + docs: { + description: ``, + }, + messages: { + noSideEffectUse: `This call to {{method}} appears to be unintentional as it appears in an expression position. Sort the array in a separate statement or explicitly copy the array with slice.`, + noSideEffectUseToMethod: `This call to {{method}} appears to be unintentional as it appears in an expression position. Sort the array in a separate statement or explicitly copy and slice the array with slice/{{toMethod}}.`, + }, + schema: [], + type: "problem", + }, + defaultOptions: [], + + create(context) { + const services = ESLintUtils.getParserServices(context, /*allowWithoutFullTypeInformation*/ true); + if (!services.program) { + return {}; + } + + const checker = services.program.getTypeChecker(); + + /** + * This is a heuristic to ignore cases where the mutating method appears to be + * operating on a "fresh" array. + * + * @type {(callee: TSESTree.MemberExpression) => boolean} + */ + const isFreshArray = callee => { + const object = callee.object; + + if (object.type === "ArrayExpression") { + return true; + } + + if (object.type !== "CallExpression") { + return false; + } + + if (object.callee.type === "Identifier") { + // TypeScript codebase specific helpers. + // TODO(jakebailey): handle ts. + switch (object.callee.name) { + case "arrayFrom": + case "getOwnKeys": + return true; + } + return false; + } + + if (object.callee.type === "MemberExpression" && object.callee.property.type === "Identifier") { + switch (object.callee.property.name) { + case "concat": + case "filter": + case "map": + case "slice": + return true; + } + + if (object.callee.object.type === "Identifier") { + if (object.callee.object.name === "Array") { + switch (object.callee.property.name) { + case "from": + case "of": + return true; + } + return false; + } + + if (object.callee.object.name === "Object") { + switch (object.callee.property.name) { + case "values": + case "keys": + case "entries": + return true; + } + return false; + } + } + } + + return false; + }; + + /** @type {(callee: TSESTree.MemberExpression & { parent: TSESTree.CallExpression; }, method: string, toMethod: string | undefined) => void} */ + const check = (callee, method, toMethod) => { + if (callee.parent.parent.type === "ExpressionStatement") return; + if (isFreshArray(callee)) return; + + const calleeObjType = getConstrainedTypeAtLocation(services, callee.object); + if (!isTypeArrayTypeOrUnionOfArrayTypes(calleeObjType, checker)) return; + + if (toMethod) { + context.report({ node: callee.property, messageId: "noSideEffectUseToMethod", data: { method, toMethod } }); + } + else { + context.report({ node: callee.property, messageId: "noSideEffectUse", data: { method } }); + } + }; + + // Methods with new copying variants. + // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array#copying_methods_and_mutating_methods + const mutatingMethods = { + reverse: undefined, + sort: "toSorted", // This exists as `ts.toSorted`, so recommend that. + splice: undefined, + }; + + return Object.fromEntries( + Object.entries(mutatingMethods).map(([method, toMethod]) => [ + `CallExpression > MemberExpression[property.name='${method}'][computed=false]`, + node => check(node, method, toMethod), + ]), + ); + }, +}); diff --git a/src/harness/fourslashImpl.ts b/src/harness/fourslashImpl.ts index 04beb984ae538..33e0f84a7443c 100644 --- a/src/harness/fourslashImpl.ts +++ b/src/harness/fourslashImpl.ts @@ -963,7 +963,7 @@ export class TestState { const fileName = this.activeFile.fileName; const hints = this.languageService.provideInlayHints(fileName, span, preferences); - const annotations = ts.map(hints.sort(sortHints), hint => { + const annotations = ts.map(hints.slice().sort(sortHints), hint => { if (hint.displayParts) { hint.displayParts = ts.map(hint.displayParts, part => { if (part.file && /lib.*\.d\.ts$/.test(part.file)) { @@ -3257,8 +3257,8 @@ export class TestState { allSpanInsets.push({ text: "|]", pos: span.textSpan.start + span.textSpan.length }); }); - const reverseSpans = allSpanInsets.sort((l, r) => r.pos - l.pos); - ts.forEach(reverseSpans, span => { + allSpanInsets.sort((l, r) => r.pos - l.pos); + ts.forEach(allSpanInsets, span => { annotated = annotated.slice(0, span.pos) + span.text + annotated.slice(span.pos); }); Harness.IO.log(`\nMockup:\n${annotated}`); @@ -3783,7 +3783,7 @@ export class TestState { return { baselineContent: baselineContent + activeFile.content + `\n\n--No linked edits found--`, offset }; } - let inlineLinkedEditBaselines: { start: number; end: number; index: number; }[] = []; + const inlineLinkedEditBaselines: { start: number; end: number; index: number; }[] = []; let linkedEditInfoBaseline = ""; for (const edit of linkedEditsByRange) { const [linkedEdit, positions] = edit; @@ -3802,7 +3802,7 @@ export class TestState { offset++; } - inlineLinkedEditBaselines = inlineLinkedEditBaselines.sort((a, b) => a.start - b.start); + inlineLinkedEditBaselines.sort((a, b) => a.start - b.start); const fileText = activeFile.content; baselineContent += fileText.slice(0, inlineLinkedEditBaselines[0].start); for (let i = 0; i < inlineLinkedEditBaselines.length; i++) { @@ -4058,7 +4058,7 @@ export class TestState { public verifyRefactorKindsAvailable(kind: string, expected: string[], preferences = ts.emptyOptions) { const refactors = this.getApplicableRefactorsAtSelection("invoked", kind, preferences); const availableKinds = ts.flatMap(refactors, refactor => refactor.actions).map(action => action.kind); - assert.deepEqual(availableKinds.sort(), expected.sort(), `Expected kinds to be equal`); + assert.deepEqual(availableKinds.slice().sort(), expected.slice().sort(), `Expected kinds to be equal`); } public verifyRefactorsAvailable(names: readonly string[]): void { @@ -4938,7 +4938,7 @@ function parseFileContent(content: string, fileName: string, markerMap: Map a.pos < b.pos ? -1 : a.pos === b.pos && a.end > b.end ? -1 : 1); + localRanges.sort((a, b) => a.pos < b.pos ? -1 : a.pos === b.pos && a.end > b.end ? -1 : 1); localRanges.forEach(r => ranges.push(r)); return { diff --git a/src/harness/projectServiceStateLogger.ts b/src/harness/projectServiceStateLogger.ts index 599769b8e734b..42f64fde7f321 100644 --- a/src/harness/projectServiceStateLogger.ts +++ b/src/harness/projectServiceStateLogger.ts @@ -9,6 +9,7 @@ import { isString, noop, SourceMapper, + toSorted, } from "./_namespaces/ts.js"; import { AutoImportProviderProject, @@ -93,7 +94,7 @@ export function patchServiceForStateBaseline(service: ProjectService) { function sendLogsToLogger(title: string, logs: StateItemLog[] | undefined) { if (!logs) return; logger.log(title); - logs.sort((a, b) => compareStringsCaseSensitive(a[0], b[0])) + toSorted(logs, (a, b) => compareStringsCaseSensitive(a[0], b[0])) .forEach(([title, propertyLogs]) => { logger.log(title); propertyLogs.forEach(p => isString(p) ? logger.log(p) : p.forEach(s => logger.log(s))); diff --git a/src/services/mapCode.ts b/src/services/mapCode.ts index b87ea5e75301f..11d9fb5acf2f9 100644 --- a/src/services/mapCode.ts +++ b/src/services/mapCode.ts @@ -113,11 +113,12 @@ function parse(sourceFile: SourceFile, content: string): NodeArray { } } // Heuristic: fewer errors = more likely to be the right kind. - const { body } = parsedNodes.sort( + parsedNodes.sort( (a, b) => a.sourceFile.parseDiagnostics.length - b.sourceFile.parseDiagnostics.length, - )[0]; + ); + const { body } = parsedNodes[0]; return body; } diff --git a/src/services/navigateTo.ts b/src/services/navigateTo.ts index cb75e1478113f..e2858e48fedba 100644 --- a/src/services/navigateTo.ts +++ b/src/services/navigateTo.ts @@ -164,7 +164,8 @@ function getContainers(declaration: Declaration): readonly string[] { container = getContainerNode(container); } - return containers.reverse(); + containers.reverse(); + return containers; } function compareNavigateToItems(i1: RawNavigateToItem, i2: RawNavigateToItem) { diff --git a/src/services/outliningElementsCollector.ts b/src/services/outliningElementsCollector.ts index 0254620c1e6d8..7248133ec8ca7 100644 --- a/src/services/outliningElementsCollector.ts +++ b/src/services/outliningElementsCollector.ts @@ -60,7 +60,8 @@ export function collectElements(sourceFile: SourceFile, cancellationToken: Cance const res: OutliningSpan[] = []; addNodeOutliningSpans(sourceFile, cancellationToken, res); addRegionOutliningSpans(sourceFile, res); - return res.sort((span1, span2) => span1.textSpan.start - span2.textSpan.start); + res.sort((span1, span2) => span1.textSpan.start - span2.textSpan.start); + return res; } function addNodeOutliningSpans(sourceFile: SourceFile, cancellationToken: CancellationToken, out: OutliningSpan[]): void { diff --git a/src/services/refactors/extractSymbol.ts b/src/services/refactors/extractSymbol.ts index 4093074b9575a..423922f691323 100644 --- a/src/services/refactors/extractSymbol.ts +++ b/src/services/refactors/extractSymbol.ts @@ -1081,11 +1081,11 @@ function extractFunctionInScope( }); const typeParametersAndDeclarations = arrayFrom(typeParameterUsages.values(), type => ({ type, declaration: getFirstDeclarationBeforePosition(type, context.startPosition) })); - const sortedTypeParametersAndDeclarations = typeParametersAndDeclarations.sort(compareTypesByDeclarationOrder); + typeParametersAndDeclarations.sort(compareTypesByDeclarationOrder); - const typeParameters: readonly TypeParameterDeclaration[] | undefined = sortedTypeParametersAndDeclarations.length === 0 + const typeParameters: readonly TypeParameterDeclaration[] | undefined = typeParametersAndDeclarations.length === 0 ? undefined - : mapDefined(sortedTypeParametersAndDeclarations, ({ declaration }) => declaration as TypeParameterDeclaration); + : mapDefined(typeParametersAndDeclarations, ({ declaration }) => declaration as TypeParameterDeclaration); // Strictly speaking, we should check whether each name actually binds to the appropriate type // parameter. In cases of shadowing, they may not. diff --git a/src/services/suggestionDiagnostics.ts b/src/services/suggestionDiagnostics.ts index a5daf3e6666f2..3c4cf5c39b976 100644 --- a/src/services/suggestionDiagnostics.ts +++ b/src/services/suggestionDiagnostics.ts @@ -97,7 +97,8 @@ export function computeSuggestionDiagnostics(sourceFile: SourceFile, program: Pr addRange(diags, sourceFile.bindSuggestionDiagnostics); addRange(diags, program.getSuggestionDiagnostics(sourceFile, cancellationToken)); - return diags.sort((d1, d2) => d1.start - d2.start); + diags.sort((d1, d2) => d1.start - d2.start); + return diags; function check(node: Node) { if (isJsFile) { diff --git a/src/testRunner/unittests/services/extract/ranges.ts b/src/testRunner/unittests/services/extract/ranges.ts index 9fd9bee8bebbe..c54760476ddb4 100644 --- a/src/testRunner/unittests/services/extract/ranges.ts +++ b/src/testRunner/unittests/services/extract/ranges.ts @@ -1,7 +1,7 @@ import * as ts from "../../../_namespaces/ts.js"; import { extractTest } from "./helpers.js"; -function testExtractRangeFailed(caption: string, s: string, expectedErrors: string[]) { +function testExtractRangeFailed(caption: string, s: string, expectedErrors: readonly string[]) { return it(caption, () => { const t = extractTest(s); const file = ts.createSourceFile("a.ts", t.source, ts.ScriptTarget.Latest, /*setParentNodes*/ true); @@ -12,7 +12,7 @@ function testExtractRangeFailed(caption: string, s: string, expectedErrors: stri const result = ts.refactor.extractSymbol.getRangeToExtract(file, ts.createTextSpanFromRange(selectionRange), /*invoked*/ false); assert(result.targetRange === undefined, "failure expected"); const sortedErrors = result.errors.map(e => e.messageText as string).sort(); - assert.deepEqual(sortedErrors, expectedErrors.sort(), "unexpected errors"); + assert.deepEqual(sortedErrors, expectedErrors.slice().sort(), "unexpected errors"); }); } From 1250b480a52a0f902d9b950ee00899bebc96ff79 Mon Sep 17 00:00:00 2001 From: Wesley Wigham Date: Wed, 14 Aug 2024 13:07:50 -0700 Subject: [PATCH 32/50] Suggest simplifications for overzealous shifts (#59519) --- src/compiler/checker.ts | 22 + src/compiler/diagnosticMessages.json | 4 + src/harness/compilerImpl.ts | 12 +- src/harness/harnessIO.ts | 4 +- .../baselines/reference/overshifts.errors.txt | 253 ++++++ tests/baselines/reference/overshifts.js | 175 +++++ tests/baselines/reference/overshifts.symbols | 189 +++++ tests/baselines/reference/overshifts.types | 720 ++++++++++++++++++ tests/cases/compiler/overshifts.ts | 89 +++ 9 files changed, 1464 insertions(+), 4 deletions(-) create mode 100644 tests/baselines/reference/overshifts.errors.txt create mode 100644 tests/baselines/reference/overshifts.js create mode 100644 tests/baselines/reference/overshifts.symbols create mode 100644 tests/baselines/reference/overshifts.types create mode 100644 tests/cases/compiler/overshifts.ts diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 6008bb2da1ffe..a5bcfbd4fa976 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -39831,6 +39831,28 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { } if (leftOk && rightOk) { checkAssignmentOperator(resultType); + switch (operator) { + case SyntaxKind.LessThanLessThanToken: + case SyntaxKind.LessThanLessThanEqualsToken: + case SyntaxKind.GreaterThanGreaterThanToken: + case SyntaxKind.GreaterThanGreaterThanEqualsToken: + case SyntaxKind.GreaterThanGreaterThanGreaterThanToken: + case SyntaxKind.GreaterThanGreaterThanGreaterThanEqualsToken: + const rhsEval = evaluate(right); + if (typeof rhsEval.value === "number" && Math.abs(rhsEval.value) >= 32) { + errorOrSuggestion( + isEnumMember(walkUpParenthesizedExpressions(right.parent.parent)), // elevate from suggestion to error within an enum member + errorNode || operatorToken, + Diagnostics.This_operation_can_be_simplified_This_shift_is_identical_to_0_1_2, + getTextOfNode(left), + tokenToString(operator), + rhsEval.value % 32, + ); + } + break; + default: + break; + } } return resultType; } diff --git a/src/compiler/diagnosticMessages.json b/src/compiler/diagnosticMessages.json index 850d5ca1022af..36213fbc314e8 100644 --- a/src/compiler/diagnosticMessages.json +++ b/src/compiler/diagnosticMessages.json @@ -6420,6 +6420,10 @@ "category": "Message", "code": 6806 }, + "This operation can be simplified. This shift is identical to `{0} {1} {2}`.": { + "category": "Error", + "code": 6807 + }, "one of:": { "category": "Message", diff --git a/src/harness/compilerImpl.ts b/src/harness/compilerImpl.ts index 90393622d9308..4e19b1443aea3 100644 --- a/src/harness/compilerImpl.ts +++ b/src/harness/compilerImpl.ts @@ -241,7 +241,7 @@ export class CompilationResult { } } -export function compileFiles(host: fakes.CompilerHost, rootFiles: string[] | undefined, compilerOptions: ts.CompilerOptions, typeScriptVersion?: string): CompilationResult { +export function compileFiles(host: fakes.CompilerHost, rootFiles: string[] | undefined, compilerOptions: ts.CompilerOptions, typeScriptVersion?: string, captureSuggestions?: boolean): CompilationResult { if (compilerOptions.project || !rootFiles || rootFiles.length === 0) { const project = readProject(host.parseConfigHost, compilerOptions.project, compilerOptions); if (project) { @@ -265,11 +265,17 @@ export function compileFiles(host: fakes.CompilerHost, rootFiles: string[] | und // and if the test is running `skipLibCheck` - an indicator that we want the tets to run quickly - skip the before/after error comparison, too const skipErrorComparison = ts.length(rootFiles) >= 100 || (!!compilerOptions.skipLibCheck && !!compilerOptions.declaration); const preProgram = !skipErrorComparison ? ts.createProgram({ rootNames: rootFiles || [], options: { ...compilerOptions, configFile: compilerOptions.configFile, traceResolution: false }, host, typeScriptVersion }) : undefined; - const preErrors = preProgram && ts.getPreEmitDiagnostics(preProgram); + let preErrors = preProgram && ts.getPreEmitDiagnostics(preProgram); + if (preProgram && captureSuggestions) { + preErrors = ts.concatenate(preErrors, ts.flatMap(preProgram.getSourceFiles(), f => preProgram.getSuggestionDiagnostics(f))); + } const program = ts.createProgram({ rootNames: rootFiles || [], options: compilerOptions, host, typeScriptVersion }); const emitResult = program.emit(); - const postErrors = ts.getPreEmitDiagnostics(program); + let postErrors = ts.getPreEmitDiagnostics(program); + if (captureSuggestions) { + postErrors = ts.concatenate(postErrors, ts.flatMap(program.getSourceFiles(), f => program.getSuggestionDiagnostics(f))); + } const longerErrors = ts.length(preErrors) > postErrors.length ? preErrors : postErrors; const shorterErrors = longerErrors === preErrors ? postErrors : preErrors; const errors = preErrors && (preErrors.length !== postErrors.length) ? [ diff --git a/src/harness/harnessIO.ts b/src/harness/harnessIO.ts index e27cf3cf949c0..32b5c1e42811f 100644 --- a/src/harness/harnessIO.ts +++ b/src/harness/harnessIO.ts @@ -282,6 +282,7 @@ export namespace Compiler { baselineFile?: string; libFiles?: string; noTypesAndSymbols?: boolean; + captureSuggestions?: boolean; } // Additional options not already in ts.optionDeclarations @@ -303,6 +304,7 @@ export namespace Compiler { { name: "fullEmitPaths", type: "boolean", defaultValueDescription: false }, { name: "noCheck", type: "boolean", defaultValueDescription: false }, { name: "reportDiagnostics", type: "boolean", defaultValueDescription: false }, // used to enable error collection in `transpile` baselines + { name: "captureSuggestions", type: "boolean", defaultValueDescription: false }, // Adds suggestion diagnostics to error baselines ]; let optionsIndex: Map; @@ -428,7 +430,7 @@ export namespace Compiler { ts.assign(options, ts.convertToOptionsWithAbsolutePaths(options, path => ts.getNormalizedAbsolutePath(path, currentDirectory))); const host = new fakes.CompilerHost(fs, options); - const result = compiler.compileFiles(host, programFileNames, options, typeScriptVersion); + const result = compiler.compileFiles(host, programFileNames, options, typeScriptVersion, harnessSettings?.captureSuggestions === "true"); result.symlinks = symlinks; (result as CompileFilesResult).repeat = newOptions => compileFiles(inputFiles, otherFiles, { ...harnessSettings, ...newOptions }, compilerOptions, originalCurrentDirectory, symlinks); return result as CompileFilesResult; diff --git a/tests/baselines/reference/overshifts.errors.txt b/tests/baselines/reference/overshifts.errors.txt new file mode 100644 index 0000000000000..dde392d2fda17 --- /dev/null +++ b/tests/baselines/reference/overshifts.errors.txt @@ -0,0 +1,253 @@ +overshifts.ts(2,1): suggestion TS6807: This operation can be simplified. This shift is identical to `1 << 0`. +overshifts.ts(3,1): suggestion TS6807: This operation can be simplified. This shift is identical to `1 << 27`. +overshifts.ts(4,1): suggestion TS6807: This operation can be simplified. This shift is identical to `1 << 0`. +overshifts.ts(6,1): suggestion TS6807: This operation can be simplified. This shift is identical to `1 << 0`. +overshifts.ts(7,1): suggestion TS6807: This operation can be simplified. This shift is identical to `1 << -27`. +overshifts.ts(8,1): suggestion TS6807: This operation can be simplified. This shift is identical to `1 << 0`. +overshifts.ts(11,1): suggestion TS6807: This operation can be simplified. This shift is identical to `0xFF_FF_FF_FF >> 0`. +overshifts.ts(12,1): suggestion TS6807: This operation can be simplified. This shift is identical to `0xFF_FF_FF_FF >> 27`. +overshifts.ts(13,1): suggestion TS6807: This operation can be simplified. This shift is identical to `0xFF_FF_FF_FF >> 0`. +overshifts.ts(15,1): suggestion TS6807: This operation can be simplified. This shift is identical to `0xFF_FF_FF_FF >> 0`. +overshifts.ts(16,1): suggestion TS6807: This operation can be simplified. This shift is identical to `0xFF_FF_FF_FF >> -27`. +overshifts.ts(17,1): suggestion TS6807: This operation can be simplified. This shift is identical to `0xFF_FF_FF_FF >> 0`. +overshifts.ts(20,1): suggestion TS6807: This operation can be simplified. This shift is identical to `0xFF_FF_FF_FF >>> 0`. +overshifts.ts(21,1): suggestion TS6807: This operation can be simplified. This shift is identical to `0xFF_FF_FF_FF >>> 27`. +overshifts.ts(22,1): suggestion TS6807: This operation can be simplified. This shift is identical to `0xFF_FF_FF_FF >>> 0`. +overshifts.ts(24,1): suggestion TS6807: This operation can be simplified. This shift is identical to `0xFF_FF_FF_FF >>> 0`. +overshifts.ts(25,1): suggestion TS6807: This operation can be simplified. This shift is identical to `0xFF_FF_FF_FF >>> -27`. +overshifts.ts(26,1): suggestion TS6807: This operation can be simplified. This shift is identical to `0xFF_FF_FF_FF >>> 0`. +overshifts.ts(30,1): suggestion TS6807: This operation can be simplified. This shift is identical to `x <<= 0`. +overshifts.ts(31,1): suggestion TS6807: This operation can be simplified. This shift is identical to `x <<= 27`. +overshifts.ts(32,1): suggestion TS6807: This operation can be simplified. This shift is identical to `x <<= 0`. +overshifts.ts(34,1): suggestion TS6807: This operation can be simplified. This shift is identical to `x <<= 0`. +overshifts.ts(35,1): suggestion TS6807: This operation can be simplified. This shift is identical to `x <<= -27`. +overshifts.ts(36,1): suggestion TS6807: This operation can be simplified. This shift is identical to `x <<= 0`. +overshifts.ts(39,1): suggestion TS6807: This operation can be simplified. This shift is identical to `x >>= 0`. +overshifts.ts(40,1): suggestion TS6807: This operation can be simplified. This shift is identical to `x >>= 27`. +overshifts.ts(41,1): suggestion TS6807: This operation can be simplified. This shift is identical to `x >>= 0`. +overshifts.ts(43,1): suggestion TS6807: This operation can be simplified. This shift is identical to `x >>= 0`. +overshifts.ts(44,1): suggestion TS6807: This operation can be simplified. This shift is identical to `x >>= -27`. +overshifts.ts(45,1): suggestion TS6807: This operation can be simplified. This shift is identical to `x >>= 0`. +overshifts.ts(48,1): suggestion TS6807: This operation can be simplified. This shift is identical to `x >>>= 0`. +overshifts.ts(49,1): suggestion TS6807: This operation can be simplified. This shift is identical to `x >>>= 27`. +overshifts.ts(50,1): suggestion TS6807: This operation can be simplified. This shift is identical to `x >>>= 0`. +overshifts.ts(52,1): suggestion TS6807: This operation can be simplified. This shift is identical to `x >>>= 0`. +overshifts.ts(53,1): suggestion TS6807: This operation can be simplified. This shift is identical to `x >>>= -27`. +overshifts.ts(54,1): suggestion TS6807: This operation can be simplified. This shift is identical to `x >>>= 0`. +overshifts.ts(58,9): error TS6807: This operation can be simplified. This shift is identical to `1 << 0`. +overshifts.ts(59,9): error TS6807: This operation can be simplified. This shift is identical to `1 << 27`. +overshifts.ts(60,9): error TS6807: This operation can be simplified. This shift is identical to `1 << 0`. +overshifts.ts(62,9): error TS6807: This operation can be simplified. This shift is identical to `1 << 0`. +overshifts.ts(63,9): error TS6807: This operation can be simplified. This shift is identical to `1 << -27`. +overshifts.ts(64,9): error TS6807: This operation can be simplified. This shift is identical to `1 << 0`. +overshifts.ts(69,9): error TS6807: This operation can be simplified. This shift is identical to `0xFF_FF_FF_FF >> 0`. +overshifts.ts(70,9): error TS6807: This operation can be simplified. This shift is identical to `0xFF_FF_FF_FF >> 27`. +overshifts.ts(71,9): error TS6807: This operation can be simplified. This shift is identical to `0xFF_FF_FF_FF >> 0`. +overshifts.ts(73,9): error TS6807: This operation can be simplified. This shift is identical to `0xFF_FF_FF_FF >> 0`. +overshifts.ts(74,9): error TS6807: This operation can be simplified. This shift is identical to `0xFF_FF_FF_FF >> -27`. +overshifts.ts(75,9): error TS6807: This operation can be simplified. This shift is identical to `0xFF_FF_FF_FF >> 0`. +overshifts.ts(80,9): error TS6807: This operation can be simplified. This shift is identical to `0xFF_FF_FF_FF >>> 0`. +overshifts.ts(81,9): error TS6807: This operation can be simplified. This shift is identical to `0xFF_FF_FF_FF >>> 27`. +overshifts.ts(82,9): error TS6807: This operation can be simplified. This shift is identical to `0xFF_FF_FF_FF >>> 0`. +overshifts.ts(84,9): error TS6807: This operation can be simplified. This shift is identical to `0xFF_FF_FF_FF >>> 0`. +overshifts.ts(85,9): error TS6807: This operation can be simplified. This shift is identical to `0xFF_FF_FF_FF >>> -27`. +overshifts.ts(86,9): error TS6807: This operation can be simplified. This shift is identical to `0xFF_FF_FF_FF >>> 0`. + + +==== overshifts.ts (54 errors) ==== + 1 << 1; // ok + 1 << 32; // overshift + ~~~~~~~ +!!! suggestion TS6807: This operation can be simplified. This shift is identical to `1 << 0`. + 1 << 123; + ~~~~~~~~ +!!! suggestion TS6807: This operation can be simplified. This shift is identical to `1 << 27`. + 1 << 1024; + ~~~~~~~~~ +!!! suggestion TS6807: This operation can be simplified. This shift is identical to `1 << 0`. + 1 << -1; // OK-ish + 1 << -32; // backwards overshift + ~~~~~~~~ +!!! suggestion TS6807: This operation can be simplified. This shift is identical to `1 << 0`. + 1 << -123; + ~~~~~~~~~ +!!! suggestion TS6807: This operation can be simplified. This shift is identical to `1 << -27`. + 1 << -1024; + ~~~~~~~~~~ +!!! suggestion TS6807: This operation can be simplified. This shift is identical to `1 << 0`. + + 0xFF_FF_FF_FF >> 1; // ok + 0xFF_FF_FF_FF >> 32; // overshift + ~~~~~~~~~~~~~~~~~~~ +!!! suggestion TS6807: This operation can be simplified. This shift is identical to `0xFF_FF_FF_FF >> 0`. + 0xFF_FF_FF_FF >> 123; + ~~~~~~~~~~~~~~~~~~~~ +!!! suggestion TS6807: This operation can be simplified. This shift is identical to `0xFF_FF_FF_FF >> 27`. + 0xFF_FF_FF_FF >> 1024; + ~~~~~~~~~~~~~~~~~~~~~ +!!! suggestion TS6807: This operation can be simplified. This shift is identical to `0xFF_FF_FF_FF >> 0`. + 0xFF_FF_FF_FF >> -1; // OK-ish + 0xFF_FF_FF_FF >> -32; // backwards overshift + ~~~~~~~~~~~~~~~~~~~~ +!!! suggestion TS6807: This operation can be simplified. This shift is identical to `0xFF_FF_FF_FF >> 0`. + 0xFF_FF_FF_FF >> -123; + ~~~~~~~~~~~~~~~~~~~~~ +!!! suggestion TS6807: This operation can be simplified. This shift is identical to `0xFF_FF_FF_FF >> -27`. + 0xFF_FF_FF_FF >> -1024; + ~~~~~~~~~~~~~~~~~~~~~~ +!!! suggestion TS6807: This operation can be simplified. This shift is identical to `0xFF_FF_FF_FF >> 0`. + + 0xFF_FF_FF_FF >>> 1; // ok + 0xFF_FF_FF_FF >>> 32; // overshift + ~~~~~~~~~~~~~~~~~~~~ +!!! suggestion TS6807: This operation can be simplified. This shift is identical to `0xFF_FF_FF_FF >>> 0`. + 0xFF_FF_FF_FF >>> 123; + ~~~~~~~~~~~~~~~~~~~~~ +!!! suggestion TS6807: This operation can be simplified. This shift is identical to `0xFF_FF_FF_FF >>> 27`. + 0xFF_FF_FF_FF >>> 1024; + ~~~~~~~~~~~~~~~~~~~~~~ +!!! suggestion TS6807: This operation can be simplified. This shift is identical to `0xFF_FF_FF_FF >>> 0`. + 0xFF_FF_FF_FF >>> -1; // OK-ish + 0xFF_FF_FF_FF >>> -32; // backwards overshift + ~~~~~~~~~~~~~~~~~~~~~ +!!! suggestion TS6807: This operation can be simplified. This shift is identical to `0xFF_FF_FF_FF >>> 0`. + 0xFF_FF_FF_FF >>> -123; + ~~~~~~~~~~~~~~~~~~~~~~ +!!! suggestion TS6807: This operation can be simplified. This shift is identical to `0xFF_FF_FF_FF >>> -27`. + 0xFF_FF_FF_FF >>> -1024; + ~~~~~~~~~~~~~~~~~~~~~~~ +!!! suggestion TS6807: This operation can be simplified. This shift is identical to `0xFF_FF_FF_FF >>> 0`. + + let x = 1; + x <<= 1; // ok + x <<= 32; // overshift + ~~~~~~~~ +!!! suggestion TS6807: This operation can be simplified. This shift is identical to `x <<= 0`. + x <<= 123; + ~~~~~~~~~ +!!! suggestion TS6807: This operation can be simplified. This shift is identical to `x <<= 27`. + x <<= 1024; + ~~~~~~~~~~ +!!! suggestion TS6807: This operation can be simplified. This shift is identical to `x <<= 0`. + x <<= -1; // OK-ish + x <<= -32; // backwards overshift + ~~~~~~~~~ +!!! suggestion TS6807: This operation can be simplified. This shift is identical to `x <<= 0`. + x <<= -123; + ~~~~~~~~~~ +!!! suggestion TS6807: This operation can be simplified. This shift is identical to `x <<= -27`. + x <<= -1024; + ~~~~~~~~~~~ +!!! suggestion TS6807: This operation can be simplified. This shift is identical to `x <<= 0`. + + x >>= 1; // ok + x >>= 32; // overshift + ~~~~~~~~ +!!! suggestion TS6807: This operation can be simplified. This shift is identical to `x >>= 0`. + x >>= 123; + ~~~~~~~~~ +!!! suggestion TS6807: This operation can be simplified. This shift is identical to `x >>= 27`. + x >>= 1024; + ~~~~~~~~~~ +!!! suggestion TS6807: This operation can be simplified. This shift is identical to `x >>= 0`. + x >>= -1; // OK-ish + x >>= -32; // backwards overshift + ~~~~~~~~~ +!!! suggestion TS6807: This operation can be simplified. This shift is identical to `x >>= 0`. + x >>= -123; + ~~~~~~~~~~ +!!! suggestion TS6807: This operation can be simplified. This shift is identical to `x >>= -27`. + x >>= -1024; + ~~~~~~~~~~~ +!!! suggestion TS6807: This operation can be simplified. This shift is identical to `x >>= 0`. + + x >>>= 1; // ok + x >>>= 32; // overshift + ~~~~~~~~~ +!!! suggestion TS6807: This operation can be simplified. This shift is identical to `x >>>= 0`. + x >>>= 123; + ~~~~~~~~~~ +!!! suggestion TS6807: This operation can be simplified. This shift is identical to `x >>>= 27`. + x >>>= 1024; + ~~~~~~~~~~~ +!!! suggestion TS6807: This operation can be simplified. This shift is identical to `x >>>= 0`. + x >>>= -1; // OK-ish + x >>>= -32; // backwards overshift + ~~~~~~~~~~ +!!! suggestion TS6807: This operation can be simplified. This shift is identical to `x >>>= 0`. + x >>>= -123; + ~~~~~~~~~~~ +!!! suggestion TS6807: This operation can be simplified. This shift is identical to `x >>>= -27`. + x >>>= -1024; + ~~~~~~~~~~~~ +!!! suggestion TS6807: This operation can be simplified. This shift is identical to `x >>>= 0`. + + enum One { + A = 1 << 1, // ok + B = 1 << 32, // overshift + ~~~~~~~ +!!! error TS6807: This operation can be simplified. This shift is identical to `1 << 0`. + C = 1 << 123, + ~~~~~~~~ +!!! error TS6807: This operation can be simplified. This shift is identical to `1 << 27`. + D = 1 << 1024, + ~~~~~~~~~ +!!! error TS6807: This operation can be simplified. This shift is identical to `1 << 0`. + E = 1 << -1, // OK-ish + F = 1 << -32, // backwards overshift + ~~~~~~~~ +!!! error TS6807: This operation can be simplified. This shift is identical to `1 << 0`. + G = 1 << -123, + ~~~~~~~~~ +!!! error TS6807: This operation can be simplified. This shift is identical to `1 << -27`. + H = 1 << -1024, + ~~~~~~~~~~ +!!! error TS6807: This operation can be simplified. This shift is identical to `1 << 0`. + } + + enum Two { + A = 0xFF_FF_FF_FF >> 1, // ok + B = 0xFF_FF_FF_FF >> 32, // overshift + ~~~~~~~~~~~~~~~~~~~ +!!! error TS6807: This operation can be simplified. This shift is identical to `0xFF_FF_FF_FF >> 0`. + C = 0xFF_FF_FF_FF >> 123, + ~~~~~~~~~~~~~~~~~~~~ +!!! error TS6807: This operation can be simplified. This shift is identical to `0xFF_FF_FF_FF >> 27`. + D = 0xFF_FF_FF_FF >> 1024, + ~~~~~~~~~~~~~~~~~~~~~ +!!! error TS6807: This operation can be simplified. This shift is identical to `0xFF_FF_FF_FF >> 0`. + E = 0xFF_FF_FF_FF >> -1, // OK-ish + F = 0xFF_FF_FF_FF >> -32, // backwards overshift + ~~~~~~~~~~~~~~~~~~~~ +!!! error TS6807: This operation can be simplified. This shift is identical to `0xFF_FF_FF_FF >> 0`. + G = 0xFF_FF_FF_FF >> -123, + ~~~~~~~~~~~~~~~~~~~~~ +!!! error TS6807: This operation can be simplified. This shift is identical to `0xFF_FF_FF_FF >> -27`. + H = 0xFF_FF_FF_FF >> -1024, + ~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS6807: This operation can be simplified. This shift is identical to `0xFF_FF_FF_FF >> 0`. + } + + enum Three { + A = 0xFF_FF_FF_FF >>> 1, // ok + B = 0xFF_FF_FF_FF >>> 32, // overshift + ~~~~~~~~~~~~~~~~~~~~ +!!! error TS6807: This operation can be simplified. This shift is identical to `0xFF_FF_FF_FF >>> 0`. + C = 0xFF_FF_FF_FF >>> 123, + ~~~~~~~~~~~~~~~~~~~~~ +!!! error TS6807: This operation can be simplified. This shift is identical to `0xFF_FF_FF_FF >>> 27`. + D = 0xFF_FF_FF_FF >>> 1024, + ~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS6807: This operation can be simplified. This shift is identical to `0xFF_FF_FF_FF >>> 0`. + E = 0xFF_FF_FF_FF >>> -1, // OK-ish + F = 0xFF_FF_FF_FF >>> -32, // backwards overshift + ~~~~~~~~~~~~~~~~~~~~~ +!!! error TS6807: This operation can be simplified. This shift is identical to `0xFF_FF_FF_FF >>> 0`. + G = 0xFF_FF_FF_FF >>> -123, + ~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS6807: This operation can be simplified. This shift is identical to `0xFF_FF_FF_FF >>> -27`. + H = 0xFF_FF_FF_FF >>> -1024, + ~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS6807: This operation can be simplified. This shift is identical to `0xFF_FF_FF_FF >>> 0`. + } + \ No newline at end of file diff --git a/tests/baselines/reference/overshifts.js b/tests/baselines/reference/overshifts.js new file mode 100644 index 0000000000000..4fec6ff6101e8 --- /dev/null +++ b/tests/baselines/reference/overshifts.js @@ -0,0 +1,175 @@ +//// [tests/cases/compiler/overshifts.ts] //// + +//// [overshifts.ts] +1 << 1; // ok +1 << 32; // overshift +1 << 123; +1 << 1024; +1 << -1; // OK-ish +1 << -32; // backwards overshift +1 << -123; +1 << -1024; + +0xFF_FF_FF_FF >> 1; // ok +0xFF_FF_FF_FF >> 32; // overshift +0xFF_FF_FF_FF >> 123; +0xFF_FF_FF_FF >> 1024; +0xFF_FF_FF_FF >> -1; // OK-ish +0xFF_FF_FF_FF >> -32; // backwards overshift +0xFF_FF_FF_FF >> -123; +0xFF_FF_FF_FF >> -1024; + +0xFF_FF_FF_FF >>> 1; // ok +0xFF_FF_FF_FF >>> 32; // overshift +0xFF_FF_FF_FF >>> 123; +0xFF_FF_FF_FF >>> 1024; +0xFF_FF_FF_FF >>> -1; // OK-ish +0xFF_FF_FF_FF >>> -32; // backwards overshift +0xFF_FF_FF_FF >>> -123; +0xFF_FF_FF_FF >>> -1024; + +let x = 1; +x <<= 1; // ok +x <<= 32; // overshift +x <<= 123; +x <<= 1024; +x <<= -1; // OK-ish +x <<= -32; // backwards overshift +x <<= -123; +x <<= -1024; + +x >>= 1; // ok +x >>= 32; // overshift +x >>= 123; +x >>= 1024; +x >>= -1; // OK-ish +x >>= -32; // backwards overshift +x >>= -123; +x >>= -1024; + +x >>>= 1; // ok +x >>>= 32; // overshift +x >>>= 123; +x >>>= 1024; +x >>>= -1; // OK-ish +x >>>= -32; // backwards overshift +x >>>= -123; +x >>>= -1024; + +enum One { + A = 1 << 1, // ok + B = 1 << 32, // overshift + C = 1 << 123, + D = 1 << 1024, + E = 1 << -1, // OK-ish + F = 1 << -32, // backwards overshift + G = 1 << -123, + H = 1 << -1024, +} + +enum Two { + A = 0xFF_FF_FF_FF >> 1, // ok + B = 0xFF_FF_FF_FF >> 32, // overshift + C = 0xFF_FF_FF_FF >> 123, + D = 0xFF_FF_FF_FF >> 1024, + E = 0xFF_FF_FF_FF >> -1, // OK-ish + F = 0xFF_FF_FF_FF >> -32, // backwards overshift + G = 0xFF_FF_FF_FF >> -123, + H = 0xFF_FF_FF_FF >> -1024, +} + +enum Three { + A = 0xFF_FF_FF_FF >>> 1, // ok + B = 0xFF_FF_FF_FF >>> 32, // overshift + C = 0xFF_FF_FF_FF >>> 123, + D = 0xFF_FF_FF_FF >>> 1024, + E = 0xFF_FF_FF_FF >>> -1, // OK-ish + F = 0xFF_FF_FF_FF >>> -32, // backwards overshift + G = 0xFF_FF_FF_FF >>> -123, + H = 0xFF_FF_FF_FF >>> -1024, +} + + +//// [overshifts.js] +1 << 1; // ok +1 << 32; // overshift +1 << 123; +1 << 1024; +1 << -1; // OK-ish +1 << -32; // backwards overshift +1 << -123; +1 << -1024; +4294967295 >> 1; // ok +4294967295 >> 32; // overshift +4294967295 >> 123; +4294967295 >> 1024; +4294967295 >> -1; // OK-ish +4294967295 >> -32; // backwards overshift +4294967295 >> -123; +4294967295 >> -1024; +4294967295 >>> 1; // ok +4294967295 >>> 32; // overshift +4294967295 >>> 123; +4294967295 >>> 1024; +4294967295 >>> -1; // OK-ish +4294967295 >>> -32; // backwards overshift +4294967295 >>> -123; +4294967295 >>> -1024; +var x = 1; +x <<= 1; // ok +x <<= 32; // overshift +x <<= 123; +x <<= 1024; +x <<= -1; // OK-ish +x <<= -32; // backwards overshift +x <<= -123; +x <<= -1024; +x >>= 1; // ok +x >>= 32; // overshift +x >>= 123; +x >>= 1024; +x >>= -1; // OK-ish +x >>= -32; // backwards overshift +x >>= -123; +x >>= -1024; +x >>>= 1; // ok +x >>>= 32; // overshift +x >>>= 123; +x >>>= 1024; +x >>>= -1; // OK-ish +x >>>= -32; // backwards overshift +x >>>= -123; +x >>>= -1024; +var One; +(function (One) { + One[One["A"] = 2] = "A"; + One[One["B"] = 1] = "B"; + One[One["C"] = 134217728] = "C"; + One[One["D"] = 1] = "D"; + One[One["E"] = -2147483648] = "E"; + One[One["F"] = 1] = "F"; + One[One["G"] = 32] = "G"; + One[One["H"] = 1] = "H"; +})(One || (One = {})); +var Two; +(function (Two) { + Two[Two["A"] = -1] = "A"; + Two[Two["B"] = -1] = "B"; + Two[Two["C"] = -1] = "C"; + Two[Two["D"] = -1] = "D"; + Two[Two["E"] = -1] = "E"; + Two[Two["F"] = -1] = "F"; + Two[Two["G"] = -1] = "G"; + Two[Two["H"] = -1] = "H"; +})(Two || (Two = {})); +var Three; +(function (Three) { + Three[Three["A"] = 2147483647] = "A"; + Three[Three["B"] = 4294967295] = "B"; + Three[Three["C"] = 31] = "C"; + Three[Three["D"] = 4294967295] = "D"; + Three[Three["E"] = 1] = "E"; + Three[Three["F"] = 4294967295] = "F"; + Three[Three["G"] = 134217727] = "G"; + Three[Three["H"] = 4294967295] = "H"; +})(Three || (Three = {})); diff --git a/tests/baselines/reference/overshifts.symbols b/tests/baselines/reference/overshifts.symbols new file mode 100644 index 0000000000000..c961b941e6ee9 --- /dev/null +++ b/tests/baselines/reference/overshifts.symbols @@ -0,0 +1,189 @@ +//// [tests/cases/compiler/overshifts.ts] //// + +=== overshifts.ts === +1 << 1; // ok +1 << 32; // overshift +1 << 123; +1 << 1024; +1 << -1; // OK-ish +1 << -32; // backwards overshift +1 << -123; +1 << -1024; + +0xFF_FF_FF_FF >> 1; // ok +0xFF_FF_FF_FF >> 32; // overshift +0xFF_FF_FF_FF >> 123; +0xFF_FF_FF_FF >> 1024; +0xFF_FF_FF_FF >> -1; // OK-ish +0xFF_FF_FF_FF >> -32; // backwards overshift +0xFF_FF_FF_FF >> -123; +0xFF_FF_FF_FF >> -1024; + +0xFF_FF_FF_FF >>> 1; // ok +0xFF_FF_FF_FF >>> 32; // overshift +0xFF_FF_FF_FF >>> 123; +0xFF_FF_FF_FF >>> 1024; +0xFF_FF_FF_FF >>> -1; // OK-ish +0xFF_FF_FF_FF >>> -32; // backwards overshift +0xFF_FF_FF_FF >>> -123; +0xFF_FF_FF_FF >>> -1024; + +let x = 1; +>x : Symbol(x, Decl(overshifts.ts, 27, 3)) + +x <<= 1; // ok +>x : Symbol(x, Decl(overshifts.ts, 27, 3)) + +x <<= 32; // overshift +>x : Symbol(x, Decl(overshifts.ts, 27, 3)) + +x <<= 123; +>x : Symbol(x, Decl(overshifts.ts, 27, 3)) + +x <<= 1024; +>x : Symbol(x, Decl(overshifts.ts, 27, 3)) + +x <<= -1; // OK-ish +>x : Symbol(x, Decl(overshifts.ts, 27, 3)) + +x <<= -32; // backwards overshift +>x : Symbol(x, Decl(overshifts.ts, 27, 3)) + +x <<= -123; +>x : Symbol(x, Decl(overshifts.ts, 27, 3)) + +x <<= -1024; +>x : Symbol(x, Decl(overshifts.ts, 27, 3)) + +x >>= 1; // ok +>x : Symbol(x, Decl(overshifts.ts, 27, 3)) + +x >>= 32; // overshift +>x : Symbol(x, Decl(overshifts.ts, 27, 3)) + +x >>= 123; +>x : Symbol(x, Decl(overshifts.ts, 27, 3)) + +x >>= 1024; +>x : Symbol(x, Decl(overshifts.ts, 27, 3)) + +x >>= -1; // OK-ish +>x : Symbol(x, Decl(overshifts.ts, 27, 3)) + +x >>= -32; // backwards overshift +>x : Symbol(x, Decl(overshifts.ts, 27, 3)) + +x >>= -123; +>x : Symbol(x, Decl(overshifts.ts, 27, 3)) + +x >>= -1024; +>x : Symbol(x, Decl(overshifts.ts, 27, 3)) + +x >>>= 1; // ok +>x : Symbol(x, Decl(overshifts.ts, 27, 3)) + +x >>>= 32; // overshift +>x : Symbol(x, Decl(overshifts.ts, 27, 3)) + +x >>>= 123; +>x : Symbol(x, Decl(overshifts.ts, 27, 3)) + +x >>>= 1024; +>x : Symbol(x, Decl(overshifts.ts, 27, 3)) + +x >>>= -1; // OK-ish +>x : Symbol(x, Decl(overshifts.ts, 27, 3)) + +x >>>= -32; // backwards overshift +>x : Symbol(x, Decl(overshifts.ts, 27, 3)) + +x >>>= -123; +>x : Symbol(x, Decl(overshifts.ts, 27, 3)) + +x >>>= -1024; +>x : Symbol(x, Decl(overshifts.ts, 27, 3)) + +enum One { +>One : Symbol(One, Decl(overshifts.ts, 53, 13)) + + A = 1 << 1, // ok +>A : Symbol(One.A, Decl(overshifts.ts, 55, 10)) + + B = 1 << 32, // overshift +>B : Symbol(One.B, Decl(overshifts.ts, 56, 15)) + + C = 1 << 123, +>C : Symbol(One.C, Decl(overshifts.ts, 57, 16)) + + D = 1 << 1024, +>D : Symbol(One.D, Decl(overshifts.ts, 58, 17)) + + E = 1 << -1, // OK-ish +>E : Symbol(One.E, Decl(overshifts.ts, 59, 18)) + + F = 1 << -32, // backwards overshift +>F : Symbol(One.F, Decl(overshifts.ts, 60, 16)) + + G = 1 << -123, +>G : Symbol(One.G, Decl(overshifts.ts, 61, 17)) + + H = 1 << -1024, +>H : Symbol(One.H, Decl(overshifts.ts, 62, 18)) +} + +enum Two { +>Two : Symbol(Two, Decl(overshifts.ts, 64, 1)) + + A = 0xFF_FF_FF_FF >> 1, // ok +>A : Symbol(Two.A, Decl(overshifts.ts, 66, 10)) + + B = 0xFF_FF_FF_FF >> 32, // overshift +>B : Symbol(Two.B, Decl(overshifts.ts, 67, 27)) + + C = 0xFF_FF_FF_FF >> 123, +>C : Symbol(Two.C, Decl(overshifts.ts, 68, 28)) + + D = 0xFF_FF_FF_FF >> 1024, +>D : Symbol(Two.D, Decl(overshifts.ts, 69, 29)) + + E = 0xFF_FF_FF_FF >> -1, // OK-ish +>E : Symbol(Two.E, Decl(overshifts.ts, 70, 30)) + + F = 0xFF_FF_FF_FF >> -32, // backwards overshift +>F : Symbol(Two.F, Decl(overshifts.ts, 71, 28)) + + G = 0xFF_FF_FF_FF >> -123, +>G : Symbol(Two.G, Decl(overshifts.ts, 72, 29)) + + H = 0xFF_FF_FF_FF >> -1024, +>H : Symbol(Two.H, Decl(overshifts.ts, 73, 30)) +} + +enum Three { +>Three : Symbol(Three, Decl(overshifts.ts, 75, 1)) + + A = 0xFF_FF_FF_FF >>> 1, // ok +>A : Symbol(Three.A, Decl(overshifts.ts, 77, 12)) + + B = 0xFF_FF_FF_FF >>> 32, // overshift +>B : Symbol(Three.B, Decl(overshifts.ts, 78, 28)) + + C = 0xFF_FF_FF_FF >>> 123, +>C : Symbol(Three.C, Decl(overshifts.ts, 79, 29)) + + D = 0xFF_FF_FF_FF >>> 1024, +>D : Symbol(Three.D, Decl(overshifts.ts, 80, 30)) + + E = 0xFF_FF_FF_FF >>> -1, // OK-ish +>E : Symbol(Three.E, Decl(overshifts.ts, 81, 31)) + + F = 0xFF_FF_FF_FF >>> -32, // backwards overshift +>F : Symbol(Three.F, Decl(overshifts.ts, 82, 29)) + + G = 0xFF_FF_FF_FF >>> -123, +>G : Symbol(Three.G, Decl(overshifts.ts, 83, 30)) + + H = 0xFF_FF_FF_FF >>> -1024, +>H : Symbol(Three.H, Decl(overshifts.ts, 84, 31)) +} + diff --git a/tests/baselines/reference/overshifts.types b/tests/baselines/reference/overshifts.types new file mode 100644 index 0000000000000..1ca923382065c --- /dev/null +++ b/tests/baselines/reference/overshifts.types @@ -0,0 +1,720 @@ +//// [tests/cases/compiler/overshifts.ts] //// + +=== overshifts.ts === +1 << 1; // ok +>1 << 1 : number +> : ^^^^^^ +>1 : 1 +> : ^ +>1 : 1 +> : ^ + +1 << 32; // overshift +>1 << 32 : number +> : ^^^^^^ +>1 : 1 +> : ^ +>32 : 32 +> : ^^ + +1 << 123; +>1 << 123 : number +> : ^^^^^^ +>1 : 1 +> : ^ +>123 : 123 +> : ^^^ + +1 << 1024; +>1 << 1024 : number +> : ^^^^^^ +>1 : 1 +> : ^ +>1024 : 1024 +> : ^^^^ + +1 << -1; // OK-ish +>1 << -1 : number +> : ^^^^^^ +>1 : 1 +> : ^ +>-1 : -1 +> : ^^ +>1 : 1 +> : ^ + +1 << -32; // backwards overshift +>1 << -32 : number +> : ^^^^^^ +>1 : 1 +> : ^ +>-32 : -32 +> : ^^^ +>32 : 32 +> : ^^ + +1 << -123; +>1 << -123 : number +> : ^^^^^^ +>1 : 1 +> : ^ +>-123 : -123 +> : ^^^^ +>123 : 123 +> : ^^^ + +1 << -1024; +>1 << -1024 : number +> : ^^^^^^ +>1 : 1 +> : ^ +>-1024 : -1024 +> : ^^^^^ +>1024 : 1024 +> : ^^^^ + +0xFF_FF_FF_FF >> 1; // ok +>0xFF_FF_FF_FF >> 1 : number +> : ^^^^^^ +>0xFF_FF_FF_FF : 4294967295 +> : ^^^^^^^^^^ +>1 : 1 +> : ^ + +0xFF_FF_FF_FF >> 32; // overshift +>0xFF_FF_FF_FF >> 32 : number +> : ^^^^^^ +>0xFF_FF_FF_FF : 4294967295 +> : ^^^^^^^^^^ +>32 : 32 +> : ^^ + +0xFF_FF_FF_FF >> 123; +>0xFF_FF_FF_FF >> 123 : number +> : ^^^^^^ +>0xFF_FF_FF_FF : 4294967295 +> : ^^^^^^^^^^ +>123 : 123 +> : ^^^ + +0xFF_FF_FF_FF >> 1024; +>0xFF_FF_FF_FF >> 1024 : number +> : ^^^^^^ +>0xFF_FF_FF_FF : 4294967295 +> : ^^^^^^^^^^ +>1024 : 1024 +> : ^^^^ + +0xFF_FF_FF_FF >> -1; // OK-ish +>0xFF_FF_FF_FF >> -1 : number +> : ^^^^^^ +>0xFF_FF_FF_FF : 4294967295 +> : ^^^^^^^^^^ +>-1 : -1 +> : ^^ +>1 : 1 +> : ^ + +0xFF_FF_FF_FF >> -32; // backwards overshift +>0xFF_FF_FF_FF >> -32 : number +> : ^^^^^^ +>0xFF_FF_FF_FF : 4294967295 +> : ^^^^^^^^^^ +>-32 : -32 +> : ^^^ +>32 : 32 +> : ^^ + +0xFF_FF_FF_FF >> -123; +>0xFF_FF_FF_FF >> -123 : number +> : ^^^^^^ +>0xFF_FF_FF_FF : 4294967295 +> : ^^^^^^^^^^ +>-123 : -123 +> : ^^^^ +>123 : 123 +> : ^^^ + +0xFF_FF_FF_FF >> -1024; +>0xFF_FF_FF_FF >> -1024 : number +> : ^^^^^^ +>0xFF_FF_FF_FF : 4294967295 +> : ^^^^^^^^^^ +>-1024 : -1024 +> : ^^^^^ +>1024 : 1024 +> : ^^^^ + +0xFF_FF_FF_FF >>> 1; // ok +>0xFF_FF_FF_FF >>> 1 : number +> : ^^^^^^ +>0xFF_FF_FF_FF : 4294967295 +> : ^^^^^^^^^^ +>1 : 1 +> : ^ + +0xFF_FF_FF_FF >>> 32; // overshift +>0xFF_FF_FF_FF >>> 32 : number +> : ^^^^^^ +>0xFF_FF_FF_FF : 4294967295 +> : ^^^^^^^^^^ +>32 : 32 +> : ^^ + +0xFF_FF_FF_FF >>> 123; +>0xFF_FF_FF_FF >>> 123 : number +> : ^^^^^^ +>0xFF_FF_FF_FF : 4294967295 +> : ^^^^^^^^^^ +>123 : 123 +> : ^^^ + +0xFF_FF_FF_FF >>> 1024; +>0xFF_FF_FF_FF >>> 1024 : number +> : ^^^^^^ +>0xFF_FF_FF_FF : 4294967295 +> : ^^^^^^^^^^ +>1024 : 1024 +> : ^^^^ + +0xFF_FF_FF_FF >>> -1; // OK-ish +>0xFF_FF_FF_FF >>> -1 : number +> : ^^^^^^ +>0xFF_FF_FF_FF : 4294967295 +> : ^^^^^^^^^^ +>-1 : -1 +> : ^^ +>1 : 1 +> : ^ + +0xFF_FF_FF_FF >>> -32; // backwards overshift +>0xFF_FF_FF_FF >>> -32 : number +> : ^^^^^^ +>0xFF_FF_FF_FF : 4294967295 +> : ^^^^^^^^^^ +>-32 : -32 +> : ^^^ +>32 : 32 +> : ^^ + +0xFF_FF_FF_FF >>> -123; +>0xFF_FF_FF_FF >>> -123 : number +> : ^^^^^^ +>0xFF_FF_FF_FF : 4294967295 +> : ^^^^^^^^^^ +>-123 : -123 +> : ^^^^ +>123 : 123 +> : ^^^ + +0xFF_FF_FF_FF >>> -1024; +>0xFF_FF_FF_FF >>> -1024 : number +> : ^^^^^^ +>0xFF_FF_FF_FF : 4294967295 +> : ^^^^^^^^^^ +>-1024 : -1024 +> : ^^^^^ +>1024 : 1024 +> : ^^^^ + +let x = 1; +>x : number +> : ^^^^^^ +>1 : 1 +> : ^ + +x <<= 1; // ok +>x <<= 1 : number +> : ^^^^^^ +>x : number +> : ^^^^^^ +>1 : 1 +> : ^ + +x <<= 32; // overshift +>x <<= 32 : number +> : ^^^^^^ +>x : number +> : ^^^^^^ +>32 : 32 +> : ^^ + +x <<= 123; +>x <<= 123 : number +> : ^^^^^^ +>x : number +> : ^^^^^^ +>123 : 123 +> : ^^^ + +x <<= 1024; +>x <<= 1024 : number +> : ^^^^^^ +>x : number +> : ^^^^^^ +>1024 : 1024 +> : ^^^^ + +x <<= -1; // OK-ish +>x <<= -1 : number +> : ^^^^^^ +>x : number +> : ^^^^^^ +>-1 : -1 +> : ^^ +>1 : 1 +> : ^ + +x <<= -32; // backwards overshift +>x <<= -32 : number +> : ^^^^^^ +>x : number +> : ^^^^^^ +>-32 : -32 +> : ^^^ +>32 : 32 +> : ^^ + +x <<= -123; +>x <<= -123 : number +> : ^^^^^^ +>x : number +> : ^^^^^^ +>-123 : -123 +> : ^^^^ +>123 : 123 +> : ^^^ + +x <<= -1024; +>x <<= -1024 : number +> : ^^^^^^ +>x : number +> : ^^^^^^ +>-1024 : -1024 +> : ^^^^^ +>1024 : 1024 +> : ^^^^ + +x >>= 1; // ok +>x >>= 1 : number +> : ^^^^^^ +>x : number +> : ^^^^^^ +>1 : 1 +> : ^ + +x >>= 32; // overshift +>x >>= 32 : number +> : ^^^^^^ +>x : number +> : ^^^^^^ +>32 : 32 +> : ^^ + +x >>= 123; +>x >>= 123 : number +> : ^^^^^^ +>x : number +> : ^^^^^^ +>123 : 123 +> : ^^^ + +x >>= 1024; +>x >>= 1024 : number +> : ^^^^^^ +>x : number +> : ^^^^^^ +>1024 : 1024 +> : ^^^^ + +x >>= -1; // OK-ish +>x >>= -1 : number +> : ^^^^^^ +>x : number +> : ^^^^^^ +>-1 : -1 +> : ^^ +>1 : 1 +> : ^ + +x >>= -32; // backwards overshift +>x >>= -32 : number +> : ^^^^^^ +>x : number +> : ^^^^^^ +>-32 : -32 +> : ^^^ +>32 : 32 +> : ^^ + +x >>= -123; +>x >>= -123 : number +> : ^^^^^^ +>x : number +> : ^^^^^^ +>-123 : -123 +> : ^^^^ +>123 : 123 +> : ^^^ + +x >>= -1024; +>x >>= -1024 : number +> : ^^^^^^ +>x : number +> : ^^^^^^ +>-1024 : -1024 +> : ^^^^^ +>1024 : 1024 +> : ^^^^ + +x >>>= 1; // ok +>x >>>= 1 : number +> : ^^^^^^ +>x : number +> : ^^^^^^ +>1 : 1 +> : ^ + +x >>>= 32; // overshift +>x >>>= 32 : number +> : ^^^^^^ +>x : number +> : ^^^^^^ +>32 : 32 +> : ^^ + +x >>>= 123; +>x >>>= 123 : number +> : ^^^^^^ +>x : number +> : ^^^^^^ +>123 : 123 +> : ^^^ + +x >>>= 1024; +>x >>>= 1024 : number +> : ^^^^^^ +>x : number +> : ^^^^^^ +>1024 : 1024 +> : ^^^^ + +x >>>= -1; // OK-ish +>x >>>= -1 : number +> : ^^^^^^ +>x : number +> : ^^^^^^ +>-1 : -1 +> : ^^ +>1 : 1 +> : ^ + +x >>>= -32; // backwards overshift +>x >>>= -32 : number +> : ^^^^^^ +>x : number +> : ^^^^^^ +>-32 : -32 +> : ^^^ +>32 : 32 +> : ^^ + +x >>>= -123; +>x >>>= -123 : number +> : ^^^^^^ +>x : number +> : ^^^^^^ +>-123 : -123 +> : ^^^^ +>123 : 123 +> : ^^^ + +x >>>= -1024; +>x >>>= -1024 : number +> : ^^^^^^ +>x : number +> : ^^^^^^ +>-1024 : -1024 +> : ^^^^^ +>1024 : 1024 +> : ^^^^ + +enum One { +>One : One +> : ^^^ + + A = 1 << 1, // ok +>A : One.A +> : ^^^^^ +>1 << 1 : number +> : ^^^^^^ +>1 : 1 +> : ^ +>1 : 1 +> : ^ + + B = 1 << 32, // overshift +>B : One.B +> : ^^^^^ +>1 << 32 : number +> : ^^^^^^ +>1 : 1 +> : ^ +>32 : 32 +> : ^^ + + C = 1 << 123, +>C : One.C +> : ^^^^^ +>1 << 123 : number +> : ^^^^^^ +>1 : 1 +> : ^ +>123 : 123 +> : ^^^ + + D = 1 << 1024, +>D : One.B +> : ^^^^^ +>1 << 1024 : number +> : ^^^^^^ +>1 : 1 +> : ^ +>1024 : 1024 +> : ^^^^ + + E = 1 << -1, // OK-ish +>E : One.E +> : ^^^^^ +>1 << -1 : number +> : ^^^^^^ +>1 : 1 +> : ^ +>-1 : -1 +> : ^^ +>1 : 1 +> : ^ + + F = 1 << -32, // backwards overshift +>F : One.B +> : ^^^^^ +>1 << -32 : number +> : ^^^^^^ +>1 : 1 +> : ^ +>-32 : -32 +> : ^^^ +>32 : 32 +> : ^^ + + G = 1 << -123, +>G : One.G +> : ^^^^^ +>1 << -123 : number +> : ^^^^^^ +>1 : 1 +> : ^ +>-123 : -123 +> : ^^^^ +>123 : 123 +> : ^^^ + + H = 1 << -1024, +>H : One.B +> : ^^^^^ +>1 << -1024 : number +> : ^^^^^^ +>1 : 1 +> : ^ +>-1024 : -1024 +> : ^^^^^ +>1024 : 1024 +> : ^^^^ +} + +enum Two { +>Two : Two +> : ^^^ + + A = 0xFF_FF_FF_FF >> 1, // ok +>A : Two.A +> : ^^^^^ +>0xFF_FF_FF_FF >> 1 : number +> : ^^^^^^ +>0xFF_FF_FF_FF : 4294967295 +> : ^^^^^^^^^^ +>1 : 1 +> : ^ + + B = 0xFF_FF_FF_FF >> 32, // overshift +>B : Two.A +> : ^^^^^ +>0xFF_FF_FF_FF >> 32 : number +> : ^^^^^^ +>0xFF_FF_FF_FF : 4294967295 +> : ^^^^^^^^^^ +>32 : 32 +> : ^^ + + C = 0xFF_FF_FF_FF >> 123, +>C : Two.A +> : ^^^^^ +>0xFF_FF_FF_FF >> 123 : number +> : ^^^^^^ +>0xFF_FF_FF_FF : 4294967295 +> : ^^^^^^^^^^ +>123 : 123 +> : ^^^ + + D = 0xFF_FF_FF_FF >> 1024, +>D : Two.A +> : ^^^^^ +>0xFF_FF_FF_FF >> 1024 : number +> : ^^^^^^ +>0xFF_FF_FF_FF : 4294967295 +> : ^^^^^^^^^^ +>1024 : 1024 +> : ^^^^ + + E = 0xFF_FF_FF_FF >> -1, // OK-ish +>E : Two.A +> : ^^^^^ +>0xFF_FF_FF_FF >> -1 : number +> : ^^^^^^ +>0xFF_FF_FF_FF : 4294967295 +> : ^^^^^^^^^^ +>-1 : -1 +> : ^^ +>1 : 1 +> : ^ + + F = 0xFF_FF_FF_FF >> -32, // backwards overshift +>F : Two.A +> : ^^^^^ +>0xFF_FF_FF_FF >> -32 : number +> : ^^^^^^ +>0xFF_FF_FF_FF : 4294967295 +> : ^^^^^^^^^^ +>-32 : -32 +> : ^^^ +>32 : 32 +> : ^^ + + G = 0xFF_FF_FF_FF >> -123, +>G : Two.A +> : ^^^^^ +>0xFF_FF_FF_FF >> -123 : number +> : ^^^^^^ +>0xFF_FF_FF_FF : 4294967295 +> : ^^^^^^^^^^ +>-123 : -123 +> : ^^^^ +>123 : 123 +> : ^^^ + + H = 0xFF_FF_FF_FF >> -1024, +>H : Two.A +> : ^^^^^ +>0xFF_FF_FF_FF >> -1024 : number +> : ^^^^^^ +>0xFF_FF_FF_FF : 4294967295 +> : ^^^^^^^^^^ +>-1024 : -1024 +> : ^^^^^ +>1024 : 1024 +> : ^^^^ +} + +enum Three { +>Three : Three +> : ^^^^^ + + A = 0xFF_FF_FF_FF >>> 1, // ok +>A : Three.A +> : ^^^^^^^ +>0xFF_FF_FF_FF >>> 1 : number +> : ^^^^^^ +>0xFF_FF_FF_FF : 4294967295 +> : ^^^^^^^^^^ +>1 : 1 +> : ^ + + B = 0xFF_FF_FF_FF >>> 32, // overshift +>B : Three.B +> : ^^^^^^^ +>0xFF_FF_FF_FF >>> 32 : number +> : ^^^^^^ +>0xFF_FF_FF_FF : 4294967295 +> : ^^^^^^^^^^ +>32 : 32 +> : ^^ + + C = 0xFF_FF_FF_FF >>> 123, +>C : Three.C +> : ^^^^^^^ +>0xFF_FF_FF_FF >>> 123 : number +> : ^^^^^^ +>0xFF_FF_FF_FF : 4294967295 +> : ^^^^^^^^^^ +>123 : 123 +> : ^^^ + + D = 0xFF_FF_FF_FF >>> 1024, +>D : Three.B +> : ^^^^^^^ +>0xFF_FF_FF_FF >>> 1024 : number +> : ^^^^^^ +>0xFF_FF_FF_FF : 4294967295 +> : ^^^^^^^^^^ +>1024 : 1024 +> : ^^^^ + + E = 0xFF_FF_FF_FF >>> -1, // OK-ish +>E : Three.E +> : ^^^^^^^ +>0xFF_FF_FF_FF >>> -1 : number +> : ^^^^^^ +>0xFF_FF_FF_FF : 4294967295 +> : ^^^^^^^^^^ +>-1 : -1 +> : ^^ +>1 : 1 +> : ^ + + F = 0xFF_FF_FF_FF >>> -32, // backwards overshift +>F : Three.B +> : ^^^^^^^ +>0xFF_FF_FF_FF >>> -32 : number +> : ^^^^^^ +>0xFF_FF_FF_FF : 4294967295 +> : ^^^^^^^^^^ +>-32 : -32 +> : ^^^ +>32 : 32 +> : ^^ + + G = 0xFF_FF_FF_FF >>> -123, +>G : Three.G +> : ^^^^^^^ +>0xFF_FF_FF_FF >>> -123 : number +> : ^^^^^^ +>0xFF_FF_FF_FF : 4294967295 +> : ^^^^^^^^^^ +>-123 : -123 +> : ^^^^ +>123 : 123 +> : ^^^ + + H = 0xFF_FF_FF_FF >>> -1024, +>H : Three.B +> : ^^^^^^^ +>0xFF_FF_FF_FF >>> -1024 : number +> : ^^^^^^ +>0xFF_FF_FF_FF : 4294967295 +> : ^^^^^^^^^^ +>-1024 : -1024 +> : ^^^^^ +>1024 : 1024 +> : ^^^^ +} + diff --git a/tests/cases/compiler/overshifts.ts b/tests/cases/compiler/overshifts.ts new file mode 100644 index 0000000000000..fdb22abb1f990 --- /dev/null +++ b/tests/cases/compiler/overshifts.ts @@ -0,0 +1,89 @@ +// @captureSuggestions: true + +1 << 1; // ok +1 << 32; // overshift +1 << 123; +1 << 1024; +1 << -1; // OK-ish +1 << -32; // backwards overshift +1 << -123; +1 << -1024; + +0xFF_FF_FF_FF >> 1; // ok +0xFF_FF_FF_FF >> 32; // overshift +0xFF_FF_FF_FF >> 123; +0xFF_FF_FF_FF >> 1024; +0xFF_FF_FF_FF >> -1; // OK-ish +0xFF_FF_FF_FF >> -32; // backwards overshift +0xFF_FF_FF_FF >> -123; +0xFF_FF_FF_FF >> -1024; + +0xFF_FF_FF_FF >>> 1; // ok +0xFF_FF_FF_FF >>> 32; // overshift +0xFF_FF_FF_FF >>> 123; +0xFF_FF_FF_FF >>> 1024; +0xFF_FF_FF_FF >>> -1; // OK-ish +0xFF_FF_FF_FF >>> -32; // backwards overshift +0xFF_FF_FF_FF >>> -123; +0xFF_FF_FF_FF >>> -1024; + +let x = 1; +x <<= 1; // ok +x <<= 32; // overshift +x <<= 123; +x <<= 1024; +x <<= -1; // OK-ish +x <<= -32; // backwards overshift +x <<= -123; +x <<= -1024; + +x >>= 1; // ok +x >>= 32; // overshift +x >>= 123; +x >>= 1024; +x >>= -1; // OK-ish +x >>= -32; // backwards overshift +x >>= -123; +x >>= -1024; + +x >>>= 1; // ok +x >>>= 32; // overshift +x >>>= 123; +x >>>= 1024; +x >>>= -1; // OK-ish +x >>>= -32; // backwards overshift +x >>>= -123; +x >>>= -1024; + +enum One { + A = 1 << 1, // ok + B = 1 << 32, // overshift + C = 1 << 123, + D = 1 << 1024, + E = 1 << -1, // OK-ish + F = 1 << -32, // backwards overshift + G = 1 << -123, + H = 1 << -1024, +} + +enum Two { + A = 0xFF_FF_FF_FF >> 1, // ok + B = 0xFF_FF_FF_FF >> 32, // overshift + C = 0xFF_FF_FF_FF >> 123, + D = 0xFF_FF_FF_FF >> 1024, + E = 0xFF_FF_FF_FF >> -1, // OK-ish + F = 0xFF_FF_FF_FF >> -32, // backwards overshift + G = 0xFF_FF_FF_FF >> -123, + H = 0xFF_FF_FF_FF >> -1024, +} + +enum Three { + A = 0xFF_FF_FF_FF >>> 1, // ok + B = 0xFF_FF_FF_FF >>> 32, // overshift + C = 0xFF_FF_FF_FF >>> 123, + D = 0xFF_FF_FF_FF >>> 1024, + E = 0xFF_FF_FF_FF >>> -1, // OK-ish + F = 0xFF_FF_FF_FF >>> -32, // backwards overshift + G = 0xFF_FF_FF_FF >>> -123, + H = 0xFF_FF_FF_FF >>> -1024, +} From 3a439401f75f8634b75aede2db8c8cb44bce9721 Mon Sep 17 00:00:00 2001 From: Wesley Wigham Date: Wed, 14 Aug 2024 13:08:22 -0700 Subject: [PATCH 33/50] Expand intersection reduction division strategy down to 3-member intersections (#59425) --- src/compiler/checker.ts | 4 +- .../reference/pickOfLargeObjectUnionWorks.js | 85 ++++++ .../pickOfLargeObjectUnionWorks.symbols | 226 ++++++++++++++ .../pickOfLargeObjectUnionWorks.types | 275 ++++++++++++++++++ .../compiler/pickOfLargeObjectUnionWorks.ts | 79 +++++ 5 files changed, 667 insertions(+), 2 deletions(-) create mode 100644 tests/baselines/reference/pickOfLargeObjectUnionWorks.js create mode 100644 tests/baselines/reference/pickOfLargeObjectUnionWorks.symbols create mode 100644 tests/baselines/reference/pickOfLargeObjectUnionWorks.types create mode 100644 tests/cases/compiler/pickOfLargeObjectUnionWorks.ts diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index a5bcfbd4fa976..1673c6c032716 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -18188,8 +18188,8 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { removeFromEach(typeSet, TypeFlags.Null); result = getUnionType([getIntersectionType(typeSet, flags), nullType], UnionReduction.Literal, aliasSymbol, aliasTypeArguments); } - else if (typeSet.length >= 4) { - // When we have four or more constituents, some of which are unions, we employ a "divide and conquer" strategy + else if (typeSet.length >= 3 && types.length > 2) { + // When we have three or more constituents, more than two inputs (to head off infinite reexpansion), some of which are unions, we employ a "divide and conquer" strategy // where A & B & C & D is processed as (A & B) & (C & D). Since intersections of unions often produce far smaller // unions of intersections than the full cartesian product (due to some intersections becoming `never`), this can // dramatically reduce the overall work. diff --git a/tests/baselines/reference/pickOfLargeObjectUnionWorks.js b/tests/baselines/reference/pickOfLargeObjectUnionWorks.js new file mode 100644 index 0000000000000..fbe9db615a0e7 --- /dev/null +++ b/tests/baselines/reference/pickOfLargeObjectUnionWorks.js @@ -0,0 +1,85 @@ +//// [tests/cases/compiler/pickOfLargeObjectUnionWorks.ts] //// + +//// [pickOfLargeObjectUnionWorks.ts] +interface HTMLDataAttributes { + [data: `data-${string}`]: unknown +} + +interface Base { + id: string; + prop01: string; + prop02: string; + prop03: string; + prop04: string; + prop05: string; + prop06: string; + prop07: string; + prop08: string; + prop09: string; + prop10: string; + prop11: string; + prop12: string; + prop13: string; + prop14: string; + prop15: string; + prop16: string; + prop17: string; + prop18: string; + prop19: string; + prop20: string; + prop21: string; + prop22: string; + prop23: string; + prop24: string; + prop25: string; + prop26: string; + prop27: string; + prop28: string; + prop29: string; + prop30: string; + prop31: string; + prop32: string; + prop33: string; + prop34: string; + prop35: string; + prop36: string; + prop37: string; + } + + interface A extends Base, HTMLDataAttributes { + a1: string; + a2: string; + a3: string; + a4: string; + a5: string; + a6: string; + a7: string; + a8: string; + } + + interface B extends Base, HTMLDataAttributes { + b1: string; + b2: string; + b3: string; + b4: string; + b5: string; + b6: string; + b7: string; + b8: string; + } + + interface C extends Base, HTMLDataAttributes { + c1: string; + c2: string; + c3: string; + c4: string; + c5: string; + c6: string; + c7: string; + c8: string; + } + + const xyz: Pick = {id: 'id'} + +//// [pickOfLargeObjectUnionWorks.js] +var xyz = { id: 'id' }; diff --git a/tests/baselines/reference/pickOfLargeObjectUnionWorks.symbols b/tests/baselines/reference/pickOfLargeObjectUnionWorks.symbols new file mode 100644 index 0000000000000..dae25147b997b --- /dev/null +++ b/tests/baselines/reference/pickOfLargeObjectUnionWorks.symbols @@ -0,0 +1,226 @@ +//// [tests/cases/compiler/pickOfLargeObjectUnionWorks.ts] //// + +=== pickOfLargeObjectUnionWorks.ts === +interface HTMLDataAttributes { +>HTMLDataAttributes : Symbol(HTMLDataAttributes, Decl(pickOfLargeObjectUnionWorks.ts, 0, 0)) + + [data: `data-${string}`]: unknown +>data : Symbol(data, Decl(pickOfLargeObjectUnionWorks.ts, 1, 5)) +} + +interface Base { +>Base : Symbol(Base, Decl(pickOfLargeObjectUnionWorks.ts, 2, 1)) + + id: string; +>id : Symbol(Base.id, Decl(pickOfLargeObjectUnionWorks.ts, 4, 16)) + + prop01: string; +>prop01 : Symbol(Base.prop01, Decl(pickOfLargeObjectUnionWorks.ts, 5, 15)) + + prop02: string; +>prop02 : Symbol(Base.prop02, Decl(pickOfLargeObjectUnionWorks.ts, 6, 19)) + + prop03: string; +>prop03 : Symbol(Base.prop03, Decl(pickOfLargeObjectUnionWorks.ts, 7, 19)) + + prop04: string; +>prop04 : Symbol(Base.prop04, Decl(pickOfLargeObjectUnionWorks.ts, 8, 19)) + + prop05: string; +>prop05 : Symbol(Base.prop05, Decl(pickOfLargeObjectUnionWorks.ts, 9, 19)) + + prop06: string; +>prop06 : Symbol(Base.prop06, Decl(pickOfLargeObjectUnionWorks.ts, 10, 19)) + + prop07: string; +>prop07 : Symbol(Base.prop07, Decl(pickOfLargeObjectUnionWorks.ts, 11, 19)) + + prop08: string; +>prop08 : Symbol(Base.prop08, Decl(pickOfLargeObjectUnionWorks.ts, 12, 19)) + + prop09: string; +>prop09 : Symbol(Base.prop09, Decl(pickOfLargeObjectUnionWorks.ts, 13, 19)) + + prop10: string; +>prop10 : Symbol(Base.prop10, Decl(pickOfLargeObjectUnionWorks.ts, 14, 19)) + + prop11: string; +>prop11 : Symbol(Base.prop11, Decl(pickOfLargeObjectUnionWorks.ts, 15, 19)) + + prop12: string; +>prop12 : Symbol(Base.prop12, Decl(pickOfLargeObjectUnionWorks.ts, 16, 19)) + + prop13: string; +>prop13 : Symbol(Base.prop13, Decl(pickOfLargeObjectUnionWorks.ts, 17, 19)) + + prop14: string; +>prop14 : Symbol(Base.prop14, Decl(pickOfLargeObjectUnionWorks.ts, 18, 19)) + + prop15: string; +>prop15 : Symbol(Base.prop15, Decl(pickOfLargeObjectUnionWorks.ts, 19, 19)) + + prop16: string; +>prop16 : Symbol(Base.prop16, Decl(pickOfLargeObjectUnionWorks.ts, 20, 19)) + + prop17: string; +>prop17 : Symbol(Base.prop17, Decl(pickOfLargeObjectUnionWorks.ts, 21, 19)) + + prop18: string; +>prop18 : Symbol(Base.prop18, Decl(pickOfLargeObjectUnionWorks.ts, 22, 19)) + + prop19: string; +>prop19 : Symbol(Base.prop19, Decl(pickOfLargeObjectUnionWorks.ts, 23, 19)) + + prop20: string; +>prop20 : Symbol(Base.prop20, Decl(pickOfLargeObjectUnionWorks.ts, 24, 19)) + + prop21: string; +>prop21 : Symbol(Base.prop21, Decl(pickOfLargeObjectUnionWorks.ts, 25, 19)) + + prop22: string; +>prop22 : Symbol(Base.prop22, Decl(pickOfLargeObjectUnionWorks.ts, 26, 19)) + + prop23: string; +>prop23 : Symbol(Base.prop23, Decl(pickOfLargeObjectUnionWorks.ts, 27, 19)) + + prop24: string; +>prop24 : Symbol(Base.prop24, Decl(pickOfLargeObjectUnionWorks.ts, 28, 19)) + + prop25: string; +>prop25 : Symbol(Base.prop25, Decl(pickOfLargeObjectUnionWorks.ts, 29, 19)) + + prop26: string; +>prop26 : Symbol(Base.prop26, Decl(pickOfLargeObjectUnionWorks.ts, 30, 19)) + + prop27: string; +>prop27 : Symbol(Base.prop27, Decl(pickOfLargeObjectUnionWorks.ts, 31, 19)) + + prop28: string; +>prop28 : Symbol(Base.prop28, Decl(pickOfLargeObjectUnionWorks.ts, 32, 19)) + + prop29: string; +>prop29 : Symbol(Base.prop29, Decl(pickOfLargeObjectUnionWorks.ts, 33, 19)) + + prop30: string; +>prop30 : Symbol(Base.prop30, Decl(pickOfLargeObjectUnionWorks.ts, 34, 19)) + + prop31: string; +>prop31 : Symbol(Base.prop31, Decl(pickOfLargeObjectUnionWorks.ts, 35, 19)) + + prop32: string; +>prop32 : Symbol(Base.prop32, Decl(pickOfLargeObjectUnionWorks.ts, 36, 19)) + + prop33: string; +>prop33 : Symbol(Base.prop33, Decl(pickOfLargeObjectUnionWorks.ts, 37, 19)) + + prop34: string; +>prop34 : Symbol(Base.prop34, Decl(pickOfLargeObjectUnionWorks.ts, 38, 19)) + + prop35: string; +>prop35 : Symbol(Base.prop35, Decl(pickOfLargeObjectUnionWorks.ts, 39, 19)) + + prop36: string; +>prop36 : Symbol(Base.prop36, Decl(pickOfLargeObjectUnionWorks.ts, 40, 19)) + + prop37: string; +>prop37 : Symbol(Base.prop37, Decl(pickOfLargeObjectUnionWorks.ts, 41, 19)) + } + + interface A extends Base, HTMLDataAttributes { +>A : Symbol(A, Decl(pickOfLargeObjectUnionWorks.ts, 43, 3)) +>Base : Symbol(Base, Decl(pickOfLargeObjectUnionWorks.ts, 2, 1)) +>HTMLDataAttributes : Symbol(HTMLDataAttributes, Decl(pickOfLargeObjectUnionWorks.ts, 0, 0)) + + a1: string; +>a1 : Symbol(A.a1, Decl(pickOfLargeObjectUnionWorks.ts, 45, 48)) + + a2: string; +>a2 : Symbol(A.a2, Decl(pickOfLargeObjectUnionWorks.ts, 46, 15)) + + a3: string; +>a3 : Symbol(A.a3, Decl(pickOfLargeObjectUnionWorks.ts, 47, 15)) + + a4: string; +>a4 : Symbol(A.a4, Decl(pickOfLargeObjectUnionWorks.ts, 48, 15)) + + a5: string; +>a5 : Symbol(A.a5, Decl(pickOfLargeObjectUnionWorks.ts, 49, 15)) + + a6: string; +>a6 : Symbol(A.a6, Decl(pickOfLargeObjectUnionWorks.ts, 50, 15)) + + a7: string; +>a7 : Symbol(A.a7, Decl(pickOfLargeObjectUnionWorks.ts, 51, 15)) + + a8: string; +>a8 : Symbol(A.a8, Decl(pickOfLargeObjectUnionWorks.ts, 52, 15)) + } + + interface B extends Base, HTMLDataAttributes { +>B : Symbol(B, Decl(pickOfLargeObjectUnionWorks.ts, 54, 3)) +>Base : Symbol(Base, Decl(pickOfLargeObjectUnionWorks.ts, 2, 1)) +>HTMLDataAttributes : Symbol(HTMLDataAttributes, Decl(pickOfLargeObjectUnionWorks.ts, 0, 0)) + + b1: string; +>b1 : Symbol(B.b1, Decl(pickOfLargeObjectUnionWorks.ts, 56, 48)) + + b2: string; +>b2 : Symbol(B.b2, Decl(pickOfLargeObjectUnionWorks.ts, 57, 15)) + + b3: string; +>b3 : Symbol(B.b3, Decl(pickOfLargeObjectUnionWorks.ts, 58, 15)) + + b4: string; +>b4 : Symbol(B.b4, Decl(pickOfLargeObjectUnionWorks.ts, 59, 15)) + + b5: string; +>b5 : Symbol(B.b5, Decl(pickOfLargeObjectUnionWorks.ts, 60, 15)) + + b6: string; +>b6 : Symbol(B.b6, Decl(pickOfLargeObjectUnionWorks.ts, 61, 15)) + + b7: string; +>b7 : Symbol(B.b7, Decl(pickOfLargeObjectUnionWorks.ts, 62, 15)) + + b8: string; +>b8 : Symbol(B.b8, Decl(pickOfLargeObjectUnionWorks.ts, 63, 15)) + } + + interface C extends Base, HTMLDataAttributes { +>C : Symbol(C, Decl(pickOfLargeObjectUnionWorks.ts, 65, 3)) +>Base : Symbol(Base, Decl(pickOfLargeObjectUnionWorks.ts, 2, 1)) +>HTMLDataAttributes : Symbol(HTMLDataAttributes, Decl(pickOfLargeObjectUnionWorks.ts, 0, 0)) + + c1: string; +>c1 : Symbol(C.c1, Decl(pickOfLargeObjectUnionWorks.ts, 67, 48)) + + c2: string; +>c2 : Symbol(C.c2, Decl(pickOfLargeObjectUnionWorks.ts, 68, 15)) + + c3: string; +>c3 : Symbol(C.c3, Decl(pickOfLargeObjectUnionWorks.ts, 69, 15)) + + c4: string; +>c4 : Symbol(C.c4, Decl(pickOfLargeObjectUnionWorks.ts, 70, 15)) + + c5: string; +>c5 : Symbol(C.c5, Decl(pickOfLargeObjectUnionWorks.ts, 71, 15)) + + c6: string; +>c6 : Symbol(C.c6, Decl(pickOfLargeObjectUnionWorks.ts, 72, 15)) + + c7: string; +>c7 : Symbol(C.c7, Decl(pickOfLargeObjectUnionWorks.ts, 73, 15)) + + c8: string; +>c8 : Symbol(C.c8, Decl(pickOfLargeObjectUnionWorks.ts, 74, 15)) + } + + const xyz: Pick = {id: 'id'} +>xyz : Symbol(xyz, Decl(pickOfLargeObjectUnionWorks.ts, 78, 7)) +>Pick : Symbol(Pick, Decl(lib.es5.d.ts, --, --)) +>A : Symbol(A, Decl(pickOfLargeObjectUnionWorks.ts, 43, 3)) +>B : Symbol(B, Decl(pickOfLargeObjectUnionWorks.ts, 54, 3)) +>C : Symbol(C, Decl(pickOfLargeObjectUnionWorks.ts, 65, 3)) +>id : Symbol(id, Decl(pickOfLargeObjectUnionWorks.ts, 78, 38)) + diff --git a/tests/baselines/reference/pickOfLargeObjectUnionWorks.types b/tests/baselines/reference/pickOfLargeObjectUnionWorks.types new file mode 100644 index 0000000000000..3a637bd997b8f --- /dev/null +++ b/tests/baselines/reference/pickOfLargeObjectUnionWorks.types @@ -0,0 +1,275 @@ +//// [tests/cases/compiler/pickOfLargeObjectUnionWorks.ts] //// + +=== pickOfLargeObjectUnionWorks.ts === +interface HTMLDataAttributes { + [data: `data-${string}`]: unknown +>data : `data-${string}` +> : ^^^^^^^^^^^^^^^^ +} + +interface Base { + id: string; +>id : string +> : ^^^^^^ + + prop01: string; +>prop01 : string +> : ^^^^^^ + + prop02: string; +>prop02 : string +> : ^^^^^^ + + prop03: string; +>prop03 : string +> : ^^^^^^ + + prop04: string; +>prop04 : string +> : ^^^^^^ + + prop05: string; +>prop05 : string +> : ^^^^^^ + + prop06: string; +>prop06 : string +> : ^^^^^^ + + prop07: string; +>prop07 : string +> : ^^^^^^ + + prop08: string; +>prop08 : string +> : ^^^^^^ + + prop09: string; +>prop09 : string +> : ^^^^^^ + + prop10: string; +>prop10 : string +> : ^^^^^^ + + prop11: string; +>prop11 : string +> : ^^^^^^ + + prop12: string; +>prop12 : string +> : ^^^^^^ + + prop13: string; +>prop13 : string +> : ^^^^^^ + + prop14: string; +>prop14 : string +> : ^^^^^^ + + prop15: string; +>prop15 : string +> : ^^^^^^ + + prop16: string; +>prop16 : string +> : ^^^^^^ + + prop17: string; +>prop17 : string +> : ^^^^^^ + + prop18: string; +>prop18 : string +> : ^^^^^^ + + prop19: string; +>prop19 : string +> : ^^^^^^ + + prop20: string; +>prop20 : string +> : ^^^^^^ + + prop21: string; +>prop21 : string +> : ^^^^^^ + + prop22: string; +>prop22 : string +> : ^^^^^^ + + prop23: string; +>prop23 : string +> : ^^^^^^ + + prop24: string; +>prop24 : string +> : ^^^^^^ + + prop25: string; +>prop25 : string +> : ^^^^^^ + + prop26: string; +>prop26 : string +> : ^^^^^^ + + prop27: string; +>prop27 : string +> : ^^^^^^ + + prop28: string; +>prop28 : string +> : ^^^^^^ + + prop29: string; +>prop29 : string +> : ^^^^^^ + + prop30: string; +>prop30 : string +> : ^^^^^^ + + prop31: string; +>prop31 : string +> : ^^^^^^ + + prop32: string; +>prop32 : string +> : ^^^^^^ + + prop33: string; +>prop33 : string +> : ^^^^^^ + + prop34: string; +>prop34 : string +> : ^^^^^^ + + prop35: string; +>prop35 : string +> : ^^^^^^ + + prop36: string; +>prop36 : string +> : ^^^^^^ + + prop37: string; +>prop37 : string +> : ^^^^^^ + } + + interface A extends Base, HTMLDataAttributes { + a1: string; +>a1 : string +> : ^^^^^^ + + a2: string; +>a2 : string +> : ^^^^^^ + + a3: string; +>a3 : string +> : ^^^^^^ + + a4: string; +>a4 : string +> : ^^^^^^ + + a5: string; +>a5 : string +> : ^^^^^^ + + a6: string; +>a6 : string +> : ^^^^^^ + + a7: string; +>a7 : string +> : ^^^^^^ + + a8: string; +>a8 : string +> : ^^^^^^ + } + + interface B extends Base, HTMLDataAttributes { + b1: string; +>b1 : string +> : ^^^^^^ + + b2: string; +>b2 : string +> : ^^^^^^ + + b3: string; +>b3 : string +> : ^^^^^^ + + b4: string; +>b4 : string +> : ^^^^^^ + + b5: string; +>b5 : string +> : ^^^^^^ + + b6: string; +>b6 : string +> : ^^^^^^ + + b7: string; +>b7 : string +> : ^^^^^^ + + b8: string; +>b8 : string +> : ^^^^^^ + } + + interface C extends Base, HTMLDataAttributes { + c1: string; +>c1 : string +> : ^^^^^^ + + c2: string; +>c2 : string +> : ^^^^^^ + + c3: string; +>c3 : string +> : ^^^^^^ + + c4: string; +>c4 : string +> : ^^^^^^ + + c5: string; +>c5 : string +> : ^^^^^^ + + c6: string; +>c6 : string +> : ^^^^^^ + + c7: string; +>c7 : string +> : ^^^^^^ + + c8: string; +>c8 : string +> : ^^^^^^ + } + + const xyz: Pick = {id: 'id'} +>xyz : Pick +> : ^^^^^^^^^^^^^^^^^^^^^ +>{id: 'id'} : { id: string; } +> : ^^^^^^^^^^^^^^^ +>id : string +> : ^^^^^^ +>'id' : "id" +> : ^^^^ + diff --git a/tests/cases/compiler/pickOfLargeObjectUnionWorks.ts b/tests/cases/compiler/pickOfLargeObjectUnionWorks.ts new file mode 100644 index 0000000000000..b416fac1ed680 --- /dev/null +++ b/tests/cases/compiler/pickOfLargeObjectUnionWorks.ts @@ -0,0 +1,79 @@ +interface HTMLDataAttributes { + [data: `data-${string}`]: unknown +} + +interface Base { + id: string; + prop01: string; + prop02: string; + prop03: string; + prop04: string; + prop05: string; + prop06: string; + prop07: string; + prop08: string; + prop09: string; + prop10: string; + prop11: string; + prop12: string; + prop13: string; + prop14: string; + prop15: string; + prop16: string; + prop17: string; + prop18: string; + prop19: string; + prop20: string; + prop21: string; + prop22: string; + prop23: string; + prop24: string; + prop25: string; + prop26: string; + prop27: string; + prop28: string; + prop29: string; + prop30: string; + prop31: string; + prop32: string; + prop33: string; + prop34: string; + prop35: string; + prop36: string; + prop37: string; + } + + interface A extends Base, HTMLDataAttributes { + a1: string; + a2: string; + a3: string; + a4: string; + a5: string; + a6: string; + a7: string; + a8: string; + } + + interface B extends Base, HTMLDataAttributes { + b1: string; + b2: string; + b3: string; + b4: string; + b5: string; + b6: string; + b7: string; + b8: string; + } + + interface C extends Base, HTMLDataAttributes { + c1: string; + c2: string; + c3: string; + c4: string; + c5: string; + c6: string; + c7: string; + c8: string; + } + + const xyz: Pick = {id: 'id'} \ No newline at end of file From 3ed2e8ed34419890228935f0cd59df80e7a10f1f Mon Sep 17 00:00:00 2001 From: Jake Bailey <5341706+jakebailey@users.noreply.github.com> Date: Wed, 14 Aug 2024 22:34:03 -0700 Subject: [PATCH 34/50] Report unreachable on enums (#58380) Co-authored-by: Daniel Rosenwasser --- src/compiler/binder.ts | 52 ++- .../reference/reachabilityChecks1.errors.txt | 12 +- ...tions(preserveconstenums=false).errors.txt | 137 ++++++ ...eDeclarations(preserveconstenums=false).js | 169 +++++++ ...arations(preserveconstenums=false).symbols | 245 ++++++++++ ...clarations(preserveconstenums=false).types | 442 ++++++++++++++++++ ...ations(preserveconstenums=true).errors.txt | 141 ++++++ ...leDeclarations(preserveconstenums=true).js | 177 +++++++ ...larations(preserveconstenums=true).symbols | 245 ++++++++++ ...eclarations(preserveconstenums=true).types | 442 ++++++++++++++++++ .../cases/compiler/unreachableDeclarations.ts | 89 ++++ .../cases/fourslash/codeFixUnreachableCode.ts | 3 +- 12 files changed, 2128 insertions(+), 26 deletions(-) create mode 100644 tests/baselines/reference/unreachableDeclarations(preserveconstenums=false).errors.txt create mode 100644 tests/baselines/reference/unreachableDeclarations(preserveconstenums=false).js create mode 100644 tests/baselines/reference/unreachableDeclarations(preserveconstenums=false).symbols create mode 100644 tests/baselines/reference/unreachableDeclarations(preserveconstenums=false).types create mode 100644 tests/baselines/reference/unreachableDeclarations(preserveconstenums=true).errors.txt create mode 100644 tests/baselines/reference/unreachableDeclarations(preserveconstenums=true).js create mode 100644 tests/baselines/reference/unreachableDeclarations(preserveconstenums=true).symbols create mode 100644 tests/baselines/reference/unreachableDeclarations(preserveconstenums=true).types create mode 100644 tests/cases/compiler/unreachableDeclarations.ts diff --git a/src/compiler/binder.ts b/src/compiler/binder.ts index 96c6e08f0f5ac..1666c90883e80 100644 --- a/src/compiler/binder.ts +++ b/src/compiler/binder.ts @@ -154,7 +154,6 @@ import { isEmptyObjectLiteral, isEntityNameExpression, isEnumConst, - isEnumDeclaration, isExportAssignment, isExportDeclaration, isExportsIdentifier, @@ -3789,7 +3788,9 @@ function createBinder(): (file: SourceFile, options: CompilerOptions) => void { (isStatementButNotDeclaration(node) && node.kind !== SyntaxKind.EmptyStatement) || // report error on class declarations node.kind === SyntaxKind.ClassDeclaration || - // report error on instantiated modules or const-enums only modules if preserveConstEnums is set + // report errors on enums with preserved emit + isEnumDeclarationWithPreservedEmit(node, options) || + // report error on instantiated modules (node.kind === SyntaxKind.ModuleDeclaration && shouldReportErrorOnModuleDeclaration(node as ModuleDeclaration)); if (reportError) { @@ -3813,7 +3814,7 @@ function createBinder(): (file: SourceFile, options: CompilerOptions) => void { node.declarationList.declarations.some(d => !!d.initializer) ); - eachUnreachableRange(node, (start, end) => errorOrSuggestionOnRange(isError, start, end, Diagnostics.Unreachable_code_detected)); + eachUnreachableRange(node, options, (start, end) => errorOrSuggestionOnRange(isError, start, end, Diagnostics.Unreachable_code_detected)); } } } @@ -3821,7 +3822,11 @@ function createBinder(): (file: SourceFile, options: CompilerOptions) => void { } } -function eachUnreachableRange(node: Node, cb: (start: Node, last: Node) => void): void { +function isEnumDeclarationWithPreservedEmit(node: Node, options: CompilerOptions): boolean { + return node.kind === SyntaxKind.EnumDeclaration && (!isEnumConst(node as EnumDeclaration) || shouldPreserveConstEnums(options)); +} + +function eachUnreachableRange(node: Node, options: CompilerOptions, cb: (start: Node, last: Node) => void): void { if (isStatement(node) && isExecutableStatement(node) && isBlock(node.parent)) { const { statements } = node.parent; const slice = sliceAfter(statements, node); @@ -3830,26 +3835,27 @@ function eachUnreachableRange(node: Node, cb: (start: Node, last: Node) => void) else { cb(node, node); } -} -// As opposed to a pure declaration like an `interface` -function isExecutableStatement(s: Statement): boolean { - // Don't remove statements that can validly be used before they appear. - return !isFunctionDeclaration(s) && !isPurelyTypeDeclaration(s) && !isEnumDeclaration(s) && - // `var x;` may declare a variable used above - !(isVariableStatement(s) && !(getCombinedNodeFlags(s) & (NodeFlags.BlockScoped)) && s.declarationList.declarations.some(d => !d.initializer)); -} -function isPurelyTypeDeclaration(s: Statement): boolean { - switch (s.kind) { - case SyntaxKind.InterfaceDeclaration: - case SyntaxKind.TypeAliasDeclaration: - return true; - case SyntaxKind.ModuleDeclaration: - return getModuleInstanceState(s as ModuleDeclaration) !== ModuleInstanceState.Instantiated; - case SyntaxKind.EnumDeclaration: - return hasSyntacticModifier(s, ModifierFlags.Const); - default: - return false; + // As opposed to a pure declaration like an `interface` + function isExecutableStatement(s: Statement): boolean { + // Don't remove statements that can validly be used before they appear. + return !isFunctionDeclaration(s) && !isPurelyTypeDeclaration(s) && + // `var x;` may declare a variable used above + !(isVariableStatement(s) && !(getCombinedNodeFlags(s) & (NodeFlags.BlockScoped)) && s.declarationList.declarations.some(d => !d.initializer)); + } + + function isPurelyTypeDeclaration(s: Statement): boolean { + switch (s.kind) { + case SyntaxKind.InterfaceDeclaration: + case SyntaxKind.TypeAliasDeclaration: + return true; + case SyntaxKind.ModuleDeclaration: + return getModuleInstanceState(s as ModuleDeclaration) !== ModuleInstanceState.Instantiated; + case SyntaxKind.EnumDeclaration: + return !isEnumDeclarationWithPreservedEmit(s, options); + default: + return false; + } } } diff --git a/tests/baselines/reference/reachabilityChecks1.errors.txt b/tests/baselines/reference/reachabilityChecks1.errors.txt index 7273652609490..d25977a05b774 100644 --- a/tests/baselines/reference/reachabilityChecks1.errors.txt +++ b/tests/baselines/reference/reachabilityChecks1.errors.txt @@ -3,9 +3,11 @@ reachabilityChecks1.ts(6,5): error TS7027: Unreachable code detected. reachabilityChecks1.ts(18,5): error TS7027: Unreachable code detected. reachabilityChecks1.ts(30,5): error TS7027: Unreachable code detected. reachabilityChecks1.ts(47,5): error TS7027: Unreachable code detected. +reachabilityChecks1.ts(60,5): error TS7027: Unreachable code detected. +reachabilityChecks1.ts(69,5): error TS7027: Unreachable code detected. -==== reachabilityChecks1.ts (5 errors) ==== +==== reachabilityChecks1.ts (7 errors) ==== while (true); var x = 1; ~~~~~~~~~~ @@ -81,8 +83,12 @@ reachabilityChecks1.ts(47,5): error TS7027: Unreachable code detected. do { } while (true); enum E { + ~~~~~~~~ X = 1 + ~~~~~~~~~~~~~ } + ~~~~~ +!!! error TS7027: Unreachable code detected. } function f4() { @@ -90,8 +96,12 @@ reachabilityChecks1.ts(47,5): error TS7027: Unreachable code detected. throw new Error(); } const enum E { + ~~~~~~~~~~~~~~ X = 1 + ~~~~~~~~~~~~~ } + ~~~~~ +!!! error TS7027: Unreachable code detected. } \ No newline at end of file diff --git a/tests/baselines/reference/unreachableDeclarations(preserveconstenums=false).errors.txt b/tests/baselines/reference/unreachableDeclarations(preserveconstenums=false).errors.txt new file mode 100644 index 0000000000000..fd7f5d66b9f4e --- /dev/null +++ b/tests/baselines/reference/unreachableDeclarations(preserveconstenums=false).errors.txt @@ -0,0 +1,137 @@ +unreachableDeclarations.ts(4,17): error TS2450: Enum 'EnumA' used before its declaration. +unreachableDeclarations.ts(14,5): error TS7027: Unreachable code detected. +unreachableDeclarations.ts(21,17): error TS2450: Enum 'EnumA' used before its declaration. +unreachableDeclarations.ts(29,5): error TS7027: Unreachable code detected. +unreachableDeclarations.ts(49,17): error TS2449: Class 'ClassA' used before its declaration. +unreachableDeclarations.ts(57,5): error TS7027: Unreachable code detected. +unreachableDeclarations.ts(63,14): error TS2450: Enum 'Bar' used before its declaration. +unreachableDeclarations.ts(64,14): error TS2448: Block-scoped variable 'blah' used before its declaration. +unreachableDeclarations.ts(64,14): error TS2454: Variable 'blah' is used before being assigned. +unreachableDeclarations.ts(65,18): error TS2449: Class 'Foo' used before its declaration. +unreachableDeclarations.ts(78,2): error TS7027: Unreachable code detected. +unreachableDeclarations.ts(84,2): error TS1235: A namespace declaration is only allowed at the top level of a namespace or module. + + +==== unreachableDeclarations.ts (12 errors) ==== + function func1() { + aFunc(); + + console.log(EnumA.Value); + ~~~~~ +!!! error TS2450: Enum 'EnumA' used before its declaration. +!!! related TS2728 unreachableDeclarations.ts:14:10: 'EnumA' is declared here. + console.log(EnumB.Value); + + return; + + function aFunc() { + console.log(EnumA.Value); + console.log(EnumB.Value); + } + + enum EnumA { Value } + ~~~~~~~~~~~~~~~~~~~~ +!!! error TS7027: Unreachable code detected. + const enum EnumB { Value } + } + + function func2() { + aFunc(); + + console.log(EnumA.Value); + ~~~~~ +!!! error TS2450: Enum 'EnumA' used before its declaration. +!!! related TS2728 unreachableDeclarations.ts:29:10: 'EnumA' is declared here. + + return; + + function aFunc() { + console.log(EnumA.Value); + } + + enum EnumA { Value } + ~~~~~~~~~~~~~~~~~~~~ +!!! error TS7027: Unreachable code detected. + } + + function func3() { + aFunc(); + + console.log(EnumB.Value); + + return; + + function aFunc() { + console.log(EnumB.Value); + } + + const enum EnumB { Value } + } + + function func4() { + aFunc(); + + console.log(ClassA.Value); + ~~~~~~ +!!! error TS2449: Class 'ClassA' used before its declaration. +!!! related TS2728 unreachableDeclarations.ts:57:11: 'ClassA' is declared here. + + return; + + function aFunc() { + console.log(ClassA.Value); + } + + class ClassA { static Value = 1234; } + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS7027: Unreachable code detected. + } + + function func5() { + aFunc(); + + console.log(Bar.A); + ~~~ +!!! error TS2450: Enum 'Bar' used before its declaration. +!!! related TS2728 unreachableDeclarations.ts:80:7: 'Bar' is declared here. + console.log(blah.prop); + ~~~~ +!!! error TS2448: Block-scoped variable 'blah' used before its declaration. +!!! related TS2728 unreachableDeclarations.ts:78:8: 'blah' is declared here. + ~~~~ +!!! error TS2454: Variable 'blah' is used before being assigned. + console.log(new Foo()) + ~~~ +!!! error TS2449: Class 'Foo' used before its declaration. +!!! related TS2728 unreachableDeclarations.ts:82:8: 'Foo' is declared here. + console.log(Baz.value); + + + return; + + function aFunc() { + console.log(Bar.A); + console.log(blah.prop); + console.log(new Foo()) + console.log(Baz.value); + } + + const blah = { prop: 1234 }; + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + + enum Bar { A } + ~~~~~~~~~~~~~~~ + + + class Foo { x = 1234 } + ~~~~~~~~~~~~~~~~~~~~~~~ + + + namespace Baz { export const value = 1234 } + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS7027: Unreachable code detected. + ~~~~~~~~~ +!!! error TS1235: A namespace declaration is only allowed at the top level of a namespace or module. + } + \ No newline at end of file diff --git a/tests/baselines/reference/unreachableDeclarations(preserveconstenums=false).js b/tests/baselines/reference/unreachableDeclarations(preserveconstenums=false).js new file mode 100644 index 0000000000000..945f427dae8ce --- /dev/null +++ b/tests/baselines/reference/unreachableDeclarations(preserveconstenums=false).js @@ -0,0 +1,169 @@ +//// [tests/cases/compiler/unreachableDeclarations.ts] //// + +//// [unreachableDeclarations.ts] +function func1() { + aFunc(); + + console.log(EnumA.Value); + console.log(EnumB.Value); + + return; + + function aFunc() { + console.log(EnumA.Value); + console.log(EnumB.Value); + } + + enum EnumA { Value } + const enum EnumB { Value } +} + +function func2() { + aFunc(); + + console.log(EnumA.Value); + + return; + + function aFunc() { + console.log(EnumA.Value); + } + + enum EnumA { Value } +} + +function func3() { + aFunc(); + + console.log(EnumB.Value); + + return; + + function aFunc() { + console.log(EnumB.Value); + } + + const enum EnumB { Value } +} + +function func4() { + aFunc(); + + console.log(ClassA.Value); + + return; + + function aFunc() { + console.log(ClassA.Value); + } + + class ClassA { static Value = 1234; } +} + +function func5() { + aFunc(); + + console.log(Bar.A); + console.log(blah.prop); + console.log(new Foo()) + console.log(Baz.value); + + + return; + + function aFunc() { + console.log(Bar.A); + console.log(blah.prop); + console.log(new Foo()) + console.log(Baz.value); + } + + const blah = { prop: 1234 }; + + enum Bar { A } + + class Foo { x = 1234 } + + namespace Baz { export const value = 1234 } +} + + +//// [unreachableDeclarations.js] +"use strict"; +function func1() { + aFunc(); + console.log(EnumA.Value); + console.log(0 /* EnumB.Value */); + return; + function aFunc() { + console.log(EnumA.Value); + console.log(0 /* EnumB.Value */); + } + var EnumA; + (function (EnumA) { + EnumA[EnumA["Value"] = 0] = "Value"; + })(EnumA || (EnumA = {})); +} +function func2() { + aFunc(); + console.log(EnumA.Value); + return; + function aFunc() { + console.log(EnumA.Value); + } + var EnumA; + (function (EnumA) { + EnumA[EnumA["Value"] = 0] = "Value"; + })(EnumA || (EnumA = {})); +} +function func3() { + aFunc(); + console.log(0 /* EnumB.Value */); + return; + function aFunc() { + console.log(0 /* EnumB.Value */); + } +} +function func4() { + aFunc(); + console.log(ClassA.Value); + return; + function aFunc() { + console.log(ClassA.Value); + } + var ClassA = /** @class */ (function () { + function ClassA() { + } + ClassA.Value = 1234; + return ClassA; + }()); +} +function func5() { + aFunc(); + console.log(Bar.A); + console.log(blah.prop); + console.log(new Foo()); + console.log(Baz.value); + return; + function aFunc() { + console.log(Bar.A); + console.log(blah.prop); + console.log(new Foo()); + console.log(Baz.value); + } + var blah = { prop: 1234 }; + var Bar; + (function (Bar) { + Bar[Bar["A"] = 0] = "A"; + })(Bar || (Bar = {})); + var Foo = /** @class */ (function () { + function Foo() { + this.x = 1234; + } + return Foo; + }()); + var Baz; + (function (Baz) { + Baz.value = 1234; + })(Baz || (Baz = {})); +} diff --git a/tests/baselines/reference/unreachableDeclarations(preserveconstenums=false).symbols b/tests/baselines/reference/unreachableDeclarations(preserveconstenums=false).symbols new file mode 100644 index 0000000000000..20cadc7d77447 --- /dev/null +++ b/tests/baselines/reference/unreachableDeclarations(preserveconstenums=false).symbols @@ -0,0 +1,245 @@ +//// [tests/cases/compiler/unreachableDeclarations.ts] //// + +=== unreachableDeclarations.ts === +function func1() { +>func1 : Symbol(func1, Decl(unreachableDeclarations.ts, 0, 0)) + + aFunc(); +>aFunc : Symbol(aFunc, Decl(unreachableDeclarations.ts, 6, 11)) + + console.log(EnumA.Value); +>console.log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --)) +>console : Symbol(console, Decl(lib.dom.d.ts, --, --)) +>log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --)) +>EnumA.Value : Symbol(EnumA.Value, Decl(unreachableDeclarations.ts, 13, 16)) +>EnumA : Symbol(EnumA, Decl(unreachableDeclarations.ts, 11, 5)) +>Value : Symbol(EnumA.Value, Decl(unreachableDeclarations.ts, 13, 16)) + + console.log(EnumB.Value); +>console.log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --)) +>console : Symbol(console, Decl(lib.dom.d.ts, --, --)) +>log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --)) +>EnumB.Value : Symbol(EnumB.Value, Decl(unreachableDeclarations.ts, 14, 22)) +>EnumB : Symbol(EnumB, Decl(unreachableDeclarations.ts, 13, 24)) +>Value : Symbol(EnumB.Value, Decl(unreachableDeclarations.ts, 14, 22)) + + return; + + function aFunc() { +>aFunc : Symbol(aFunc, Decl(unreachableDeclarations.ts, 6, 11)) + + console.log(EnumA.Value); +>console.log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --)) +>console : Symbol(console, Decl(lib.dom.d.ts, --, --)) +>log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --)) +>EnumA.Value : Symbol(EnumA.Value, Decl(unreachableDeclarations.ts, 13, 16)) +>EnumA : Symbol(EnumA, Decl(unreachableDeclarations.ts, 11, 5)) +>Value : Symbol(EnumA.Value, Decl(unreachableDeclarations.ts, 13, 16)) + + console.log(EnumB.Value); +>console.log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --)) +>console : Symbol(console, Decl(lib.dom.d.ts, --, --)) +>log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --)) +>EnumB.Value : Symbol(EnumB.Value, Decl(unreachableDeclarations.ts, 14, 22)) +>EnumB : Symbol(EnumB, Decl(unreachableDeclarations.ts, 13, 24)) +>Value : Symbol(EnumB.Value, Decl(unreachableDeclarations.ts, 14, 22)) + } + + enum EnumA { Value } +>EnumA : Symbol(EnumA, Decl(unreachableDeclarations.ts, 11, 5)) +>Value : Symbol(EnumA.Value, Decl(unreachableDeclarations.ts, 13, 16)) + + const enum EnumB { Value } +>EnumB : Symbol(EnumB, Decl(unreachableDeclarations.ts, 13, 24)) +>Value : Symbol(EnumB.Value, Decl(unreachableDeclarations.ts, 14, 22)) +} + +function func2() { +>func2 : Symbol(func2, Decl(unreachableDeclarations.ts, 15, 1)) + + aFunc(); +>aFunc : Symbol(aFunc, Decl(unreachableDeclarations.ts, 22, 11)) + + console.log(EnumA.Value); +>console.log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --)) +>console : Symbol(console, Decl(lib.dom.d.ts, --, --)) +>log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --)) +>EnumA.Value : Symbol(EnumA.Value, Decl(unreachableDeclarations.ts, 28, 16)) +>EnumA : Symbol(EnumA, Decl(unreachableDeclarations.ts, 26, 5)) +>Value : Symbol(EnumA.Value, Decl(unreachableDeclarations.ts, 28, 16)) + + return; + + function aFunc() { +>aFunc : Symbol(aFunc, Decl(unreachableDeclarations.ts, 22, 11)) + + console.log(EnumA.Value); +>console.log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --)) +>console : Symbol(console, Decl(lib.dom.d.ts, --, --)) +>log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --)) +>EnumA.Value : Symbol(EnumA.Value, Decl(unreachableDeclarations.ts, 28, 16)) +>EnumA : Symbol(EnumA, Decl(unreachableDeclarations.ts, 26, 5)) +>Value : Symbol(EnumA.Value, Decl(unreachableDeclarations.ts, 28, 16)) + } + + enum EnumA { Value } +>EnumA : Symbol(EnumA, Decl(unreachableDeclarations.ts, 26, 5)) +>Value : Symbol(EnumA.Value, Decl(unreachableDeclarations.ts, 28, 16)) +} + +function func3() { +>func3 : Symbol(func3, Decl(unreachableDeclarations.ts, 29, 1)) + + aFunc(); +>aFunc : Symbol(aFunc, Decl(unreachableDeclarations.ts, 36, 11)) + + console.log(EnumB.Value); +>console.log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --)) +>console : Symbol(console, Decl(lib.dom.d.ts, --, --)) +>log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --)) +>EnumB.Value : Symbol(EnumB.Value, Decl(unreachableDeclarations.ts, 42, 22)) +>EnumB : Symbol(EnumB, Decl(unreachableDeclarations.ts, 40, 5)) +>Value : Symbol(EnumB.Value, Decl(unreachableDeclarations.ts, 42, 22)) + + return; + + function aFunc() { +>aFunc : Symbol(aFunc, Decl(unreachableDeclarations.ts, 36, 11)) + + console.log(EnumB.Value); +>console.log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --)) +>console : Symbol(console, Decl(lib.dom.d.ts, --, --)) +>log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --)) +>EnumB.Value : Symbol(EnumB.Value, Decl(unreachableDeclarations.ts, 42, 22)) +>EnumB : Symbol(EnumB, Decl(unreachableDeclarations.ts, 40, 5)) +>Value : Symbol(EnumB.Value, Decl(unreachableDeclarations.ts, 42, 22)) + } + + const enum EnumB { Value } +>EnumB : Symbol(EnumB, Decl(unreachableDeclarations.ts, 40, 5)) +>Value : Symbol(EnumB.Value, Decl(unreachableDeclarations.ts, 42, 22)) +} + +function func4() { +>func4 : Symbol(func4, Decl(unreachableDeclarations.ts, 43, 1)) + + aFunc(); +>aFunc : Symbol(aFunc, Decl(unreachableDeclarations.ts, 50, 11)) + + console.log(ClassA.Value); +>console.log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --)) +>console : Symbol(console, Decl(lib.dom.d.ts, --, --)) +>log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --)) +>ClassA.Value : Symbol(ClassA.Value, Decl(unreachableDeclarations.ts, 56, 18)) +>ClassA : Symbol(ClassA, Decl(unreachableDeclarations.ts, 54, 5)) +>Value : Symbol(ClassA.Value, Decl(unreachableDeclarations.ts, 56, 18)) + + return; + + function aFunc() { +>aFunc : Symbol(aFunc, Decl(unreachableDeclarations.ts, 50, 11)) + + console.log(ClassA.Value); +>console.log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --)) +>console : Symbol(console, Decl(lib.dom.d.ts, --, --)) +>log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --)) +>ClassA.Value : Symbol(ClassA.Value, Decl(unreachableDeclarations.ts, 56, 18)) +>ClassA : Symbol(ClassA, Decl(unreachableDeclarations.ts, 54, 5)) +>Value : Symbol(ClassA.Value, Decl(unreachableDeclarations.ts, 56, 18)) + } + + class ClassA { static Value = 1234; } +>ClassA : Symbol(ClassA, Decl(unreachableDeclarations.ts, 54, 5)) +>Value : Symbol(ClassA.Value, Decl(unreachableDeclarations.ts, 56, 18)) +} + +function func5() { +>func5 : Symbol(func5, Decl(unreachableDeclarations.ts, 57, 1)) + + aFunc(); +>aFunc : Symbol(aFunc, Decl(unreachableDeclarations.ts, 68, 8)) + + console.log(Bar.A); +>console.log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --)) +>console : Symbol(console, Decl(lib.dom.d.ts, --, --)) +>log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --)) +>Bar.A : Symbol(Bar.A, Decl(unreachableDeclarations.ts, 79, 11)) +>Bar : Symbol(Bar, Decl(unreachableDeclarations.ts, 77, 29)) +>A : Symbol(Bar.A, Decl(unreachableDeclarations.ts, 79, 11)) + + console.log(blah.prop); +>console.log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --)) +>console : Symbol(console, Decl(lib.dom.d.ts, --, --)) +>log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --)) +>blah.prop : Symbol(prop, Decl(unreachableDeclarations.ts, 77, 15)) +>blah : Symbol(blah, Decl(unreachableDeclarations.ts, 77, 6)) +>prop : Symbol(prop, Decl(unreachableDeclarations.ts, 77, 15)) + + console.log(new Foo()) +>console.log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --)) +>console : Symbol(console, Decl(lib.dom.d.ts, --, --)) +>log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --)) +>Foo : Symbol(Foo, Decl(unreachableDeclarations.ts, 79, 15)) + + console.log(Baz.value); +>console.log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --)) +>console : Symbol(console, Decl(lib.dom.d.ts, --, --)) +>log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --)) +>Baz.value : Symbol(Baz.value, Decl(unreachableDeclarations.ts, 83, 29)) +>Baz : Symbol(Baz, Decl(unreachableDeclarations.ts, 81, 23)) +>value : Symbol(Baz.value, Decl(unreachableDeclarations.ts, 83, 29)) + + + return; + + function aFunc() { +>aFunc : Symbol(aFunc, Decl(unreachableDeclarations.ts, 68, 8)) + + console.log(Bar.A); +>console.log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --)) +>console : Symbol(console, Decl(lib.dom.d.ts, --, --)) +>log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --)) +>Bar.A : Symbol(Bar.A, Decl(unreachableDeclarations.ts, 79, 11)) +>Bar : Symbol(Bar, Decl(unreachableDeclarations.ts, 77, 29)) +>A : Symbol(Bar.A, Decl(unreachableDeclarations.ts, 79, 11)) + + console.log(blah.prop); +>console.log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --)) +>console : Symbol(console, Decl(lib.dom.d.ts, --, --)) +>log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --)) +>blah.prop : Symbol(prop, Decl(unreachableDeclarations.ts, 77, 15)) +>blah : Symbol(blah, Decl(unreachableDeclarations.ts, 77, 6)) +>prop : Symbol(prop, Decl(unreachableDeclarations.ts, 77, 15)) + + console.log(new Foo()) +>console.log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --)) +>console : Symbol(console, Decl(lib.dom.d.ts, --, --)) +>log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --)) +>Foo : Symbol(Foo, Decl(unreachableDeclarations.ts, 79, 15)) + + console.log(Baz.value); +>console.log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --)) +>console : Symbol(console, Decl(lib.dom.d.ts, --, --)) +>log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --)) +>Baz.value : Symbol(Baz.value, Decl(unreachableDeclarations.ts, 83, 29)) +>Baz : Symbol(Baz, Decl(unreachableDeclarations.ts, 81, 23)) +>value : Symbol(Baz.value, Decl(unreachableDeclarations.ts, 83, 29)) + } + + const blah = { prop: 1234 }; +>blah : Symbol(blah, Decl(unreachableDeclarations.ts, 77, 6)) +>prop : Symbol(prop, Decl(unreachableDeclarations.ts, 77, 15)) + + enum Bar { A } +>Bar : Symbol(Bar, Decl(unreachableDeclarations.ts, 77, 29)) +>A : Symbol(Bar.A, Decl(unreachableDeclarations.ts, 79, 11)) + + class Foo { x = 1234 } +>Foo : Symbol(Foo, Decl(unreachableDeclarations.ts, 79, 15)) +>x : Symbol(Foo.x, Decl(unreachableDeclarations.ts, 81, 12)) + + namespace Baz { export const value = 1234 } +>Baz : Symbol(Baz, Decl(unreachableDeclarations.ts, 81, 23)) +>value : Symbol(value, Decl(unreachableDeclarations.ts, 83, 29)) +} + diff --git a/tests/baselines/reference/unreachableDeclarations(preserveconstenums=false).types b/tests/baselines/reference/unreachableDeclarations(preserveconstenums=false).types new file mode 100644 index 0000000000000..9a54857c8d2ee --- /dev/null +++ b/tests/baselines/reference/unreachableDeclarations(preserveconstenums=false).types @@ -0,0 +1,442 @@ +//// [tests/cases/compiler/unreachableDeclarations.ts] //// + +=== unreachableDeclarations.ts === +function func1() { +>func1 : () => void +> : ^^^^^^^^^^ + + aFunc(); +>aFunc() : void +> : ^^^^ +>aFunc : () => void +> : ^^^^^^^^^^ + + console.log(EnumA.Value); +>console.log(EnumA.Value) : void +> : ^^^^ +>console.log : (...data: any[]) => void +> : ^^^^ ^^ ^^^^^ +>console : Console +> : ^^^^^^^ +>log : (...data: any[]) => void +> : ^^^^ ^^ ^^^^^ +>EnumA.Value : EnumA +> : ^^^^^ +>EnumA : typeof EnumA +> : ^^^^^^^^^^^^ +>Value : EnumA +> : ^^^^^ + + console.log(EnumB.Value); +>console.log(EnumB.Value) : void +> : ^^^^ +>console.log : (...data: any[]) => void +> : ^^^^ ^^ ^^^^^ +>console : Console +> : ^^^^^^^ +>log : (...data: any[]) => void +> : ^^^^ ^^ ^^^^^ +>EnumB.Value : EnumB +> : ^^^^^ +>EnumB : typeof EnumB +> : ^^^^^^^^^^^^ +>Value : EnumB +> : ^^^^^ + + return; + + function aFunc() { +>aFunc : () => void +> : ^^^^^^^^^^ + + console.log(EnumA.Value); +>console.log(EnumA.Value) : void +> : ^^^^ +>console.log : (...data: any[]) => void +> : ^^^^ ^^ ^^^^^ +>console : Console +> : ^^^^^^^ +>log : (...data: any[]) => void +> : ^^^^ ^^ ^^^^^ +>EnumA.Value : EnumA +> : ^^^^^ +>EnumA : typeof EnumA +> : ^^^^^^^^^^^^ +>Value : EnumA +> : ^^^^^ + + console.log(EnumB.Value); +>console.log(EnumB.Value) : void +> : ^^^^ +>console.log : (...data: any[]) => void +> : ^^^^ ^^ ^^^^^ +>console : Console +> : ^^^^^^^ +>log : (...data: any[]) => void +> : ^^^^ ^^ ^^^^^ +>EnumB.Value : EnumB +> : ^^^^^ +>EnumB : typeof EnumB +> : ^^^^^^^^^^^^ +>Value : EnumB +> : ^^^^^ + } + + enum EnumA { Value } +>EnumA : EnumA +> : ^^^^^ +>Value : EnumA.Value +> : ^^^^^^^^^^^ + + const enum EnumB { Value } +>EnumB : EnumB +> : ^^^^^ +>Value : EnumB.Value +> : ^^^^^^^^^^^ +} + +function func2() { +>func2 : () => void +> : ^^^^^^^^^^ + + aFunc(); +>aFunc() : void +> : ^^^^ +>aFunc : () => void +> : ^^^^^^^^^^ + + console.log(EnumA.Value); +>console.log(EnumA.Value) : void +> : ^^^^ +>console.log : (...data: any[]) => void +> : ^^^^ ^^ ^^^^^ +>console : Console +> : ^^^^^^^ +>log : (...data: any[]) => void +> : ^^^^ ^^ ^^^^^ +>EnumA.Value : EnumA +> : ^^^^^ +>EnumA : typeof EnumA +> : ^^^^^^^^^^^^ +>Value : EnumA +> : ^^^^^ + + return; + + function aFunc() { +>aFunc : () => void +> : ^^^^^^^^^^ + + console.log(EnumA.Value); +>console.log(EnumA.Value) : void +> : ^^^^ +>console.log : (...data: any[]) => void +> : ^^^^ ^^ ^^^^^ +>console : Console +> : ^^^^^^^ +>log : (...data: any[]) => void +> : ^^^^ ^^ ^^^^^ +>EnumA.Value : EnumA +> : ^^^^^ +>EnumA : typeof EnumA +> : ^^^^^^^^^^^^ +>Value : EnumA +> : ^^^^^ + } + + enum EnumA { Value } +>EnumA : EnumA +> : ^^^^^ +>Value : EnumA.Value +> : ^^^^^^^^^^^ +} + +function func3() { +>func3 : () => void +> : ^^^^^^^^^^ + + aFunc(); +>aFunc() : void +> : ^^^^ +>aFunc : () => void +> : ^^^^^^^^^^ + + console.log(EnumB.Value); +>console.log(EnumB.Value) : void +> : ^^^^ +>console.log : (...data: any[]) => void +> : ^^^^ ^^ ^^^^^ +>console : Console +> : ^^^^^^^ +>log : (...data: any[]) => void +> : ^^^^ ^^ ^^^^^ +>EnumB.Value : EnumB +> : ^^^^^ +>EnumB : typeof EnumB +> : ^^^^^^^^^^^^ +>Value : EnumB +> : ^^^^^ + + return; + + function aFunc() { +>aFunc : () => void +> : ^^^^^^^^^^ + + console.log(EnumB.Value); +>console.log(EnumB.Value) : void +> : ^^^^ +>console.log : (...data: any[]) => void +> : ^^^^ ^^ ^^^^^ +>console : Console +> : ^^^^^^^ +>log : (...data: any[]) => void +> : ^^^^ ^^ ^^^^^ +>EnumB.Value : EnumB +> : ^^^^^ +>EnumB : typeof EnumB +> : ^^^^^^^^^^^^ +>Value : EnumB +> : ^^^^^ + } + + const enum EnumB { Value } +>EnumB : EnumB +> : ^^^^^ +>Value : EnumB.Value +> : ^^^^^^^^^^^ +} + +function func4() { +>func4 : () => void +> : ^^^^^^^^^^ + + aFunc(); +>aFunc() : void +> : ^^^^ +>aFunc : () => void +> : ^^^^^^^^^^ + + console.log(ClassA.Value); +>console.log(ClassA.Value) : void +> : ^^^^ +>console.log : (...data: any[]) => void +> : ^^^^ ^^ ^^^^^ +>console : Console +> : ^^^^^^^ +>log : (...data: any[]) => void +> : ^^^^ ^^ ^^^^^ +>ClassA.Value : number +> : ^^^^^^ +>ClassA : typeof ClassA +> : ^^^^^^^^^^^^^ +>Value : number +> : ^^^^^^ + + return; + + function aFunc() { +>aFunc : () => void +> : ^^^^^^^^^^ + + console.log(ClassA.Value); +>console.log(ClassA.Value) : void +> : ^^^^ +>console.log : (...data: any[]) => void +> : ^^^^ ^^ ^^^^^ +>console : Console +> : ^^^^^^^ +>log : (...data: any[]) => void +> : ^^^^ ^^ ^^^^^ +>ClassA.Value : number +> : ^^^^^^ +>ClassA : typeof ClassA +> : ^^^^^^^^^^^^^ +>Value : number +> : ^^^^^^ + } + + class ClassA { static Value = 1234; } +>ClassA : ClassA +> : ^^^^^^ +>Value : number +> : ^^^^^^ +>1234 : 1234 +> : ^^^^ +} + +function func5() { +>func5 : () => void +> : ^^^^^^^^^^ + + aFunc(); +>aFunc() : void +> : ^^^^ +>aFunc : () => void +> : ^^^^^^^^^^ + + console.log(Bar.A); +>console.log(Bar.A) : void +> : ^^^^ +>console.log : (...data: any[]) => void +> : ^^^^ ^^ ^^^^^ +>console : Console +> : ^^^^^^^ +>log : (...data: any[]) => void +> : ^^^^ ^^ ^^^^^ +>Bar.A : Bar +> : ^^^ +>Bar : typeof Bar +> : ^^^^^^^^^^ +>A : Bar +> : ^^^ + + console.log(blah.prop); +>console.log(blah.prop) : void +> : ^^^^ +>console.log : (...data: any[]) => void +> : ^^^^ ^^ ^^^^^ +>console : Console +> : ^^^^^^^ +>log : (...data: any[]) => void +> : ^^^^ ^^ ^^^^^ +>blah.prop : number +> : ^^^^^^ +>blah : { prop: number; } +> : ^^^^^^^^^^^^^^^^^ +>prop : number +> : ^^^^^^ + + console.log(new Foo()) +>console.log(new Foo()) : void +> : ^^^^ +>console.log : (...data: any[]) => void +> : ^^^^ ^^ ^^^^^ +>console : Console +> : ^^^^^^^ +>log : (...data: any[]) => void +> : ^^^^ ^^ ^^^^^ +>new Foo() : Foo +> : ^^^ +>Foo : typeof Foo +> : ^^^^^^^^^^ + + console.log(Baz.value); +>console.log(Baz.value) : void +> : ^^^^ +>console.log : (...data: any[]) => void +> : ^^^^ ^^ ^^^^^ +>console : Console +> : ^^^^^^^ +>log : (...data: any[]) => void +> : ^^^^ ^^ ^^^^^ +>Baz.value : 1234 +> : ^^^^ +>Baz : typeof Baz +> : ^^^^^^^^^^ +>value : 1234 +> : ^^^^ + + + return; + + function aFunc() { +>aFunc : () => void +> : ^^^^^^^^^^ + + console.log(Bar.A); +>console.log(Bar.A) : void +> : ^^^^ +>console.log : (...data: any[]) => void +> : ^^^^ ^^ ^^^^^ +>console : Console +> : ^^^^^^^ +>log : (...data: any[]) => void +> : ^^^^ ^^ ^^^^^ +>Bar.A : Bar +> : ^^^ +>Bar : typeof Bar +> : ^^^^^^^^^^ +>A : Bar +> : ^^^ + + console.log(blah.prop); +>console.log(blah.prop) : void +> : ^^^^ +>console.log : (...data: any[]) => void +> : ^^^^ ^^ ^^^^^ +>console : Console +> : ^^^^^^^ +>log : (...data: any[]) => void +> : ^^^^ ^^ ^^^^^ +>blah.prop : number +> : ^^^^^^ +>blah : { prop: number; } +> : ^^^^^^^^^^^^^^^^^ +>prop : number +> : ^^^^^^ + + console.log(new Foo()) +>console.log(new Foo()) : void +> : ^^^^ +>console.log : (...data: any[]) => void +> : ^^^^ ^^ ^^^^^ +>console : Console +> : ^^^^^^^ +>log : (...data: any[]) => void +> : ^^^^ ^^ ^^^^^ +>new Foo() : Foo +> : ^^^ +>Foo : typeof Foo +> : ^^^^^^^^^^ + + console.log(Baz.value); +>console.log(Baz.value) : void +> : ^^^^ +>console.log : (...data: any[]) => void +> : ^^^^ ^^ ^^^^^ +>console : Console +> : ^^^^^^^ +>log : (...data: any[]) => void +> : ^^^^ ^^ ^^^^^ +>Baz.value : 1234 +> : ^^^^ +>Baz : typeof Baz +> : ^^^^^^^^^^ +>value : 1234 +> : ^^^^ + } + + const blah = { prop: 1234 }; +>blah : { prop: number; } +> : ^^^^^^^^^^^^^^^^^ +>{ prop: 1234 } : { prop: number; } +> : ^^^^^^^^^^^^^^^^^ +>prop : number +> : ^^^^^^ +>1234 : 1234 +> : ^^^^ + + enum Bar { A } +>Bar : Bar +> : ^^^ +>A : Bar.A +> : ^^^^^ + + class Foo { x = 1234 } +>Foo : Foo +> : ^^^ +>x : number +> : ^^^^^^ +>1234 : 1234 +> : ^^^^ + + namespace Baz { export const value = 1234 } +>Baz : typeof Baz +> : ^^^^^^^^^^ +>value : 1234 +> : ^^^^ +>1234 : 1234 +> : ^^^^ +} + diff --git a/tests/baselines/reference/unreachableDeclarations(preserveconstenums=true).errors.txt b/tests/baselines/reference/unreachableDeclarations(preserveconstenums=true).errors.txt new file mode 100644 index 0000000000000..a648a0d76653a --- /dev/null +++ b/tests/baselines/reference/unreachableDeclarations(preserveconstenums=true).errors.txt @@ -0,0 +1,141 @@ +unreachableDeclarations.ts(4,17): error TS2450: Enum 'EnumA' used before its declaration. +unreachableDeclarations.ts(14,5): error TS7027: Unreachable code detected. +unreachableDeclarations.ts(21,17): error TS2450: Enum 'EnumA' used before its declaration. +unreachableDeclarations.ts(29,5): error TS7027: Unreachable code detected. +unreachableDeclarations.ts(43,5): error TS7027: Unreachable code detected. +unreachableDeclarations.ts(49,17): error TS2449: Class 'ClassA' used before its declaration. +unreachableDeclarations.ts(57,5): error TS7027: Unreachable code detected. +unreachableDeclarations.ts(63,14): error TS2450: Enum 'Bar' used before its declaration. +unreachableDeclarations.ts(64,14): error TS2448: Block-scoped variable 'blah' used before its declaration. +unreachableDeclarations.ts(64,14): error TS2454: Variable 'blah' is used before being assigned. +unreachableDeclarations.ts(65,18): error TS2449: Class 'Foo' used before its declaration. +unreachableDeclarations.ts(78,2): error TS7027: Unreachable code detected. +unreachableDeclarations.ts(84,2): error TS1235: A namespace declaration is only allowed at the top level of a namespace or module. + + +==== unreachableDeclarations.ts (13 errors) ==== + function func1() { + aFunc(); + + console.log(EnumA.Value); + ~~~~~ +!!! error TS2450: Enum 'EnumA' used before its declaration. +!!! related TS2728 unreachableDeclarations.ts:14:10: 'EnumA' is declared here. + console.log(EnumB.Value); + + return; + + function aFunc() { + console.log(EnumA.Value); + console.log(EnumB.Value); + } + + enum EnumA { Value } + ~~~~~~~~~~~~~~~~~~~~ + const enum EnumB { Value } + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS7027: Unreachable code detected. + } + + function func2() { + aFunc(); + + console.log(EnumA.Value); + ~~~~~ +!!! error TS2450: Enum 'EnumA' used before its declaration. +!!! related TS2728 unreachableDeclarations.ts:29:10: 'EnumA' is declared here. + + return; + + function aFunc() { + console.log(EnumA.Value); + } + + enum EnumA { Value } + ~~~~~~~~~~~~~~~~~~~~ +!!! error TS7027: Unreachable code detected. + } + + function func3() { + aFunc(); + + console.log(EnumB.Value); + + return; + + function aFunc() { + console.log(EnumB.Value); + } + + const enum EnumB { Value } + ~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS7027: Unreachable code detected. + } + + function func4() { + aFunc(); + + console.log(ClassA.Value); + ~~~~~~ +!!! error TS2449: Class 'ClassA' used before its declaration. +!!! related TS2728 unreachableDeclarations.ts:57:11: 'ClassA' is declared here. + + return; + + function aFunc() { + console.log(ClassA.Value); + } + + class ClassA { static Value = 1234; } + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS7027: Unreachable code detected. + } + + function func5() { + aFunc(); + + console.log(Bar.A); + ~~~ +!!! error TS2450: Enum 'Bar' used before its declaration. +!!! related TS2728 unreachableDeclarations.ts:80:7: 'Bar' is declared here. + console.log(blah.prop); + ~~~~ +!!! error TS2448: Block-scoped variable 'blah' used before its declaration. +!!! related TS2728 unreachableDeclarations.ts:78:8: 'blah' is declared here. + ~~~~ +!!! error TS2454: Variable 'blah' is used before being assigned. + console.log(new Foo()) + ~~~ +!!! error TS2449: Class 'Foo' used before its declaration. +!!! related TS2728 unreachableDeclarations.ts:82:8: 'Foo' is declared here. + console.log(Baz.value); + + + return; + + function aFunc() { + console.log(Bar.A); + console.log(blah.prop); + console.log(new Foo()) + console.log(Baz.value); + } + + const blah = { prop: 1234 }; + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + + enum Bar { A } + ~~~~~~~~~~~~~~~ + + + class Foo { x = 1234 } + ~~~~~~~~~~~~~~~~~~~~~~~ + + + namespace Baz { export const value = 1234 } + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS7027: Unreachable code detected. + ~~~~~~~~~ +!!! error TS1235: A namespace declaration is only allowed at the top level of a namespace or module. + } + \ No newline at end of file diff --git a/tests/baselines/reference/unreachableDeclarations(preserveconstenums=true).js b/tests/baselines/reference/unreachableDeclarations(preserveconstenums=true).js new file mode 100644 index 0000000000000..1433be8a790eb --- /dev/null +++ b/tests/baselines/reference/unreachableDeclarations(preserveconstenums=true).js @@ -0,0 +1,177 @@ +//// [tests/cases/compiler/unreachableDeclarations.ts] //// + +//// [unreachableDeclarations.ts] +function func1() { + aFunc(); + + console.log(EnumA.Value); + console.log(EnumB.Value); + + return; + + function aFunc() { + console.log(EnumA.Value); + console.log(EnumB.Value); + } + + enum EnumA { Value } + const enum EnumB { Value } +} + +function func2() { + aFunc(); + + console.log(EnumA.Value); + + return; + + function aFunc() { + console.log(EnumA.Value); + } + + enum EnumA { Value } +} + +function func3() { + aFunc(); + + console.log(EnumB.Value); + + return; + + function aFunc() { + console.log(EnumB.Value); + } + + const enum EnumB { Value } +} + +function func4() { + aFunc(); + + console.log(ClassA.Value); + + return; + + function aFunc() { + console.log(ClassA.Value); + } + + class ClassA { static Value = 1234; } +} + +function func5() { + aFunc(); + + console.log(Bar.A); + console.log(blah.prop); + console.log(new Foo()) + console.log(Baz.value); + + + return; + + function aFunc() { + console.log(Bar.A); + console.log(blah.prop); + console.log(new Foo()) + console.log(Baz.value); + } + + const blah = { prop: 1234 }; + + enum Bar { A } + + class Foo { x = 1234 } + + namespace Baz { export const value = 1234 } +} + + +//// [unreachableDeclarations.js] +"use strict"; +function func1() { + aFunc(); + console.log(EnumA.Value); + console.log(0 /* EnumB.Value */); + return; + function aFunc() { + console.log(EnumA.Value); + console.log(0 /* EnumB.Value */); + } + var EnumA; + (function (EnumA) { + EnumA[EnumA["Value"] = 0] = "Value"; + })(EnumA || (EnumA = {})); + var EnumB; + (function (EnumB) { + EnumB[EnumB["Value"] = 0] = "Value"; + })(EnumB || (EnumB = {})); +} +function func2() { + aFunc(); + console.log(EnumA.Value); + return; + function aFunc() { + console.log(EnumA.Value); + } + var EnumA; + (function (EnumA) { + EnumA[EnumA["Value"] = 0] = "Value"; + })(EnumA || (EnumA = {})); +} +function func3() { + aFunc(); + console.log(0 /* EnumB.Value */); + return; + function aFunc() { + console.log(0 /* EnumB.Value */); + } + var EnumB; + (function (EnumB) { + EnumB[EnumB["Value"] = 0] = "Value"; + })(EnumB || (EnumB = {})); +} +function func4() { + aFunc(); + console.log(ClassA.Value); + return; + function aFunc() { + console.log(ClassA.Value); + } + var ClassA = /** @class */ (function () { + function ClassA() { + } + ClassA.Value = 1234; + return ClassA; + }()); +} +function func5() { + aFunc(); + console.log(Bar.A); + console.log(blah.prop); + console.log(new Foo()); + console.log(Baz.value); + return; + function aFunc() { + console.log(Bar.A); + console.log(blah.prop); + console.log(new Foo()); + console.log(Baz.value); + } + var blah = { prop: 1234 }; + var Bar; + (function (Bar) { + Bar[Bar["A"] = 0] = "A"; + })(Bar || (Bar = {})); + var Foo = /** @class */ (function () { + function Foo() { + this.x = 1234; + } + return Foo; + }()); + var Baz; + (function (Baz) { + Baz.value = 1234; + })(Baz || (Baz = {})); +} diff --git a/tests/baselines/reference/unreachableDeclarations(preserveconstenums=true).symbols b/tests/baselines/reference/unreachableDeclarations(preserveconstenums=true).symbols new file mode 100644 index 0000000000000..20cadc7d77447 --- /dev/null +++ b/tests/baselines/reference/unreachableDeclarations(preserveconstenums=true).symbols @@ -0,0 +1,245 @@ +//// [tests/cases/compiler/unreachableDeclarations.ts] //// + +=== unreachableDeclarations.ts === +function func1() { +>func1 : Symbol(func1, Decl(unreachableDeclarations.ts, 0, 0)) + + aFunc(); +>aFunc : Symbol(aFunc, Decl(unreachableDeclarations.ts, 6, 11)) + + console.log(EnumA.Value); +>console.log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --)) +>console : Symbol(console, Decl(lib.dom.d.ts, --, --)) +>log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --)) +>EnumA.Value : Symbol(EnumA.Value, Decl(unreachableDeclarations.ts, 13, 16)) +>EnumA : Symbol(EnumA, Decl(unreachableDeclarations.ts, 11, 5)) +>Value : Symbol(EnumA.Value, Decl(unreachableDeclarations.ts, 13, 16)) + + console.log(EnumB.Value); +>console.log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --)) +>console : Symbol(console, Decl(lib.dom.d.ts, --, --)) +>log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --)) +>EnumB.Value : Symbol(EnumB.Value, Decl(unreachableDeclarations.ts, 14, 22)) +>EnumB : Symbol(EnumB, Decl(unreachableDeclarations.ts, 13, 24)) +>Value : Symbol(EnumB.Value, Decl(unreachableDeclarations.ts, 14, 22)) + + return; + + function aFunc() { +>aFunc : Symbol(aFunc, Decl(unreachableDeclarations.ts, 6, 11)) + + console.log(EnumA.Value); +>console.log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --)) +>console : Symbol(console, Decl(lib.dom.d.ts, --, --)) +>log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --)) +>EnumA.Value : Symbol(EnumA.Value, Decl(unreachableDeclarations.ts, 13, 16)) +>EnumA : Symbol(EnumA, Decl(unreachableDeclarations.ts, 11, 5)) +>Value : Symbol(EnumA.Value, Decl(unreachableDeclarations.ts, 13, 16)) + + console.log(EnumB.Value); +>console.log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --)) +>console : Symbol(console, Decl(lib.dom.d.ts, --, --)) +>log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --)) +>EnumB.Value : Symbol(EnumB.Value, Decl(unreachableDeclarations.ts, 14, 22)) +>EnumB : Symbol(EnumB, Decl(unreachableDeclarations.ts, 13, 24)) +>Value : Symbol(EnumB.Value, Decl(unreachableDeclarations.ts, 14, 22)) + } + + enum EnumA { Value } +>EnumA : Symbol(EnumA, Decl(unreachableDeclarations.ts, 11, 5)) +>Value : Symbol(EnumA.Value, Decl(unreachableDeclarations.ts, 13, 16)) + + const enum EnumB { Value } +>EnumB : Symbol(EnumB, Decl(unreachableDeclarations.ts, 13, 24)) +>Value : Symbol(EnumB.Value, Decl(unreachableDeclarations.ts, 14, 22)) +} + +function func2() { +>func2 : Symbol(func2, Decl(unreachableDeclarations.ts, 15, 1)) + + aFunc(); +>aFunc : Symbol(aFunc, Decl(unreachableDeclarations.ts, 22, 11)) + + console.log(EnumA.Value); +>console.log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --)) +>console : Symbol(console, Decl(lib.dom.d.ts, --, --)) +>log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --)) +>EnumA.Value : Symbol(EnumA.Value, Decl(unreachableDeclarations.ts, 28, 16)) +>EnumA : Symbol(EnumA, Decl(unreachableDeclarations.ts, 26, 5)) +>Value : Symbol(EnumA.Value, Decl(unreachableDeclarations.ts, 28, 16)) + + return; + + function aFunc() { +>aFunc : Symbol(aFunc, Decl(unreachableDeclarations.ts, 22, 11)) + + console.log(EnumA.Value); +>console.log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --)) +>console : Symbol(console, Decl(lib.dom.d.ts, --, --)) +>log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --)) +>EnumA.Value : Symbol(EnumA.Value, Decl(unreachableDeclarations.ts, 28, 16)) +>EnumA : Symbol(EnumA, Decl(unreachableDeclarations.ts, 26, 5)) +>Value : Symbol(EnumA.Value, Decl(unreachableDeclarations.ts, 28, 16)) + } + + enum EnumA { Value } +>EnumA : Symbol(EnumA, Decl(unreachableDeclarations.ts, 26, 5)) +>Value : Symbol(EnumA.Value, Decl(unreachableDeclarations.ts, 28, 16)) +} + +function func3() { +>func3 : Symbol(func3, Decl(unreachableDeclarations.ts, 29, 1)) + + aFunc(); +>aFunc : Symbol(aFunc, Decl(unreachableDeclarations.ts, 36, 11)) + + console.log(EnumB.Value); +>console.log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --)) +>console : Symbol(console, Decl(lib.dom.d.ts, --, --)) +>log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --)) +>EnumB.Value : Symbol(EnumB.Value, Decl(unreachableDeclarations.ts, 42, 22)) +>EnumB : Symbol(EnumB, Decl(unreachableDeclarations.ts, 40, 5)) +>Value : Symbol(EnumB.Value, Decl(unreachableDeclarations.ts, 42, 22)) + + return; + + function aFunc() { +>aFunc : Symbol(aFunc, Decl(unreachableDeclarations.ts, 36, 11)) + + console.log(EnumB.Value); +>console.log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --)) +>console : Symbol(console, Decl(lib.dom.d.ts, --, --)) +>log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --)) +>EnumB.Value : Symbol(EnumB.Value, Decl(unreachableDeclarations.ts, 42, 22)) +>EnumB : Symbol(EnumB, Decl(unreachableDeclarations.ts, 40, 5)) +>Value : Symbol(EnumB.Value, Decl(unreachableDeclarations.ts, 42, 22)) + } + + const enum EnumB { Value } +>EnumB : Symbol(EnumB, Decl(unreachableDeclarations.ts, 40, 5)) +>Value : Symbol(EnumB.Value, Decl(unreachableDeclarations.ts, 42, 22)) +} + +function func4() { +>func4 : Symbol(func4, Decl(unreachableDeclarations.ts, 43, 1)) + + aFunc(); +>aFunc : Symbol(aFunc, Decl(unreachableDeclarations.ts, 50, 11)) + + console.log(ClassA.Value); +>console.log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --)) +>console : Symbol(console, Decl(lib.dom.d.ts, --, --)) +>log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --)) +>ClassA.Value : Symbol(ClassA.Value, Decl(unreachableDeclarations.ts, 56, 18)) +>ClassA : Symbol(ClassA, Decl(unreachableDeclarations.ts, 54, 5)) +>Value : Symbol(ClassA.Value, Decl(unreachableDeclarations.ts, 56, 18)) + + return; + + function aFunc() { +>aFunc : Symbol(aFunc, Decl(unreachableDeclarations.ts, 50, 11)) + + console.log(ClassA.Value); +>console.log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --)) +>console : Symbol(console, Decl(lib.dom.d.ts, --, --)) +>log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --)) +>ClassA.Value : Symbol(ClassA.Value, Decl(unreachableDeclarations.ts, 56, 18)) +>ClassA : Symbol(ClassA, Decl(unreachableDeclarations.ts, 54, 5)) +>Value : Symbol(ClassA.Value, Decl(unreachableDeclarations.ts, 56, 18)) + } + + class ClassA { static Value = 1234; } +>ClassA : Symbol(ClassA, Decl(unreachableDeclarations.ts, 54, 5)) +>Value : Symbol(ClassA.Value, Decl(unreachableDeclarations.ts, 56, 18)) +} + +function func5() { +>func5 : Symbol(func5, Decl(unreachableDeclarations.ts, 57, 1)) + + aFunc(); +>aFunc : Symbol(aFunc, Decl(unreachableDeclarations.ts, 68, 8)) + + console.log(Bar.A); +>console.log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --)) +>console : Symbol(console, Decl(lib.dom.d.ts, --, --)) +>log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --)) +>Bar.A : Symbol(Bar.A, Decl(unreachableDeclarations.ts, 79, 11)) +>Bar : Symbol(Bar, Decl(unreachableDeclarations.ts, 77, 29)) +>A : Symbol(Bar.A, Decl(unreachableDeclarations.ts, 79, 11)) + + console.log(blah.prop); +>console.log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --)) +>console : Symbol(console, Decl(lib.dom.d.ts, --, --)) +>log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --)) +>blah.prop : Symbol(prop, Decl(unreachableDeclarations.ts, 77, 15)) +>blah : Symbol(blah, Decl(unreachableDeclarations.ts, 77, 6)) +>prop : Symbol(prop, Decl(unreachableDeclarations.ts, 77, 15)) + + console.log(new Foo()) +>console.log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --)) +>console : Symbol(console, Decl(lib.dom.d.ts, --, --)) +>log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --)) +>Foo : Symbol(Foo, Decl(unreachableDeclarations.ts, 79, 15)) + + console.log(Baz.value); +>console.log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --)) +>console : Symbol(console, Decl(lib.dom.d.ts, --, --)) +>log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --)) +>Baz.value : Symbol(Baz.value, Decl(unreachableDeclarations.ts, 83, 29)) +>Baz : Symbol(Baz, Decl(unreachableDeclarations.ts, 81, 23)) +>value : Symbol(Baz.value, Decl(unreachableDeclarations.ts, 83, 29)) + + + return; + + function aFunc() { +>aFunc : Symbol(aFunc, Decl(unreachableDeclarations.ts, 68, 8)) + + console.log(Bar.A); +>console.log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --)) +>console : Symbol(console, Decl(lib.dom.d.ts, --, --)) +>log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --)) +>Bar.A : Symbol(Bar.A, Decl(unreachableDeclarations.ts, 79, 11)) +>Bar : Symbol(Bar, Decl(unreachableDeclarations.ts, 77, 29)) +>A : Symbol(Bar.A, Decl(unreachableDeclarations.ts, 79, 11)) + + console.log(blah.prop); +>console.log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --)) +>console : Symbol(console, Decl(lib.dom.d.ts, --, --)) +>log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --)) +>blah.prop : Symbol(prop, Decl(unreachableDeclarations.ts, 77, 15)) +>blah : Symbol(blah, Decl(unreachableDeclarations.ts, 77, 6)) +>prop : Symbol(prop, Decl(unreachableDeclarations.ts, 77, 15)) + + console.log(new Foo()) +>console.log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --)) +>console : Symbol(console, Decl(lib.dom.d.ts, --, --)) +>log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --)) +>Foo : Symbol(Foo, Decl(unreachableDeclarations.ts, 79, 15)) + + console.log(Baz.value); +>console.log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --)) +>console : Symbol(console, Decl(lib.dom.d.ts, --, --)) +>log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --)) +>Baz.value : Symbol(Baz.value, Decl(unreachableDeclarations.ts, 83, 29)) +>Baz : Symbol(Baz, Decl(unreachableDeclarations.ts, 81, 23)) +>value : Symbol(Baz.value, Decl(unreachableDeclarations.ts, 83, 29)) + } + + const blah = { prop: 1234 }; +>blah : Symbol(blah, Decl(unreachableDeclarations.ts, 77, 6)) +>prop : Symbol(prop, Decl(unreachableDeclarations.ts, 77, 15)) + + enum Bar { A } +>Bar : Symbol(Bar, Decl(unreachableDeclarations.ts, 77, 29)) +>A : Symbol(Bar.A, Decl(unreachableDeclarations.ts, 79, 11)) + + class Foo { x = 1234 } +>Foo : Symbol(Foo, Decl(unreachableDeclarations.ts, 79, 15)) +>x : Symbol(Foo.x, Decl(unreachableDeclarations.ts, 81, 12)) + + namespace Baz { export const value = 1234 } +>Baz : Symbol(Baz, Decl(unreachableDeclarations.ts, 81, 23)) +>value : Symbol(value, Decl(unreachableDeclarations.ts, 83, 29)) +} + diff --git a/tests/baselines/reference/unreachableDeclarations(preserveconstenums=true).types b/tests/baselines/reference/unreachableDeclarations(preserveconstenums=true).types new file mode 100644 index 0000000000000..9a54857c8d2ee --- /dev/null +++ b/tests/baselines/reference/unreachableDeclarations(preserveconstenums=true).types @@ -0,0 +1,442 @@ +//// [tests/cases/compiler/unreachableDeclarations.ts] //// + +=== unreachableDeclarations.ts === +function func1() { +>func1 : () => void +> : ^^^^^^^^^^ + + aFunc(); +>aFunc() : void +> : ^^^^ +>aFunc : () => void +> : ^^^^^^^^^^ + + console.log(EnumA.Value); +>console.log(EnumA.Value) : void +> : ^^^^ +>console.log : (...data: any[]) => void +> : ^^^^ ^^ ^^^^^ +>console : Console +> : ^^^^^^^ +>log : (...data: any[]) => void +> : ^^^^ ^^ ^^^^^ +>EnumA.Value : EnumA +> : ^^^^^ +>EnumA : typeof EnumA +> : ^^^^^^^^^^^^ +>Value : EnumA +> : ^^^^^ + + console.log(EnumB.Value); +>console.log(EnumB.Value) : void +> : ^^^^ +>console.log : (...data: any[]) => void +> : ^^^^ ^^ ^^^^^ +>console : Console +> : ^^^^^^^ +>log : (...data: any[]) => void +> : ^^^^ ^^ ^^^^^ +>EnumB.Value : EnumB +> : ^^^^^ +>EnumB : typeof EnumB +> : ^^^^^^^^^^^^ +>Value : EnumB +> : ^^^^^ + + return; + + function aFunc() { +>aFunc : () => void +> : ^^^^^^^^^^ + + console.log(EnumA.Value); +>console.log(EnumA.Value) : void +> : ^^^^ +>console.log : (...data: any[]) => void +> : ^^^^ ^^ ^^^^^ +>console : Console +> : ^^^^^^^ +>log : (...data: any[]) => void +> : ^^^^ ^^ ^^^^^ +>EnumA.Value : EnumA +> : ^^^^^ +>EnumA : typeof EnumA +> : ^^^^^^^^^^^^ +>Value : EnumA +> : ^^^^^ + + console.log(EnumB.Value); +>console.log(EnumB.Value) : void +> : ^^^^ +>console.log : (...data: any[]) => void +> : ^^^^ ^^ ^^^^^ +>console : Console +> : ^^^^^^^ +>log : (...data: any[]) => void +> : ^^^^ ^^ ^^^^^ +>EnumB.Value : EnumB +> : ^^^^^ +>EnumB : typeof EnumB +> : ^^^^^^^^^^^^ +>Value : EnumB +> : ^^^^^ + } + + enum EnumA { Value } +>EnumA : EnumA +> : ^^^^^ +>Value : EnumA.Value +> : ^^^^^^^^^^^ + + const enum EnumB { Value } +>EnumB : EnumB +> : ^^^^^ +>Value : EnumB.Value +> : ^^^^^^^^^^^ +} + +function func2() { +>func2 : () => void +> : ^^^^^^^^^^ + + aFunc(); +>aFunc() : void +> : ^^^^ +>aFunc : () => void +> : ^^^^^^^^^^ + + console.log(EnumA.Value); +>console.log(EnumA.Value) : void +> : ^^^^ +>console.log : (...data: any[]) => void +> : ^^^^ ^^ ^^^^^ +>console : Console +> : ^^^^^^^ +>log : (...data: any[]) => void +> : ^^^^ ^^ ^^^^^ +>EnumA.Value : EnumA +> : ^^^^^ +>EnumA : typeof EnumA +> : ^^^^^^^^^^^^ +>Value : EnumA +> : ^^^^^ + + return; + + function aFunc() { +>aFunc : () => void +> : ^^^^^^^^^^ + + console.log(EnumA.Value); +>console.log(EnumA.Value) : void +> : ^^^^ +>console.log : (...data: any[]) => void +> : ^^^^ ^^ ^^^^^ +>console : Console +> : ^^^^^^^ +>log : (...data: any[]) => void +> : ^^^^ ^^ ^^^^^ +>EnumA.Value : EnumA +> : ^^^^^ +>EnumA : typeof EnumA +> : ^^^^^^^^^^^^ +>Value : EnumA +> : ^^^^^ + } + + enum EnumA { Value } +>EnumA : EnumA +> : ^^^^^ +>Value : EnumA.Value +> : ^^^^^^^^^^^ +} + +function func3() { +>func3 : () => void +> : ^^^^^^^^^^ + + aFunc(); +>aFunc() : void +> : ^^^^ +>aFunc : () => void +> : ^^^^^^^^^^ + + console.log(EnumB.Value); +>console.log(EnumB.Value) : void +> : ^^^^ +>console.log : (...data: any[]) => void +> : ^^^^ ^^ ^^^^^ +>console : Console +> : ^^^^^^^ +>log : (...data: any[]) => void +> : ^^^^ ^^ ^^^^^ +>EnumB.Value : EnumB +> : ^^^^^ +>EnumB : typeof EnumB +> : ^^^^^^^^^^^^ +>Value : EnumB +> : ^^^^^ + + return; + + function aFunc() { +>aFunc : () => void +> : ^^^^^^^^^^ + + console.log(EnumB.Value); +>console.log(EnumB.Value) : void +> : ^^^^ +>console.log : (...data: any[]) => void +> : ^^^^ ^^ ^^^^^ +>console : Console +> : ^^^^^^^ +>log : (...data: any[]) => void +> : ^^^^ ^^ ^^^^^ +>EnumB.Value : EnumB +> : ^^^^^ +>EnumB : typeof EnumB +> : ^^^^^^^^^^^^ +>Value : EnumB +> : ^^^^^ + } + + const enum EnumB { Value } +>EnumB : EnumB +> : ^^^^^ +>Value : EnumB.Value +> : ^^^^^^^^^^^ +} + +function func4() { +>func4 : () => void +> : ^^^^^^^^^^ + + aFunc(); +>aFunc() : void +> : ^^^^ +>aFunc : () => void +> : ^^^^^^^^^^ + + console.log(ClassA.Value); +>console.log(ClassA.Value) : void +> : ^^^^ +>console.log : (...data: any[]) => void +> : ^^^^ ^^ ^^^^^ +>console : Console +> : ^^^^^^^ +>log : (...data: any[]) => void +> : ^^^^ ^^ ^^^^^ +>ClassA.Value : number +> : ^^^^^^ +>ClassA : typeof ClassA +> : ^^^^^^^^^^^^^ +>Value : number +> : ^^^^^^ + + return; + + function aFunc() { +>aFunc : () => void +> : ^^^^^^^^^^ + + console.log(ClassA.Value); +>console.log(ClassA.Value) : void +> : ^^^^ +>console.log : (...data: any[]) => void +> : ^^^^ ^^ ^^^^^ +>console : Console +> : ^^^^^^^ +>log : (...data: any[]) => void +> : ^^^^ ^^ ^^^^^ +>ClassA.Value : number +> : ^^^^^^ +>ClassA : typeof ClassA +> : ^^^^^^^^^^^^^ +>Value : number +> : ^^^^^^ + } + + class ClassA { static Value = 1234; } +>ClassA : ClassA +> : ^^^^^^ +>Value : number +> : ^^^^^^ +>1234 : 1234 +> : ^^^^ +} + +function func5() { +>func5 : () => void +> : ^^^^^^^^^^ + + aFunc(); +>aFunc() : void +> : ^^^^ +>aFunc : () => void +> : ^^^^^^^^^^ + + console.log(Bar.A); +>console.log(Bar.A) : void +> : ^^^^ +>console.log : (...data: any[]) => void +> : ^^^^ ^^ ^^^^^ +>console : Console +> : ^^^^^^^ +>log : (...data: any[]) => void +> : ^^^^ ^^ ^^^^^ +>Bar.A : Bar +> : ^^^ +>Bar : typeof Bar +> : ^^^^^^^^^^ +>A : Bar +> : ^^^ + + console.log(blah.prop); +>console.log(blah.prop) : void +> : ^^^^ +>console.log : (...data: any[]) => void +> : ^^^^ ^^ ^^^^^ +>console : Console +> : ^^^^^^^ +>log : (...data: any[]) => void +> : ^^^^ ^^ ^^^^^ +>blah.prop : number +> : ^^^^^^ +>blah : { prop: number; } +> : ^^^^^^^^^^^^^^^^^ +>prop : number +> : ^^^^^^ + + console.log(new Foo()) +>console.log(new Foo()) : void +> : ^^^^ +>console.log : (...data: any[]) => void +> : ^^^^ ^^ ^^^^^ +>console : Console +> : ^^^^^^^ +>log : (...data: any[]) => void +> : ^^^^ ^^ ^^^^^ +>new Foo() : Foo +> : ^^^ +>Foo : typeof Foo +> : ^^^^^^^^^^ + + console.log(Baz.value); +>console.log(Baz.value) : void +> : ^^^^ +>console.log : (...data: any[]) => void +> : ^^^^ ^^ ^^^^^ +>console : Console +> : ^^^^^^^ +>log : (...data: any[]) => void +> : ^^^^ ^^ ^^^^^ +>Baz.value : 1234 +> : ^^^^ +>Baz : typeof Baz +> : ^^^^^^^^^^ +>value : 1234 +> : ^^^^ + + + return; + + function aFunc() { +>aFunc : () => void +> : ^^^^^^^^^^ + + console.log(Bar.A); +>console.log(Bar.A) : void +> : ^^^^ +>console.log : (...data: any[]) => void +> : ^^^^ ^^ ^^^^^ +>console : Console +> : ^^^^^^^ +>log : (...data: any[]) => void +> : ^^^^ ^^ ^^^^^ +>Bar.A : Bar +> : ^^^ +>Bar : typeof Bar +> : ^^^^^^^^^^ +>A : Bar +> : ^^^ + + console.log(blah.prop); +>console.log(blah.prop) : void +> : ^^^^ +>console.log : (...data: any[]) => void +> : ^^^^ ^^ ^^^^^ +>console : Console +> : ^^^^^^^ +>log : (...data: any[]) => void +> : ^^^^ ^^ ^^^^^ +>blah.prop : number +> : ^^^^^^ +>blah : { prop: number; } +> : ^^^^^^^^^^^^^^^^^ +>prop : number +> : ^^^^^^ + + console.log(new Foo()) +>console.log(new Foo()) : void +> : ^^^^ +>console.log : (...data: any[]) => void +> : ^^^^ ^^ ^^^^^ +>console : Console +> : ^^^^^^^ +>log : (...data: any[]) => void +> : ^^^^ ^^ ^^^^^ +>new Foo() : Foo +> : ^^^ +>Foo : typeof Foo +> : ^^^^^^^^^^ + + console.log(Baz.value); +>console.log(Baz.value) : void +> : ^^^^ +>console.log : (...data: any[]) => void +> : ^^^^ ^^ ^^^^^ +>console : Console +> : ^^^^^^^ +>log : (...data: any[]) => void +> : ^^^^ ^^ ^^^^^ +>Baz.value : 1234 +> : ^^^^ +>Baz : typeof Baz +> : ^^^^^^^^^^ +>value : 1234 +> : ^^^^ + } + + const blah = { prop: 1234 }; +>blah : { prop: number; } +> : ^^^^^^^^^^^^^^^^^ +>{ prop: 1234 } : { prop: number; } +> : ^^^^^^^^^^^^^^^^^ +>prop : number +> : ^^^^^^ +>1234 : 1234 +> : ^^^^ + + enum Bar { A } +>Bar : Bar +> : ^^^ +>A : Bar.A +> : ^^^^^ + + class Foo { x = 1234 } +>Foo : Foo +> : ^^^ +>x : number +> : ^^^^^^ +>1234 : 1234 +> : ^^^^ + + namespace Baz { export const value = 1234 } +>Baz : typeof Baz +> : ^^^^^^^^^^ +>value : 1234 +> : ^^^^ +>1234 : 1234 +> : ^^^^ +} + diff --git a/tests/cases/compiler/unreachableDeclarations.ts b/tests/cases/compiler/unreachableDeclarations.ts new file mode 100644 index 0000000000000..71c30e8995cf3 --- /dev/null +++ b/tests/cases/compiler/unreachableDeclarations.ts @@ -0,0 +1,89 @@ +// @strict: true +// @preserveConstEnums: true, false +// @allowUnreachableCode: false + +function func1() { + aFunc(); + + console.log(EnumA.Value); + console.log(EnumB.Value); + + return; + + function aFunc() { + console.log(EnumA.Value); + console.log(EnumB.Value); + } + + enum EnumA { Value } + const enum EnumB { Value } +} + +function func2() { + aFunc(); + + console.log(EnumA.Value); + + return; + + function aFunc() { + console.log(EnumA.Value); + } + + enum EnumA { Value } +} + +function func3() { + aFunc(); + + console.log(EnumB.Value); + + return; + + function aFunc() { + console.log(EnumB.Value); + } + + const enum EnumB { Value } +} + +function func4() { + aFunc(); + + console.log(ClassA.Value); + + return; + + function aFunc() { + console.log(ClassA.Value); + } + + class ClassA { static Value = 1234; } +} + +function func5() { + aFunc(); + + console.log(Bar.A); + console.log(blah.prop); + console.log(new Foo()) + console.log(Baz.value); + + + return; + + function aFunc() { + console.log(Bar.A); + console.log(blah.prop); + console.log(new Foo()) + console.log(Baz.value); + } + + const blah = { prop: 1234 }; + + enum Bar { A } + + class Foo { x = 1234 } + + namespace Baz { export const value = 1234 } +} diff --git a/tests/cases/fourslash/codeFixUnreachableCode.ts b/tests/cases/fourslash/codeFixUnreachableCode.ts index 3940fbd916377..b5ad96e775b47 100644 --- a/tests/cases/fourslash/codeFixUnreachableCode.ts +++ b/tests/cases/fourslash/codeFixUnreachableCode.ts @@ -8,7 +8,7 @@ //// type T = number; //// interface I {} //// const enum E {} -//// enum EE {} +//// [|enum EE {}|] //// namespace N { export type T = number; } //// [|namespace N { export const x: T = 0; }|] //// var x: I; @@ -33,7 +33,6 @@ verify.codeFixAll({ type T = number; interface I {} const enum E {} - enum EE {} namespace N { export type T = number; } var x: I; }`, From 90da3ca5dd694f7029b535ea09727be899854d40 Mon Sep 17 00:00:00 2001 From: "CSIGS@microsoft.com" Date: Thu, 15 Aug 2024 07:46:11 -0700 Subject: [PATCH 35/50] LEGO: Pull request from lego/hb_5378966c-b857-470a-8675-daebef4a6da1_20240815102137942 to main (#59639) --- .../diagnosticMessages.generated.json.lcl | 9 +++++++++ .../diagnosticMessages.generated.json.lcl | 9 +++++++++ .../diagnosticMessages.generated.json.lcl | 9 +++++++++ .../diagnosticMessages.generated.json.lcl | 9 +++++++++ .../diagnosticMessages.generated.json.lcl | 9 +++++++++ .../diagnosticMessages.generated.json.lcl | 9 +++++++++ .../diagnosticMessages.generated.json.lcl | 9 +++++++++ .../diagnosticMessages.generated.json.lcl | 9 +++++++++ .../diagnosticMessages.generated.json.lcl | 9 +++++++++ .../diagnosticMessages.generated.json.lcl | 9 +++++++++ 10 files changed, 90 insertions(+) diff --git a/src/loc/lcl/cht/diagnosticMessages/diagnosticMessages.generated.json.lcl b/src/loc/lcl/cht/diagnosticMessages/diagnosticMessages.generated.json.lcl index 8c99492152309..5bf23fca03169 100644 --- a/src/loc/lcl/cht/diagnosticMessages/diagnosticMessages.generated.json.lcl +++ b/src/loc/lcl/cht/diagnosticMessages/diagnosticMessages.generated.json.lcl @@ -606,6 +606,15 @@ + + + + + + + + + diff --git a/src/loc/lcl/deu/diagnosticMessages/diagnosticMessages.generated.json.lcl b/src/loc/lcl/deu/diagnosticMessages/diagnosticMessages.generated.json.lcl index b0db27f65c541..73406c7390c6a 100644 --- a/src/loc/lcl/deu/diagnosticMessages/diagnosticMessages.generated.json.lcl +++ b/src/loc/lcl/deu/diagnosticMessages/diagnosticMessages.generated.json.lcl @@ -606,6 +606,15 @@ + + + + + + + + + diff --git a/src/loc/lcl/esn/diagnosticMessages/diagnosticMessages.generated.json.lcl b/src/loc/lcl/esn/diagnosticMessages/diagnosticMessages.generated.json.lcl index 0543040f6ca29..9ce7a3e0dd6d8 100644 --- a/src/loc/lcl/esn/diagnosticMessages/diagnosticMessages.generated.json.lcl +++ b/src/loc/lcl/esn/diagnosticMessages/diagnosticMessages.generated.json.lcl @@ -615,6 +615,15 @@ + + + + + + + + + diff --git a/src/loc/lcl/fra/diagnosticMessages/diagnosticMessages.generated.json.lcl b/src/loc/lcl/fra/diagnosticMessages/diagnosticMessages.generated.json.lcl index b6a6f64441b67..4c8476e717a4b 100644 --- a/src/loc/lcl/fra/diagnosticMessages/diagnosticMessages.generated.json.lcl +++ b/src/loc/lcl/fra/diagnosticMessages/diagnosticMessages.generated.json.lcl @@ -615,6 +615,15 @@ + + + + + + + + + diff --git a/src/loc/lcl/ita/diagnosticMessages/diagnosticMessages.generated.json.lcl b/src/loc/lcl/ita/diagnosticMessages/diagnosticMessages.generated.json.lcl index 4ce6abef8e886..7a9cd653ac6c3 100644 --- a/src/loc/lcl/ita/diagnosticMessages/diagnosticMessages.generated.json.lcl +++ b/src/loc/lcl/ita/diagnosticMessages/diagnosticMessages.generated.json.lcl @@ -606,6 +606,15 @@ + + + + + + + + + diff --git a/src/loc/lcl/jpn/diagnosticMessages/diagnosticMessages.generated.json.lcl b/src/loc/lcl/jpn/diagnosticMessages/diagnosticMessages.generated.json.lcl index dbc2cb6a118fb..cdbb3d06f4333 100644 --- a/src/loc/lcl/jpn/diagnosticMessages/diagnosticMessages.generated.json.lcl +++ b/src/loc/lcl/jpn/diagnosticMessages/diagnosticMessages.generated.json.lcl @@ -606,6 +606,15 @@ + + + + + + + + + diff --git a/src/loc/lcl/kor/diagnosticMessages/diagnosticMessages.generated.json.lcl b/src/loc/lcl/kor/diagnosticMessages/diagnosticMessages.generated.json.lcl index bfee618554c36..ad11df86a5fc9 100644 --- a/src/loc/lcl/kor/diagnosticMessages/diagnosticMessages.generated.json.lcl +++ b/src/loc/lcl/kor/diagnosticMessages/diagnosticMessages.generated.json.lcl @@ -606,6 +606,15 @@ + + + + + + + + + diff --git a/src/loc/lcl/ptb/diagnosticMessages/diagnosticMessages.generated.json.lcl b/src/loc/lcl/ptb/diagnosticMessages/diagnosticMessages.generated.json.lcl index 02808e593a6bb..241162d83a949 100644 --- a/src/loc/lcl/ptb/diagnosticMessages/diagnosticMessages.generated.json.lcl +++ b/src/loc/lcl/ptb/diagnosticMessages/diagnosticMessages.generated.json.lcl @@ -599,6 +599,15 @@ + + + + + + + + + diff --git a/src/loc/lcl/rus/diagnosticMessages/diagnosticMessages.generated.json.lcl b/src/loc/lcl/rus/diagnosticMessages/diagnosticMessages.generated.json.lcl index cfb83ab8fa43d..c23d259002690 100644 --- a/src/loc/lcl/rus/diagnosticMessages/diagnosticMessages.generated.json.lcl +++ b/src/loc/lcl/rus/diagnosticMessages/diagnosticMessages.generated.json.lcl @@ -605,6 +605,15 @@ + + + + + + + + + diff --git a/src/loc/lcl/trk/diagnosticMessages/diagnosticMessages.generated.json.lcl b/src/loc/lcl/trk/diagnosticMessages/diagnosticMessages.generated.json.lcl index 74bbe6d22201f..0e08be0489ced 100644 --- a/src/loc/lcl/trk/diagnosticMessages/diagnosticMessages.generated.json.lcl +++ b/src/loc/lcl/trk/diagnosticMessages/diagnosticMessages.generated.json.lcl @@ -599,6 +599,15 @@ + + + + + + + + + From 20f26a481b57cd8d5c10d07d2e9813e37911741a Mon Sep 17 00:00:00 2001 From: Dimitri Mitropoulos Date: Thu, 15 Aug 2024 12:26:41 -0400 Subject: [PATCH 36/50] allow `generateTrace` in tsconfig and compiler API (#59636) --- src/compiler/commandLineParser.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/compiler/commandLineParser.ts b/src/compiler/commandLineParser.ts index 86bb598c2a8df..ff566060cf2ca 100644 --- a/src/compiler/commandLineParser.ts +++ b/src/compiler/commandLineParser.ts @@ -437,7 +437,6 @@ export const commonOptionsWithBuild: CommandLineOption[] = [ name: "generateTrace", type: "string", isFilePath: true, - isCommandLineOnly: true, paramType: Diagnostics.DIRECTORY, category: Diagnostics.Compiler_Diagnostics, description: Diagnostics.Generates_an_event_trace_and_a_list_of_types, From a0530722fc14aa492f4e64149e2848e59d64e944 Mon Sep 17 00:00:00 2001 From: Zzzen Date: Fri, 16 Aug 2024 01:46:22 +0800 Subject: [PATCH 37/50] Improve inlining of string variables in template literals (#54849) --- src/services/refactors/inlineVariable.ts | 28 ++++++++++++++++++- .../inlineVariableTemplateString1.ts | 13 +++++++++ .../inlineVariableTemplateString10.ts | 13 +++++++++ .../inlineVariableTemplateString11.ts | 13 +++++++++ .../inlineVariableTemplateString2.ts | 13 +++++++++ .../inlineVariableTemplateString3.ts | 15 ++++++++++ .../inlineVariableTemplateString4.ts | 13 +++++++++ .../inlineVariableTemplateString5.ts | 13 +++++++++ .../inlineVariableTemplateString6.ts | 13 +++++++++ .../inlineVariableTemplateString7.ts | 13 +++++++++ .../inlineVariableTemplateString8.ts | 13 +++++++++ .../inlineVariableTemplateString9.ts | 13 +++++++++ 12 files changed, 172 insertions(+), 1 deletion(-) create mode 100644 tests/cases/fourslash/inlineVariableTemplateString1.ts create mode 100644 tests/cases/fourslash/inlineVariableTemplateString10.ts create mode 100644 tests/cases/fourslash/inlineVariableTemplateString11.ts create mode 100644 tests/cases/fourslash/inlineVariableTemplateString2.ts create mode 100644 tests/cases/fourslash/inlineVariableTemplateString3.ts create mode 100644 tests/cases/fourslash/inlineVariableTemplateString4.ts create mode 100644 tests/cases/fourslash/inlineVariableTemplateString5.ts create mode 100644 tests/cases/fourslash/inlineVariableTemplateString6.ts create mode 100644 tests/cases/fourslash/inlineVariableTemplateString7.ts create mode 100644 tests/cases/fourslash/inlineVariableTemplateString8.ts create mode 100644 tests/cases/fourslash/inlineVariableTemplateString9.ts diff --git a/src/services/refactors/inlineVariable.ts b/src/services/refactors/inlineVariable.ts index 0bcf841ce39e2..d18b94f04472b 100644 --- a/src/services/refactors/inlineVariable.ts +++ b/src/services/refactors/inlineVariable.ts @@ -24,6 +24,9 @@ import { isObjectLiteralExpression, isPropertyAccessExpression, isShorthandPropertyAssignment, + isStringLiteral, + isTaggedTemplateExpression, + isTemplateSpan, isTypeQueryNode, isVariableDeclarationInVariableStatement, isVariableStatement, @@ -33,11 +36,14 @@ import { refactor, some, SourceFile, + StringLiteral, SymbolFlags, + TemplateSpan, textChanges, textRangeContainsPositionInclusive, TypeChecker, VariableDeclaration, + walkUpParenthesizedExpressions, } from "../_namespaces/ts.js"; import { RefactorErrorInfo, @@ -115,7 +121,13 @@ registerRefactor(refactorName, { const { references, declaration, replacement } = info; const edits = textChanges.ChangeTracker.with(context, tracker => { for (const node of references) { - tracker.replaceNode(file, node, getReplacementExpression(node, replacement)); + const closestStringIdentifierParent = isStringLiteral(replacement) && isIdentifier(node) && walkUpParenthesizedExpressions(node.parent); + if (closestStringIdentifierParent && isTemplateSpan(closestStringIdentifierParent) && !isTaggedTemplateExpression(closestStringIdentifierParent.parent.parent)) { + replaceTemplateStringVariableWithLiteral(tracker, file, closestStringIdentifierParent, replacement); + } + else { + tracker.replaceNode(file, node, getReplacementExpression(node, replacement)); + } } tracker.delete(file, declaration); }); @@ -255,3 +267,17 @@ function getReplacementExpression(reference: Node, replacement: Expression) { return replacement; } + +function replaceTemplateStringVariableWithLiteral(tracker: textChanges.ChangeTracker, sourceFile: SourceFile, reference: TemplateSpan, replacement: StringLiteral) { + const templateExpression = reference.parent; + const index = templateExpression.templateSpans.indexOf(reference); + const prevNode = index === 0 ? templateExpression.head : templateExpression.templateSpans[index - 1]; + tracker.replaceRangeWithText( + sourceFile, + { + pos: prevNode.getEnd() - 2, + end: reference.literal.getStart() + 1, + }, + replacement.text.replace(/\\/g, "\\\\").replace(/`/g, "\\`"), + ); +} diff --git a/tests/cases/fourslash/inlineVariableTemplateString1.ts b/tests/cases/fourslash/inlineVariableTemplateString1.ts new file mode 100644 index 0000000000000..48df225455a55 --- /dev/null +++ b/tests/cases/fourslash/inlineVariableTemplateString1.ts @@ -0,0 +1,13 @@ +/// + +////const /*a*/pizza/*b*/ = "🍕"; +////export const prompt = `Hello, would you like some ${pizza}?`; + +goTo.select("a", "b"); +verify.refactorAvailable("Inline variable"); +edit.applyRefactor({ + refactorName: "Inline variable", + actionName: "Inline variable", + actionDescription: "Inline variable", + newContent: "export const prompt = `Hello, would you like some 🍕?`;" +}); \ No newline at end of file diff --git a/tests/cases/fourslash/inlineVariableTemplateString10.ts b/tests/cases/fourslash/inlineVariableTemplateString10.ts new file mode 100644 index 0000000000000..b6409d3133bac --- /dev/null +++ b/tests/cases/fourslash/inlineVariableTemplateString10.ts @@ -0,0 +1,13 @@ +/// + +////const /*a*/message/*b*/ = "Hello, World!"; +////await $`echo ${((message))}`; + +goTo.select("a", "b"); +verify.refactorAvailable("Inline variable"); +edit.applyRefactor({ + refactorName: "Inline variable", + actionName: "Inline variable", + actionDescription: "Inline variable", + newContent: 'await $`echo ${(("Hello, World!"))}`;', +}); \ No newline at end of file diff --git a/tests/cases/fourslash/inlineVariableTemplateString11.ts b/tests/cases/fourslash/inlineVariableTemplateString11.ts new file mode 100644 index 0000000000000..d626b3e4cf5f4 --- /dev/null +++ b/tests/cases/fourslash/inlineVariableTemplateString11.ts @@ -0,0 +1,13 @@ +/// + +////const /*a*/pizza/*b*/ = "🍕"; +////export const prompt = `Hello, would you like some ${((pizza))}?`; + +goTo.select("a", "b"); +verify.refactorAvailable("Inline variable"); +edit.applyRefactor({ + refactorName: "Inline variable", + actionName: "Inline variable", + actionDescription: "Inline variable", + newContent: "export const prompt = `Hello, would you like some 🍕?`;" +}); \ No newline at end of file diff --git a/tests/cases/fourslash/inlineVariableTemplateString2.ts b/tests/cases/fourslash/inlineVariableTemplateString2.ts new file mode 100644 index 0000000000000..0984278c1357c --- /dev/null +++ b/tests/cases/fourslash/inlineVariableTemplateString2.ts @@ -0,0 +1,13 @@ +/// + +////const /*a*/codeText/*b*/ = "Code-formatted text looks `like this` and requires surrounding by backticks (\\`)."; +////export const mdTutorial = `Let's talk about markdown.\n${codeText}?`; + +goTo.select("a", "b"); +verify.refactorAvailable("Inline variable"); +edit.applyRefactor({ + refactorName: "Inline variable", + actionName: "Inline variable", + actionDescription: "Inline variable", + newContent: "export const mdTutorial = `Let's talk about markdown.\\nCode-formatted text looks \\`like this\\` and requires surrounding by backticks (\\\\\\\`).?`;" +}); \ No newline at end of file diff --git a/tests/cases/fourslash/inlineVariableTemplateString3.ts b/tests/cases/fourslash/inlineVariableTemplateString3.ts new file mode 100644 index 0000000000000..9851f87961774 --- /dev/null +++ b/tests/cases/fourslash/inlineVariableTemplateString3.ts @@ -0,0 +1,15 @@ +/// + +////const /*a*/pizza/*b*/ = "🍕"; +////export const prompt = `Hello, would you like some ${ +//// pizza +//// }?`; + +goTo.select("a", "b"); +verify.refactorAvailable("Inline variable"); +edit.applyRefactor({ + refactorName: "Inline variable", + actionName: "Inline variable", + actionDescription: "Inline variable", + newContent: "export const prompt = `Hello, would you like some 🍕?`;" +}); \ No newline at end of file diff --git a/tests/cases/fourslash/inlineVariableTemplateString4.ts b/tests/cases/fourslash/inlineVariableTemplateString4.ts new file mode 100644 index 0000000000000..9a0dc1805f5a1 --- /dev/null +++ b/tests/cases/fourslash/inlineVariableTemplateString4.ts @@ -0,0 +1,13 @@ +/// + +////const /*a*/pizza/*b*/ = "🍕"; +////export const prompt = `Hello, would you like some ${pizza} or ${pizza}?`; + +goTo.select("a", "b"); +verify.refactorAvailable("Inline variable"); +edit.applyRefactor({ + refactorName: "Inline variable", + actionName: "Inline variable", + actionDescription: "Inline variable", + newContent: "export const prompt = `Hello, would you like some 🍕 or 🍕?`;" +}); \ No newline at end of file diff --git a/tests/cases/fourslash/inlineVariableTemplateString5.ts b/tests/cases/fourslash/inlineVariableTemplateString5.ts new file mode 100644 index 0000000000000..fd1f1c510b605 --- /dev/null +++ b/tests/cases/fourslash/inlineVariableTemplateString5.ts @@ -0,0 +1,13 @@ +/// + +////const /*a*/pizza/*b*/ = "🍕"; +////export const prompt = `Hello, would you like some ${pizza}`; + +goTo.select("a", "b"); +verify.refactorAvailable("Inline variable"); +edit.applyRefactor({ + refactorName: "Inline variable", + actionName: "Inline variable", + actionDescription: "Inline variable", + newContent: "export const prompt = `Hello, would you like some 🍕`;" +}); \ No newline at end of file diff --git a/tests/cases/fourslash/inlineVariableTemplateString6.ts b/tests/cases/fourslash/inlineVariableTemplateString6.ts new file mode 100644 index 0000000000000..9d04b8f4b292f --- /dev/null +++ b/tests/cases/fourslash/inlineVariableTemplateString6.ts @@ -0,0 +1,13 @@ +/// + +////const /*a*/x/*b*/ = "\\`"; +////export const y = `${x}`; + +goTo.select("a", "b"); +verify.refactorAvailable("Inline variable"); +edit.applyRefactor({ + refactorName: "Inline variable", + actionName: "Inline variable", + actionDescription: "Inline variable", + newContent: "export const y = `\\\\\\``;" +}); \ No newline at end of file diff --git a/tests/cases/fourslash/inlineVariableTemplateString7.ts b/tests/cases/fourslash/inlineVariableTemplateString7.ts new file mode 100644 index 0000000000000..c0315aa54b9e7 --- /dev/null +++ b/tests/cases/fourslash/inlineVariableTemplateString7.ts @@ -0,0 +1,13 @@ +/// + +////const /*a*/x/*b*/ = "`"; +////export const y = `${x}`; + +goTo.select("a", "b"); +verify.refactorAvailable("Inline variable"); +edit.applyRefactor({ + refactorName: "Inline variable", + actionName: "Inline variable", + actionDescription: "Inline variable", + newContent: "export const y = `\\``;" +}); \ No newline at end of file diff --git a/tests/cases/fourslash/inlineVariableTemplateString8.ts b/tests/cases/fourslash/inlineVariableTemplateString8.ts new file mode 100644 index 0000000000000..82e0abb8562e4 --- /dev/null +++ b/tests/cases/fourslash/inlineVariableTemplateString8.ts @@ -0,0 +1,13 @@ +/// + +////const /*a*/message/*b*/ = "Hello, World!"; +////await $`echo ${message}`; + +goTo.select("a", "b"); +verify.refactorAvailable("Inline variable"); +edit.applyRefactor({ + refactorName: "Inline variable", + actionName: "Inline variable", + actionDescription: "Inline variable", + newContent: 'await $`echo ${"Hello, World!"}`;', +}); \ No newline at end of file diff --git a/tests/cases/fourslash/inlineVariableTemplateString9.ts b/tests/cases/fourslash/inlineVariableTemplateString9.ts new file mode 100644 index 0000000000000..fc6ea1847964c --- /dev/null +++ b/tests/cases/fourslash/inlineVariableTemplateString9.ts @@ -0,0 +1,13 @@ +/// + +////const /*a*/message/*b*/ = "Hello, World!"; +////await $`echo ${(message)}`; + +goTo.select("a", "b"); +verify.refactorAvailable("Inline variable"); +edit.applyRefactor({ + refactorName: "Inline variable", + actionName: "Inline variable", + actionDescription: "Inline variable", + newContent: 'await $`echo ${("Hello, World!")}`;', +}); \ No newline at end of file From aaa6c4e26c053ada8cbed6f1aa743f979331c6e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20Burzy=C5=84ski?= Date: Thu, 15 Aug 2024 20:00:37 +0200 Subject: [PATCH 38/50] Add an extra test case for narrowing of union containing a type parameter (#59628) --- ...lFlowUnionContainingTypeParameter1.symbols | 105 ++++++++++++ ...rolFlowUnionContainingTypeParameter1.types | 153 ++++++++++++++++++ ...ontrolFlowUnionContainingTypeParameter1.ts | 35 ++++ 3 files changed, 293 insertions(+) create mode 100644 tests/baselines/reference/controlFlowUnionContainingTypeParameter1.symbols create mode 100644 tests/baselines/reference/controlFlowUnionContainingTypeParameter1.types create mode 100644 tests/cases/compiler/controlFlowUnionContainingTypeParameter1.ts diff --git a/tests/baselines/reference/controlFlowUnionContainingTypeParameter1.symbols b/tests/baselines/reference/controlFlowUnionContainingTypeParameter1.symbols new file mode 100644 index 0000000000000..4429e97076f32 --- /dev/null +++ b/tests/baselines/reference/controlFlowUnionContainingTypeParameter1.symbols @@ -0,0 +1,105 @@ +//// [tests/cases/compiler/controlFlowUnionContainingTypeParameter1.ts] //// + +=== controlFlowUnionContainingTypeParameter1.ts === +// https://github.com/microsoft/TypeScript/issues/44814 + +class TestClass { +>TestClass : Symbol(TestClass, Decl(controlFlowUnionContainingTypeParameter1.ts, 0, 0)) +>T : Symbol(T, Decl(controlFlowUnionContainingTypeParameter1.ts, 2, 16)) + + typeguard(val: unknown): val is T { +>typeguard : Symbol(TestClass.typeguard, Decl(controlFlowUnionContainingTypeParameter1.ts, 2, 20)) +>val : Symbol(val, Decl(controlFlowUnionContainingTypeParameter1.ts, 3, 12)) +>val : Symbol(val, Decl(controlFlowUnionContainingTypeParameter1.ts, 3, 12)) +>T : Symbol(T, Decl(controlFlowUnionContainingTypeParameter1.ts, 2, 16)) + + return true; + } + f(v: number): void {} +>f : Symbol(TestClass.f, Decl(controlFlowUnionContainingTypeParameter1.ts, 5, 3)) +>v : Symbol(v, Decl(controlFlowUnionContainingTypeParameter1.ts, 6, 4)) + + h(v: T): void {} +>h : Symbol(TestClass.h, Decl(controlFlowUnionContainingTypeParameter1.ts, 6, 23)) +>v : Symbol(v, Decl(controlFlowUnionContainingTypeParameter1.ts, 7, 4)) +>T : Symbol(T, Decl(controlFlowUnionContainingTypeParameter1.ts, 2, 16)) + + func(val: T | number): void { +>func : Symbol(TestClass.func, Decl(controlFlowUnionContainingTypeParameter1.ts, 7, 18)) +>val : Symbol(val, Decl(controlFlowUnionContainingTypeParameter1.ts, 8, 7)) +>T : Symbol(T, Decl(controlFlowUnionContainingTypeParameter1.ts, 2, 16)) + + if (this.typeguard(val)) { +>this.typeguard : Symbol(TestClass.typeguard, Decl(controlFlowUnionContainingTypeParameter1.ts, 2, 20)) +>this : Symbol(TestClass, Decl(controlFlowUnionContainingTypeParameter1.ts, 0, 0)) +>typeguard : Symbol(TestClass.typeguard, Decl(controlFlowUnionContainingTypeParameter1.ts, 2, 20)) +>val : Symbol(val, Decl(controlFlowUnionContainingTypeParameter1.ts, 8, 7)) + + this.h(val); +>this.h : Symbol(TestClass.h, Decl(controlFlowUnionContainingTypeParameter1.ts, 6, 23)) +>this : Symbol(TestClass, Decl(controlFlowUnionContainingTypeParameter1.ts, 0, 0)) +>h : Symbol(TestClass.h, Decl(controlFlowUnionContainingTypeParameter1.ts, 6, 23)) +>val : Symbol(val, Decl(controlFlowUnionContainingTypeParameter1.ts, 8, 7)) + + return; + } + this.f(val); +>this.f : Symbol(TestClass.f, Decl(controlFlowUnionContainingTypeParameter1.ts, 5, 3)) +>this : Symbol(TestClass, Decl(controlFlowUnionContainingTypeParameter1.ts, 0, 0)) +>f : Symbol(TestClass.f, Decl(controlFlowUnionContainingTypeParameter1.ts, 5, 3)) +>val : Symbol(val, Decl(controlFlowUnionContainingTypeParameter1.ts, 8, 7)) + } +} + +class TestClass2 { +>TestClass2 : Symbol(TestClass2, Decl(controlFlowUnionContainingTypeParameter1.ts, 15, 1)) +>T : Symbol(T, Decl(controlFlowUnionContainingTypeParameter1.ts, 17, 17)) +>Date : Symbol(Date, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.scripthost.d.ts, --, --)) + + typeguard(val: unknown): val is T { +>typeguard : Symbol(TestClass2.typeguard, Decl(controlFlowUnionContainingTypeParameter1.ts, 17, 34)) +>val : Symbol(val, Decl(controlFlowUnionContainingTypeParameter1.ts, 18, 12)) +>val : Symbol(val, Decl(controlFlowUnionContainingTypeParameter1.ts, 18, 12)) +>T : Symbol(T, Decl(controlFlowUnionContainingTypeParameter1.ts, 17, 17)) + + return true; + } + f(v: number): void {} +>f : Symbol(TestClass2.f, Decl(controlFlowUnionContainingTypeParameter1.ts, 20, 3)) +>v : Symbol(v, Decl(controlFlowUnionContainingTypeParameter1.ts, 21, 4)) + + h(v: T): void {} +>h : Symbol(TestClass2.h, Decl(controlFlowUnionContainingTypeParameter1.ts, 21, 23)) +>v : Symbol(v, Decl(controlFlowUnionContainingTypeParameter1.ts, 22, 4)) +>T : Symbol(T, Decl(controlFlowUnionContainingTypeParameter1.ts, 17, 17)) + + func(val: T | number): void { +>func : Symbol(TestClass2.func, Decl(controlFlowUnionContainingTypeParameter1.ts, 22, 18)) +>val : Symbol(val, Decl(controlFlowUnionContainingTypeParameter1.ts, 23, 7)) +>T : Symbol(T, Decl(controlFlowUnionContainingTypeParameter1.ts, 17, 17)) + + if (this.typeguard(val)) { +>this.typeguard : Symbol(TestClass2.typeguard, Decl(controlFlowUnionContainingTypeParameter1.ts, 17, 34)) +>this : Symbol(TestClass2, Decl(controlFlowUnionContainingTypeParameter1.ts, 15, 1)) +>typeguard : Symbol(TestClass2.typeguard, Decl(controlFlowUnionContainingTypeParameter1.ts, 17, 34)) +>val : Symbol(val, Decl(controlFlowUnionContainingTypeParameter1.ts, 23, 7)) + + this.h(val); +>this.h : Symbol(TestClass2.h, Decl(controlFlowUnionContainingTypeParameter1.ts, 21, 23)) +>this : Symbol(TestClass2, Decl(controlFlowUnionContainingTypeParameter1.ts, 15, 1)) +>h : Symbol(TestClass2.h, Decl(controlFlowUnionContainingTypeParameter1.ts, 21, 23)) +>val : Symbol(val, Decl(controlFlowUnionContainingTypeParameter1.ts, 23, 7)) + + return; + } + val; +>val : Symbol(val, Decl(controlFlowUnionContainingTypeParameter1.ts, 23, 7)) + + this.f(val); +>this.f : Symbol(TestClass2.f, Decl(controlFlowUnionContainingTypeParameter1.ts, 20, 3)) +>this : Symbol(TestClass2, Decl(controlFlowUnionContainingTypeParameter1.ts, 15, 1)) +>f : Symbol(TestClass2.f, Decl(controlFlowUnionContainingTypeParameter1.ts, 20, 3)) +>val : Symbol(val, Decl(controlFlowUnionContainingTypeParameter1.ts, 23, 7)) + } +} + diff --git a/tests/baselines/reference/controlFlowUnionContainingTypeParameter1.types b/tests/baselines/reference/controlFlowUnionContainingTypeParameter1.types new file mode 100644 index 0000000000000..4a3c2dd1f84eb --- /dev/null +++ b/tests/baselines/reference/controlFlowUnionContainingTypeParameter1.types @@ -0,0 +1,153 @@ +//// [tests/cases/compiler/controlFlowUnionContainingTypeParameter1.ts] //// + +=== controlFlowUnionContainingTypeParameter1.ts === +// https://github.com/microsoft/TypeScript/issues/44814 + +class TestClass { +>TestClass : TestClass +> : ^^^^^^^^^^^^ + + typeguard(val: unknown): val is T { +>typeguard : (val: unknown) => val is T +> : ^ ^^ ^^^^^ +>val : unknown +> : ^^^^^^^ + + return true; +>true : true +> : ^^^^ + } + f(v: number): void {} +>f : (v: number) => void +> : ^ ^^ ^^^^^ +>v : number +> : ^^^^^^ + + h(v: T): void {} +>h : (v: T) => void +> : ^ ^^ ^^^^^ +>v : T +> : ^ + + func(val: T | number): void { +>func : (val: T | number) => void +> : ^ ^^ ^^^^^ +>val : number | T +> : ^^^^^^^^^^ + + if (this.typeguard(val)) { +>this.typeguard(val) : boolean +> : ^^^^^^^ +>this.typeguard : (val: unknown) => val is T +> : ^ ^^ ^^^^^ +>this : this +> : ^^^^ +>typeguard : (val: unknown) => val is T +> : ^ ^^ ^^^^^ +>val : number | T +> : ^^^^^^^^^^ + + this.h(val); +>this.h(val) : void +> : ^^^^ +>this.h : (v: T) => void +> : ^ ^^ ^^^^^ +>this : this +> : ^^^^ +>h : (v: T) => void +> : ^ ^^ ^^^^^ +>val : T +> : ^ + + return; + } + this.f(val); +>this.f(val) : void +> : ^^^^ +>this.f : (v: number) => void +> : ^ ^^ ^^^^^ +>this : this +> : ^^^^ +>f : (v: number) => void +> : ^ ^^ ^^^^^ +>val : number +> : ^^^^^^ + } +} + +class TestClass2 { +>TestClass2 : TestClass2 +> : ^^^^^^^^^^^^^ + + typeguard(val: unknown): val is T { +>typeguard : (val: unknown) => val is T +> : ^ ^^ ^^^^^ +>val : unknown +> : ^^^^^^^ + + return true; +>true : true +> : ^^^^ + } + f(v: number): void {} +>f : (v: number) => void +> : ^ ^^ ^^^^^ +>v : number +> : ^^^^^^ + + h(v: T): void {} +>h : (v: T) => void +> : ^ ^^ ^^^^^ +>v : T +> : ^ + + func(val: T | number): void { +>func : (val: T | number) => void +> : ^ ^^ ^^^^^ +>val : number | T +> : ^^^^^^^^^^ + + if (this.typeguard(val)) { +>this.typeguard(val) : boolean +> : ^^^^^^^ +>this.typeguard : (val: unknown) => val is T +> : ^ ^^ ^^^^^ +>this : this +> : ^^^^ +>typeguard : (val: unknown) => val is T +> : ^ ^^ ^^^^^ +>val : number | T +> : ^^^^^^^^^^ + + this.h(val); +>this.h(val) : void +> : ^^^^ +>this.h : (v: T) => void +> : ^ ^^ ^^^^^ +>this : this +> : ^^^^ +>h : (v: T) => void +> : ^ ^^ ^^^^^ +>val : T +> : ^ + + return; + } + val; +>val : number +> : ^^^^^^ + + this.f(val); +>this.f(val) : void +> : ^^^^ +>this.f : (v: number) => void +> : ^ ^^ ^^^^^ +>this : this +> : ^^^^ +>f : (v: number) => void +> : ^ ^^ ^^^^^ +>val : number +> : ^^^^^^ + } +} + diff --git a/tests/cases/compiler/controlFlowUnionContainingTypeParameter1.ts b/tests/cases/compiler/controlFlowUnionContainingTypeParameter1.ts new file mode 100644 index 0000000000000..3880157f13640 --- /dev/null +++ b/tests/cases/compiler/controlFlowUnionContainingTypeParameter1.ts @@ -0,0 +1,35 @@ +// @strict: true +// @noEmit: true + +// https://github.com/microsoft/TypeScript/issues/44814 + +class TestClass { + typeguard(val: unknown): val is T { + return true; + } + f(v: number): void {} + h(v: T): void {} + func(val: T | number): void { + if (this.typeguard(val)) { + this.h(val); + return; + } + this.f(val); + } +} + +class TestClass2 { + typeguard(val: unknown): val is T { + return true; + } + f(v: number): void {} + h(v: T): void {} + func(val: T | number): void { + if (this.typeguard(val)) { + this.h(val); + return; + } + val; + this.f(val); + } +} From 5fd6a6fd8d48be283528b73f0727d4816d97d65b Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Thu, 15 Aug 2024 11:48:11 -0700 Subject: [PATCH 39/50] Revert of Search ancestor and its references for default projects #57196 (#59634) --- src/server/editorServices.ts | 124 +- ...-are-all-closed-when-the-update-happens.js | 1 - ...oject-as-part-of-configured-file-update.js | 1 - ...onfig-file-in-a-folder-with-loose-files.js | 3 - ...-and-file-from-first-config-is-not-open.js | 805 +++++++------ ...file-when-parent-folder-has-config-file.js | 708 ++++++----- ...-and-file-from-first-config-is-not-open.js | 804 +++++++------ ...-config-file-with-sibling-jsconfig-file.js | 721 ++++++------ ...er-old-one-without-file-being-in-config.js | 1 - ...re-old-one-without-file-being-in-config.js | 1 - ...er-old-one-without-file-being-in-config.js | 1 - ...invoked,-ask-errors-on-it-after-old-one.js | 1 - ...re-old-one-without-file-being-in-config.js | 1 - ...nvoked,-ask-errors-on-it-before-old-one.js | 1 - ...ndle-@types-if-input-file-list-is-empty.js | 1 - ...e-tolerated-without-crashing-the-server.js | 1 - ...ting-files-specified-in-the-config-file.js | 1 - ...nclude-files-that-start-in-subDirectory.js | 1 - ...gured-project-does-not-contain-the-file.js | 1 - ...zyConfiguredProjectsFromExternalProject.js | 1 - ...config-file-name-with-difference-casing.js | 1 - ...re-jsconfig-creation-watcher-is-invoked.js | 1 - .../autoImportCrossProject_baseUrl_toDist.js | 1 - .../autoImportCrossProject_paths_stripSrc.js | 1 - .../autoImportCrossProject_paths_toDist.js | 1 - .../autoImportCrossProject_paths_toDist2.js | 1 - .../autoImportCrossProject_paths_toSrc.js | 1 - ...utoImportCrossProject_symlinks_stripSrc.js | 1 - .../autoImportCrossProject_symlinks_toDist.js | 1 - .../autoImportCrossProject_symlinks_toSrc.js | 1 - .../fourslashServer/autoImportProvider4.js | 1 - .../fourslashServer/autoImportProvider6.js | 1 - .../fourslashServer/autoImportProvider7.js | 1 - .../fourslashServer/autoImportProvider8.js | 1 - .../autoImportProvider_exportMap1.js | 1 - .../autoImportProvider_exportMap2.js | 1 - .../autoImportProvider_exportMap3.js | 1 - .../autoImportProvider_exportMap4.js | 1 - .../autoImportProvider_exportMap5.js | 1 - .../autoImportProvider_exportMap6.js | 1 - .../autoImportProvider_exportMap7.js | 1 - .../autoImportProvider_exportMap8.js | 1 - .../autoImportProvider_exportMap9.js | 1 - .../autoImportProvider_importsMap1.js | 1 - .../autoImportProvider_importsMap2.js | 1 - .../autoImportProvider_importsMap3.js | 1 - .../autoImportProvider_importsMap4.js | 1 - .../autoImportProvider_importsMap5.js | 1 - .../autoImportProvider_pnpm.js | 1 - .../autoImportProvider_referencesCrash.js | 1 - .../autoImportReExportFromAmbientModule.js | 1 - ...autoImportRelativePathToMonorepoPackage.js | 1 - ...mport_addToNamedWithDifferentCacheValue.js | 1 - .../completionsImport_computedSymbolName.js | 1 - ...nsImport_defaultAndNamedConflict_server.js | 1 - ...letionsImport_jsModuleExportsAssignment.js | 1 - .../completionsImport_mergedReExport.js | 1 - ...mpletionsImport_sortingModuleSpecifiers.js | 1 - .../completionsOverridingMethodCrash2.js | 1 - .../fourslashServer/configurePlugin.js | 1 - .../declarationMapsEnableMapping_NoInline.js | 2 - ...rationMapsEnableMapping_NoInlineSources.js | 2 - ...clarationMapsGeneratedMapsEnableMapping.js | 2 - ...larationMapsGeneratedMapsEnableMapping2.js | 2 - ...larationMapsGeneratedMapsEnableMapping3.js | 2 - .../getFileReferences_deduplicate.js | 1 - .../getFileReferences_server1.js | 1 - .../getFileReferences_server2.js | 1 - .../fourslashServer/goToSource15_bundler.js | 1 - .../fourslashServer/impliedNodeFormat.js | 1 - ...importFixes_ambientCircularDefaultCrash.js | 1 - ...importNameCodeFix_externalNonRelateive2.js | 1 - .../importNameCodeFix_pnpm1.js | 1 - .../importStatementCompletions_pnpm1.js | 1 - ...portStatementCompletions_pnpmTransitive.js | 1 - .../importSuggestionsCache_ambient.js | 1 - .../importSuggestionsCache_coreNodeModules.js | 1 - .../importSuggestionsCache_exportUndefined.js | 1 - ...portSuggestionsCache_invalidPackageJson.js | 1 - ...portSuggestionsCache_moduleAugmentation.js | 1 - .../tsserver/fourslashServer/ngProxy1.js | 1 - .../tsserver/fourslashServer/ngProxy2.js | 1 - .../tsserver/fourslashServer/ngProxy3.js | 1 - .../tsserver/fourslashServer/ngProxy4.js | 1 - .../nodeNextModuleKindCaching1.js | 1 - ...ferencesInEmptyFileWithMultipleProjects.js | 1 - ...nStringLiteralValueWithMultipleProjects.js | 1 - .../fourslashServer/renameNamedImport.js | 184 +-- .../fourslashServer/renameNamespaceImport.js | 184 +-- .../tripleSlashReferenceResolutionMode.js | 1 - .../tsconfigComputedPropertyError.js | 1 - ...rks-with-file-moved-to-inferred-project.js | 1 - .../import-helpers-successfully.js | 1 - ...-project-created-while-opening-the-file.js | 3 - ...re-added,-caches-them,-and-watches-them.js | 1 - ...ultiple-package.json-files-when-present.js | 1 - ...r-deletion,-and-removes-them-from-cache.js | 1 - .../handles-empty-package.json.js | 1 - ...-errors-in-json-parsing-of-package.json.js | 1 - ...-file-opened-and-config-file-has-errors.js | 2 - ...le-opened-and-doesnt-contain-any-errors.js | 2 - ...dProjectLoad-is-set-in-indirect-project.js | 3 - ...-if-disableReferencedProjectLoad-is-set.js | 3 - ...dProjectLoad-is-set-in-indirect-project.js | 3 - ...-if-disableReferencedProjectLoad-is-set.js | 3 - ...-composite-with-file-open-before-revert.js | 755 ++++-------- ...nfig-tree-found-appConfig-not-composite.js | 658 +++-------- ...fig-change-with-file-open-before-revert.js | 1031 +++-------------- ...rst-config-tree-found-demoConfig-change.js | 948 ++------------- ...config-tree-found-finds-default-project.js | 726 +++--------- ...first-config-tree-found-reload-projects.js | 584 ++-------- ...fig-delete-with-file-open-before-revert.js | 715 ++++-------- ...config-tree-found-solutionConfig-delete.js | 647 +++-------- ...ce-to-demo-with-file-open-before-revert.js | 890 +++----------- ...olutionConfig-without-reference-to-demo.js | 817 +++---------- .../with-dts-file-next-to-ts-file.js | 1 - ...configured-project-that-will-be-removed.js | 184 ++- ...configured-project-that-will-be-removed.js | 323 +++++- .../loading-files-with-correct-priority.js | 1 - ...configured-project-that-will-be-removed.js | 168 ++- ...iles-excluded-from-a-configured-project.js | 1 - 121 files changed, 3861 insertions(+), 8235 deletions(-) diff --git a/src/server/editorServices.ts b/src/server/editorServices.ts index acd3088ec250c..2ce702d694988 100644 --- a/src/server/editorServices.ts +++ b/src/server/editorServices.ts @@ -31,7 +31,6 @@ import { DocumentRegistry, DocumentRegistryBucketKeyWithMode, emptyOptions, - endsWith, ensureTrailingDirectorySeparator, equateStringsCaseInsensitive, equateStringsCaseSensitive, @@ -645,37 +644,10 @@ export interface ProjectServiceOptions { */ export type ConfigFileName = NormalizedPath | false; -/** - * Stores cached config file name for info as well as ancestor so is a map - * Key is false for Open ScriptInfo - * Key is NormalizedPath for Config file name - * @internal - */ -export type ConfigFileMapForOpenFile = Map; - -/** - * The cache for open script info will have - * ConfigFileName or false if ancestors are not looked up - * Map if ancestors are looked up - * @internal - */ -export type ConfigFileForOpenFile = ConfigFileName | ConfigFileMapForOpenFile; - /** Gets cached value of config file name based on open script info or ancestor script info */ -function getConfigFileNameFromCache(info: OpenScriptInfoOrClosedOrConfigFileInfo, cache: Map | undefined): ConfigFileName | undefined { - if (!cache) return undefined; - const configFileForOpenFile = cache.get(info.path); - if (configFileForOpenFile === undefined) return undefined; - if (!isAncestorConfigFileInfo(info)) { - return isString(configFileForOpenFile) || !configFileForOpenFile ? - configFileForOpenFile : // direct result - configFileForOpenFile.get(/*key*/ false); // Its a map, use false as the key for the info's config file name - } - else { - return configFileForOpenFile && !isString(configFileForOpenFile) ? // Map with fileName as key - configFileForOpenFile.get(info.fileName) : - undefined; // No result for the config file name - } +function getConfigFileNameFromCache(info: OpenScriptInfoOrClosedOrConfigFileInfo, cache: Map | undefined): ConfigFileName | undefined { + if (!cache || isAncestorConfigFileInfo(info)) return undefined; + return cache.get(info.path); } /** @internal */ @@ -690,7 +662,6 @@ export interface AncestorConfigFileInfo { /** path of open file so we can look at correct root */ path: Path; configFileInfo: true; - isForDefaultProject: boolean; } /** @internal */ export type OpenScriptInfoOrClosedFileInfo = ScriptInfo | OriginalFileInfo; @@ -739,8 +710,6 @@ function forEachAncestorProject( allowDeferredClosed: boolean | undefined, /** Used with ConfiguredProjectLoadKind.Reload to check if this project was already reloaded */ reloadedProjects: Set | undefined, - /** true means we are looking for solution, so we can stop if found project is not composite to go into parent solution */ - searchOnlyPotentialSolution: boolean, /** Used with ConfiguredProjectLoadKind.Reload to specify delay reload, and also a set of configured projects already marked for delay load */ delayReloadedConfiguredProjects?: Set, ): T | undefined { @@ -750,10 +719,7 @@ function forEachAncestorProject( if ( !project.isInitialLoadPending() && ( - (searchOnlyPotentialSolution && !project.getCompilerOptions().composite) || - // Currently disableSolutionSearching is shared for finding solution/project when - // - loading solution for find all references - // - trying to find default project + !project.getCompilerOptions().composite || project.getCompilerOptions().disableSolutionSearching ) ) return; @@ -763,7 +729,6 @@ function forEachAncestorProject( fileName: project.getConfigFilePath(), path: info.path, configFileInfo: true, - isForDefaultProject: !searchOnlyPotentialSolution, }, kind === ConfiguredProjectLoadKind.Find); if (!configFileName) return; @@ -773,9 +738,9 @@ function forEachAncestorProject( kind, reason, allowDeferredClosed, - !searchOnlyPotentialSolution ? info.fileName : undefined, // Config Diag event for project if its for default project + /*triggerFile*/ undefined, reloadedProjects, - searchOnlyPotentialSolution, // Delay load if we are searching for solution + /*delayLoad*/ true, delayReloadedConfiguredProjects, ); if (!ancestor) return; @@ -1241,7 +1206,7 @@ export class ProjectService { */ readonly openFiles: Map = new Map(); /** Config files looked up and cached config files for open script info */ - private readonly configFileForOpenFiles = new Map(); + private readonly configFileForOpenFiles = new Map(); /** Set of open script infos that are root of inferred project */ private rootOfInferredProjects = new Set(); /** @@ -1280,7 +1245,7 @@ export class ProjectService { * All the open script info that needs recalculation of the default project, * this also caches config file info before config file change was detected to use it in case projects are not updated yet */ - private pendingOpenFileProjectUpdates?: Map; + private pendingOpenFileProjectUpdates?: Map; /** @internal */ pendingEnsureProjectForOpenFiles = false; @@ -2290,7 +2255,7 @@ export class ProjectService { const configFileExistenceInfo = this.configFileExistenceInfoCache.get(canonicalConfigFilePath); let openFilesImpactedByConfigFile: Set | undefined; - if (this.openFiles.has(info.path) && (!isAncestorConfigFileInfo(info) || info.isForDefaultProject)) { + if (this.openFiles.has(info.path) && !isAncestorConfigFileInfo(info)) { // By default the info would get impacted by presence of config file since its in the detection path // Only adding the info as a root to inferred project will need the existence to be watched by file watcher if (configFileExistenceInfo) (configFileExistenceInfo.openFilesImpactedByConfigFile ??= new Set()).add(info.path); @@ -2483,39 +2448,31 @@ export class ProjectService { // If projectRootPath doesn't contain info.path, then do normal search for config file const anySearchPathOk = !projectRootPath || !isSearchPathInProjectRoot(); - - let searchTsconfig = true; - let searchJsconfig = true; - if (isAncestorConfigFileInfo(info)) { - // For ancestor of config file always ignore itself - if (endsWith(info.fileName, "tsconfig.json")) searchTsconfig = false; - else searchTsconfig = searchJsconfig = false; - } + // For ancestor of config file always ignore its own directory since its going to result in itself + let searchInDirectory = !isAncestorConfigFileInfo(info); do { - const canonicalSearchPath = normalizedPathToPath(searchPath, this.currentDirectory, this.toCanonicalFileName); - if (searchTsconfig) { + if (searchInDirectory) { + const canonicalSearchPath = normalizedPathToPath(searchPath, this.currentDirectory, this.toCanonicalFileName); const tsconfigFileName = asNormalizedPath(combinePaths(searchPath, "tsconfig.json")); - const result = action(combinePaths(canonicalSearchPath, "tsconfig.json") as NormalizedPath, tsconfigFileName); + let result = action(combinePaths(canonicalSearchPath, "tsconfig.json") as NormalizedPath, tsconfigFileName); if (result) return tsconfigFileName; - } - if (searchJsconfig) { const jsconfigFileName = asNormalizedPath(combinePaths(searchPath, "jsconfig.json")); - const result = action(combinePaths(canonicalSearchPath, "jsconfig.json") as NormalizedPath, jsconfigFileName); + result = action(combinePaths(canonicalSearchPath, "jsconfig.json") as NormalizedPath, jsconfigFileName); if (result) return jsconfigFileName; - } - // If we started within node_modules, don't look outside node_modules. - // Otherwise, we might pick up a very large project and pull in the world, - // causing an editor delay. - if (isNodeModulesDirectory(canonicalSearchPath)) { - break; + // If we started within node_modules, don't look outside node_modules. + // Otherwise, we might pick up a very large project and pull in the world, + // causing an editor delay. + if (isNodeModulesDirectory(canonicalSearchPath)) { + break; + } } const parentPath = asNormalizedPath(getDirectoryPath(searchPath)); if (parentPath === searchPath) break; searchPath = parentPath; - searchTsconfig = searchJsconfig = true; + searchInDirectory = true; } while (anySearchPathOk || isSearchPathInProjectRoot()); @@ -2550,24 +2507,8 @@ export class ProjectService { configFileName: NormalizedPath | undefined, ) { if (!this.openFiles.has(info.path)) return; // Dont cache for closed script infos - const config = configFileName || false; - if (!isAncestorConfigFileInfo(info)) { - // Set value for open script info - this.configFileForOpenFiles.set(info.path, config); - } - else { - // Need to set value for ancestor in ConfigFileMapForOpenFile - let configFileForOpenFile = this.configFileForOpenFiles.get(info.path)!; - if (!configFileForOpenFile || isString(configFileForOpenFile)) { - // We have value for open script info in cache, make a map with that as false key and set new vlaue - this.configFileForOpenFiles.set( - info.path, - configFileForOpenFile = new Map().set(false, configFileForOpenFile), - ); - } - // Set value of for ancestor in the map - configFileForOpenFile.set(info.fileName, config); - } + if (isAncestorConfigFileInfo(info)) return; // Dont cache for ancestors + this.configFileForOpenFiles.set(info.path, configFileName || false); } /** @@ -4293,8 +4234,7 @@ export class ProjectService { function tryFindDefaultConfiguredProject(project: ConfiguredProject): ConfiguredProject | undefined { return isDefaultProject(project) ? defaultProject : - (tryFindDefaultConfiguredProjectFromReferences(project) ?? - tryFindDefaultConfiguredProjectFromAncestor(project)); + tryFindDefaultConfiguredProjectFromReferences(project); } function isDefaultProject(project: ConfiguredProject): ConfiguredProject | undefined { @@ -4324,19 +4264,6 @@ export class ProjectService { reloadedProjects, ); } - - function tryFindDefaultConfiguredProjectFromAncestor(project: ConfiguredProject) { - return forEachAncestorProject( // If not in referenced projects, try ancestors and its references - info, - project, - tryFindDefaultConfiguredProject, - kind, - `Creating possible configured project for ${info.fileName} to open`, - allowDeferredClosed, - reloadedProjects, - /*searchOnlyPotentialSolution*/ false, - ); - } } /** @@ -4381,7 +4308,6 @@ export class ProjectService { `Creating project possibly referencing default composite project ${defaultProject.getProjectName()} of open file ${info.fileName}`, allowDeferredClosed, reloadedProjects, - /*searchOnlyPotentialSolution*/ true, delayReloadedConfiguredProjects, ); } diff --git a/tests/baselines/reference/tsserver/configuredProjects/Open-ref-of-configured-project-when-open-file-gets-added-to-the-project-as-part-of-configured-file-update-buts-its-open-file-references-are-all-closed-when-the-update-happens.js b/tests/baselines/reference/tsserver/configuredProjects/Open-ref-of-configured-project-when-open-file-gets-added-to-the-project-as-part-of-configured-file-update-buts-its-open-file-references-are-all-closed-when-the-update-happens.js index 6bb5597f3ab70..bd13f360f947f 100644 --- a/tests/baselines/reference/tsserver/configuredProjects/Open-ref-of-configured-project-when-open-file-gets-added-to-the-project-as-part-of-configured-file-update-buts-its-open-file-references-are-all-closed-when-the-update-happens.js +++ b/tests/baselines/reference/tsserver/configuredProjects/Open-ref-of-configured-project-when-open-file-gets-added-to-the-project-as-part-of-configured-file-update-buts-its-open-file-references-are-all-closed-when-the-update-happens.js @@ -233,7 +233,6 @@ Info seq [hh:mm:ss:mss] request: "type": "request" } Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /a/b/src/file2.ts ProjectRootPath: undefined:: Result: /a/b/tsconfig.json -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /a/b/tsconfig.json ProjectRootPath: undefined:: Result: undefined Info seq [hh:mm:ss:mss] event: { "seq": 0, diff --git a/tests/baselines/reference/tsserver/configuredProjects/Open-ref-of-configured-project-when-open-file-gets-added-to-the-project-as-part-of-configured-file-update.js b/tests/baselines/reference/tsserver/configuredProjects/Open-ref-of-configured-project-when-open-file-gets-added-to-the-project-as-part-of-configured-file-update.js index 0c9e9a2cec13c..a46b10756cc04 100644 --- a/tests/baselines/reference/tsserver/configuredProjects/Open-ref-of-configured-project-when-open-file-gets-added-to-the-project-as-part-of-configured-file-update.js +++ b/tests/baselines/reference/tsserver/configuredProjects/Open-ref-of-configured-project-when-open-file-gets-added-to-the-project-as-part-of-configured-file-update.js @@ -233,7 +233,6 @@ Info seq [hh:mm:ss:mss] request: "type": "request" } Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /a/b/src/file2.ts ProjectRootPath: undefined:: Result: /a/b/tsconfig.json -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /a/b/tsconfig.json ProjectRootPath: undefined:: Result: undefined Info seq [hh:mm:ss:mss] event: { "seq": 0, diff --git a/tests/baselines/reference/tsserver/configuredProjects/add-and-then-remove-a-config-file-in-a-folder-with-loose-files.js b/tests/baselines/reference/tsserver/configuredProjects/add-and-then-remove-a-config-file-in-a-folder-with-loose-files.js index a4c68397e284c..297e1b287647e 100644 --- a/tests/baselines/reference/tsserver/configuredProjects/add-and-then-remove-a-config-file-in-a-folder-with-loose-files.js +++ b/tests/baselines/reference/tsserver/configuredProjects/add-and-then-remove-a-config-file-in-a-folder-with-loose-files.js @@ -354,7 +354,6 @@ Info seq [hh:mm:ss:mss] FileName: /user/username/projects/myproject/commonFile Info seq [hh:mm:ss:mss] Projects: /user/username/projects/myproject/tsconfig.json Info seq [hh:mm:ss:mss] FileName: /user/username/projects/myproject/commonFile2.ts ProjectRootPath: undefined Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject2* -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /user/username/projects/myproject/tsconfig.json ProjectRootPath: undefined:: Result: undefined Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* projectStateVersion: 2 projectProgramVersion: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) @@ -646,7 +645,6 @@ Info seq [hh:mm:ss:mss] FileName: /user/username/projects/myproject/commonFile Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1*,/user/username/projects/myproject/tsconfig.json Info seq [hh:mm:ss:mss] FileName: /user/username/projects/myproject/commonFile2.ts ProjectRootPath: undefined Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject2* -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /user/username/projects/myproject/tsconfig.json ProjectRootPath: undefined:: Result: undefined Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* projectStateVersion: 4 projectProgramVersion: 3 structureChanged: true structureIsReused:: Not Elapsed:: *ms Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) @@ -1596,7 +1594,6 @@ Info seq [hh:mm:ss:mss] FileName: /user/username/projects/myproject/commonFile Info seq [hh:mm:ss:mss] Projects: /user/username/projects/myproject/tsconfig.json Info seq [hh:mm:ss:mss] FileName: /user/username/projects/myproject/commonFile2.ts ProjectRootPath: undefined Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject4* -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /user/username/projects/myproject/tsconfig.json ProjectRootPath: undefined:: Result: undefined Info seq [hh:mm:ss:mss] After ensureProjectForOpenFiles: Info seq [hh:mm:ss:mss] Project '/user/username/projects/myproject/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (2) diff --git a/tests/baselines/reference/tsserver/configuredProjects/add-and-then-remove-a-config-file-when-parent-folder-has-config-file-and-file-from-first-config-is-not-open.js b/tests/baselines/reference/tsserver/configuredProjects/add-and-then-remove-a-config-file-when-parent-folder-has-config-file-and-file-from-first-config-is-not-open.js index 62254d86e1b97..782addc4045b0 100644 --- a/tests/baselines/reference/tsserver/configuredProjects/add-and-then-remove-a-config-file-when-parent-folder-has-config-file-and-file-from-first-config-is-not-open.js +++ b/tests/baselines/reference/tsserver/configuredProjects/add-and-then-remove-a-config-file-when-parent-folder-has-config-file-and-file-from-first-config-is-not-open.js @@ -148,9 +148,131 @@ Info seq [hh:mm:ss:mss] event: "diagnostics": [] } } -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /user/username/projects/myproject/folder/tsconfig.json ProjectRootPath: undefined:: Result: /user/username/projects/myproject/tsconfig.json +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/folder/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/tsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/folder/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/folder/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (2) + /a/lib/lib.d.ts Text-1 "/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }" + /user/username/projects/myproject/folder/commonFile2.ts SVC-1-0 "let y = 1" + + + ../../../../../a/lib/lib.d.ts + Default library for target 'es5' + commonFile2.ts + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/user/username/projects/myproject/folder/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (2) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (2) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /user/username/projects/myproject/folder/commonFile2.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "open", + "request_seq": 1, + "success": true, + "performanceData": { + "updateGraphDurationMs": * + } + } +After request + +PolledWatches:: +/user/username/projects/myproject/folder/jsconfig.json: *new* + {"pollingInterval":2000} +/user/username/projects/myproject/folder/node_modules/@types: *new* + {"pollingInterval":500} +/user/username/projects/myproject/jsconfig.json: *new* + {"pollingInterval":2000} +/user/username/projects/myproject/node_modules/@types: *new* + {"pollingInterval":500} +/user/username/projects/node_modules/@types: *new* + {"pollingInterval":500} + +FsWatches:: +/a/lib/lib.d.ts: *new* + {} +/user/username/projects/myproject/folder/commonFile1.ts: *new* + {} +/user/username/projects/myproject/folder/tsconfig.json: *new* + {} +/user/username/projects/myproject/tsconfig.json: *new* + {} + +Projects:: +/dev/null/inferredProject1* (Inferred) *new* + projectStateVersion: 1 + projectProgramVersion: 1 +/user/username/projects/myproject/folder/tsconfig.json (Configured) *new* + projectStateVersion: 1 + projectProgramVersion: 1 + noOpenRef: true + +ScriptInfos:: +/a/lib/lib.d.ts *new* + version: Text-1 + containingProjects: 2 + /user/username/projects/myproject/folder/tsconfig.json + /dev/null/inferredProject1* +/user/username/projects/myproject/folder/commonFile1.ts *new* + version: Text-1 + containingProjects: 1 + /user/username/projects/myproject/folder/tsconfig.json +/user/username/projects/myproject/folder/commonFile2.ts (Open) *new* + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject1* *default* + +1: When config file is deleted +Info seq [hh:mm:ss:mss] FileWatcher:: Triggered with /user/username/projects/myproject/folder/tsconfig.json 2:: WatchInfo: /user/username/projects/myproject/folder/tsconfig.json 2000 undefined Project: /user/username/projects/myproject/folder/tsconfig.json WatchType: Config file +Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /user/username/projects/myproject/folder/commonFile2.ts ProjectRootPath: undefined:: Result: /user/username/projects/myproject/tsconfig.json Info seq [hh:mm:ss:mss] Creating configuration project /user/username/projects/myproject/tsconfig.json -Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/tsconfig.json 2000 undefined Project: /user/username/projects/myproject/tsconfig.json WatchType: Config file +Info seq [hh:mm:ss:mss] Scheduled: /user/username/projects/myproject/tsconfig.json +Info seq [hh:mm:ss:mss] Scheduled: *ensureProjectForOpenFiles* +Info seq [hh:mm:ss:mss] Elapsed:: *ms FileWatcher:: Triggered with /user/username/projects/myproject/folder/tsconfig.json 2:: WatchInfo: /user/username/projects/myproject/folder/tsconfig.json 2000 undefined Project: /user/username/projects/myproject/folder/tsconfig.json WatchType: Config file +Before running Timeout callback:: count: 2 +1: /user/username/projects/myproject/tsconfig.json +2: *ensureProjectForOpenFiles* +//// [/user/username/projects/myproject/folder/tsconfig.json] deleted + +Timeout callback:: count: 2 +1: /user/username/projects/myproject/tsconfig.json *new* +2: *ensureProjectForOpenFiles* *new* + +Projects:: +/dev/null/inferredProject1* (Inferred) + projectStateVersion: 1 + projectProgramVersion: 1 +/user/username/projects/myproject/folder/tsconfig.json (Configured) *changed* + projectStateVersion: 1 + projectProgramVersion: 1 + isOrphan: true *changed* + noOpenRef: false *changed* + deferredClose: true *changed* +/user/username/projects/myproject/tsconfig.json (Configured) *new* + projectStateVersion: 1 + projectProgramVersion: 0 + dirty: true + +Info seq [hh:mm:ss:mss] Running: /user/username/projects/myproject/tsconfig.json Info seq [hh:mm:ss:mss] event: { "seq": 0, @@ -158,7 +280,7 @@ Info seq [hh:mm:ss:mss] event: "event": "projectLoadingStart", "body": { "projectName": "/user/username/projects/myproject/tsconfig.json", - "reason": "Creating possible configured project for /user/username/projects/myproject/folder/commonFile2.ts to open" + "reason": "Change in config file /user/username/projects/myproject/folder/tsconfig.json detected, Creating possible configured project for /user/username/projects/myproject/folder/commonFile2.ts to open" } } Info seq [hh:mm:ss:mss] Config: /user/username/projects/myproject/tsconfig.json : { @@ -169,6 +291,8 @@ Info seq [hh:mm:ss:mss] Config: /user/username/projects/myproject/tsconfig.json "configFilePath": "/user/username/projects/myproject/tsconfig.json" } } +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /user/username/projects/myproject/folder/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /user/username/projects/myproject/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /user/username/projects/myproject/tsconfig.json Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Project: /user/username/projects/myproject/tsconfig.json WatchType: Type roots Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Project: /user/username/projects/myproject/tsconfig.json WatchType: Type roots @@ -243,11 +367,13 @@ Info seq [hh:mm:ss:mss] event: "type": "event", "event": "configFileDiag", "body": { - "triggerFile": "/user/username/projects/myproject/folder/commonFile2.ts", + "triggerFile": "/user/username/projects/myproject/tsconfig.json", "configFile": "/user/username/projects/myproject/tsconfig.json", "diagnostics": [] } } +Info seq [hh:mm:ss:mss] Running: *ensureProjectForOpenFiles* +Info seq [hh:mm:ss:mss] Before ensureProjectForOpenFiles: Info seq [hh:mm:ss:mss] Project '/user/username/projects/myproject/folder/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (2) @@ -256,99 +382,21 @@ Info seq [hh:mm:ss:mss] Project '/user/username/projects/myproject/tsconfig.jso Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Open files: -Info seq [hh:mm:ss:mss] FileName: /user/username/projects/myproject/folder/commonFile2.ts ProjectRootPath: undefined -Info seq [hh:mm:ss:mss] Projects: /user/username/projects/myproject/tsconfig.json -Info seq [hh:mm:ss:mss] response: - { - "seq": 0, - "type": "response", - "command": "open", - "request_seq": 1, - "success": true, - "performanceData": { - "updateGraphDurationMs": * - } - } -After request - -PolledWatches:: -/user/username/projects/myproject/folder/node_modules/@types: *new* - {"pollingInterval":500} -/user/username/projects/myproject/node_modules/@types: *new* - {"pollingInterval":500} -/user/username/projects/node_modules/@types: *new* - {"pollingInterval":500} - -FsWatches:: -/a/lib/lib.d.ts: *new* - {} -/user/username/projects/myproject/folder/commonFile1.ts: *new* - {} -/user/username/projects/myproject/folder/tsconfig.json: *new* - {} -/user/username/projects/myproject/tsconfig.json: *new* - {} - -Projects:: -/user/username/projects/myproject/folder/tsconfig.json (Configured) *new* - projectStateVersion: 1 - projectProgramVersion: 1 -/user/username/projects/myproject/tsconfig.json (Configured) *new* - projectStateVersion: 1 - projectProgramVersion: 1 - -ScriptInfos:: -/a/lib/lib.d.ts *new* - version: Text-1 - containingProjects: 2 - /user/username/projects/myproject/folder/tsconfig.json - /user/username/projects/myproject/tsconfig.json -/user/username/projects/myproject/folder/commonFile1.ts *new* - version: Text-1 - containingProjects: 1 - /user/username/projects/myproject/folder/tsconfig.json -/user/username/projects/myproject/folder/commonFile2.ts (Open) *new* - version: SVC-1-0 - containingProjects: 1 - /user/username/projects/myproject/tsconfig.json *default* - -1: When config file is deleted -Info seq [hh:mm:ss:mss] FileWatcher:: Triggered with /user/username/projects/myproject/folder/tsconfig.json 2:: WatchInfo: /user/username/projects/myproject/folder/tsconfig.json 2000 undefined Project: /user/username/projects/myproject/folder/tsconfig.json WatchType: Config file -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /user/username/projects/myproject/folder/commonFile2.ts ProjectRootPath: undefined:: Result: /user/username/projects/myproject/tsconfig.json -Info seq [hh:mm:ss:mss] Scheduled: *ensureProjectForOpenFiles* -Info seq [hh:mm:ss:mss] Elapsed:: *ms FileWatcher:: Triggered with /user/username/projects/myproject/folder/tsconfig.json 2:: WatchInfo: /user/username/projects/myproject/folder/tsconfig.json 2000 undefined Project: /user/username/projects/myproject/folder/tsconfig.json WatchType: Config file -Before running Timeout callback:: count: 1 -1: *ensureProjectForOpenFiles* -//// [/user/username/projects/myproject/folder/tsconfig.json] deleted - -Timeout callback:: count: 1 -1: *ensureProjectForOpenFiles* *new* - -Projects:: -/user/username/projects/myproject/folder/tsconfig.json (Configured) *changed* - projectStateVersion: 1 - projectProgramVersion: 1 - isOrphan: true *changed* - deferredClose: true *changed* -/user/username/projects/myproject/tsconfig.json (Configured) - projectStateVersion: 1 - projectProgramVersion: 1 - -Host is moving to new time -Info seq [hh:mm:ss:mss] Running: *ensureProjectForOpenFiles* -Info seq [hh:mm:ss:mss] Before ensureProjectForOpenFiles: -Info seq [hh:mm:ss:mss] Project '/user/username/projects/myproject/folder/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (2) - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/user/username/projects/myproject/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: Info seq [hh:mm:ss:mss] FileName: /user/username/projects/myproject/folder/commonFile2.ts ProjectRootPath: undefined Info seq [hh:mm:ss:mss] Projects: /user/username/projects/myproject/tsconfig.json +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* projectStateVersion: 2 projectProgramVersion: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (0) + + + +Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] After ensureProjectForOpenFiles: Info seq [hh:mm:ss:mss] Project '/user/username/projects/myproject/folder/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (2) @@ -357,6 +405,10 @@ Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Project '/user/username/projects/myproject/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (2) +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (0) + Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: Info seq [hh:mm:ss:mss] FileName: /user/username/projects/myproject/folder/commonFile2.ts ProjectRootPath: undefined @@ -375,14 +427,70 @@ Info seq [hh:mm:ss:mss] event: } After running Timeout callback:: count: 0 +PolledWatches:: +/user/username/projects/myproject/folder/node_modules/@types: + {"pollingInterval":500} +/user/username/projects/myproject/node_modules/@types: + {"pollingInterval":500} +/user/username/projects/node_modules/@types: + {"pollingInterval":500} + +PolledWatches *deleted*:: +/user/username/projects/myproject/folder/jsconfig.json: + {"pollingInterval":2000} +/user/username/projects/myproject/jsconfig.json: + {"pollingInterval":2000} + +FsWatches:: +/a/lib/lib.d.ts: + {} +/user/username/projects/myproject/folder/commonFile1.ts: + {} +/user/username/projects/myproject/folder/tsconfig.json: + {} +/user/username/projects/myproject/tsconfig.json: + {} + +Projects:: +/dev/null/inferredProject1* (Inferred) *changed* + projectStateVersion: 2 *changed* + projectProgramVersion: 2 *changed* + isOrphan: true *changed* +/user/username/projects/myproject/folder/tsconfig.json (Configured) + projectStateVersion: 1 + projectProgramVersion: 1 + isOrphan: true + deferredClose: true +/user/username/projects/myproject/tsconfig.json (Configured) *changed* + projectStateVersion: 1 + projectProgramVersion: 1 *changed* + dirty: false *changed* + +ScriptInfos:: +/a/lib/lib.d.ts *changed* + version: Text-1 + containingProjects: 2 *changed* + /user/username/projects/myproject/folder/tsconfig.json + /user/username/projects/myproject/tsconfig.json *new* + /dev/null/inferredProject1* *deleted* +/user/username/projects/myproject/folder/commonFile1.ts + version: Text-1 + containingProjects: 1 + /user/username/projects/myproject/folder/tsconfig.json +/user/username/projects/myproject/folder/commonFile2.ts (Open) *changed* + version: SVC-1-0 + containingProjects: 1 *changed* + /user/username/projects/myproject/tsconfig.json *default* *new* + /dev/null/inferredProject1* *deleted* + Info seq [hh:mm:ss:mss] FileWatcher:: Triggered with /user/username/projects/myproject/folder/tsconfig.json 0:: WatchInfo: /user/username/projects/myproject/folder/tsconfig.json 2000 undefined Project: /user/username/projects/myproject/folder/tsconfig.json WatchType: Config file Info seq [hh:mm:ss:mss] Scheduled: /user/username/projects/myproject/folder/tsconfig.json Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /user/username/projects/myproject/folder/commonFile2.ts ProjectRootPath: undefined:: Result: /user/username/projects/myproject/folder/tsconfig.json Info seq [hh:mm:ss:mss] Scheduled: *ensureProjectForOpenFiles* Info seq [hh:mm:ss:mss] Elapsed:: *ms FileWatcher:: Triggered with /user/username/projects/myproject/folder/tsconfig.json 0:: WatchInfo: /user/username/projects/myproject/folder/tsconfig.json 2000 undefined Project: /user/username/projects/myproject/folder/tsconfig.json WatchType: Config file Before running Timeout callback:: count: 2 -2: /user/username/projects/myproject/folder/tsconfig.json -3: *ensureProjectForOpenFiles* +3: /user/username/projects/myproject/folder/tsconfig.json +4: *ensureProjectForOpenFiles* //// [/user/username/projects/myproject/folder/tsconfig.json] { "files": [ @@ -392,10 +500,14 @@ Before running Timeout callback:: count: 2 Timeout callback:: count: 2 -2: /user/username/projects/myproject/folder/tsconfig.json *new* -3: *ensureProjectForOpenFiles* *new* +3: /user/username/projects/myproject/folder/tsconfig.json *new* +4: *ensureProjectForOpenFiles* *new* Projects:: +/dev/null/inferredProject1* (Inferred) + projectStateVersion: 2 + projectProgramVersion: 2 + isOrphan: true /user/username/projects/myproject/folder/tsconfig.json (Configured) *changed* projectStateVersion: 2 *changed* projectProgramVersion: 1 @@ -457,11 +569,14 @@ Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Project '/user/username/projects/myproject/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (2) +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (0) + Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: Info seq [hh:mm:ss:mss] FileName: /user/username/projects/myproject/folder/commonFile2.ts ProjectRootPath: undefined Info seq [hh:mm:ss:mss] Projects: /user/username/projects/myproject/tsconfig.json -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /user/username/projects/myproject/folder/tsconfig.json ProjectRootPath: undefined:: Result: /user/username/projects/myproject/tsconfig.json Info seq [hh:mm:ss:mss] After ensureProjectForOpenFiles: Info seq [hh:mm:ss:mss] Project '/user/username/projects/myproject/folder/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (2) @@ -470,6 +585,10 @@ Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Project '/user/username/projects/myproject/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (2) +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (0) + Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: Info seq [hh:mm:ss:mss] FileName: /user/username/projects/myproject/folder/commonFile2.ts ProjectRootPath: undefined @@ -489,13 +608,19 @@ Info seq [hh:mm:ss:mss] event: After running Timeout callback:: count: 0 Projects:: +/dev/null/inferredProject1* (Inferred) + projectStateVersion: 2 + projectProgramVersion: 2 + isOrphan: true /user/username/projects/myproject/folder/tsconfig.json (Configured) *changed* projectStateVersion: 2 projectProgramVersion: 1 dirty: false *changed* -/user/username/projects/myproject/tsconfig.json (Configured) + noOpenRef: true *changed* +/user/username/projects/myproject/tsconfig.json (Configured) *changed* projectStateVersion: 1 projectProgramVersion: 1 + noOpenRef: true *changed* Before request @@ -510,9 +635,9 @@ Info seq [hh:mm:ss:mss] request: "type": "request" } Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /random/random.ts ProjectRootPath: undefined:: Result: undefined -Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* -Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms -Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject2* +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject2* projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject2*' (Inferred) Info seq [hh:mm:ss:mss] Files (2) /a/lib/lib.d.ts Text-1 "/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }" /random/random.ts SVC-1-0 "export const y = 10;" @@ -524,23 +649,67 @@ Info seq [hh:mm:ss:mss] Files (2) Root file specified for compilation Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] `remove Project:: Info seq [hh:mm:ss:mss] Project '/user/username/projects/myproject/folder/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (2) + /a/lib/lib.d.ts + /user/username/projects/myproject/folder/commonFile1.ts + + + ../../../../../a/lib/lib.d.ts + Default library for target 'es5' + commonFile1.ts + Part of 'files' list in tsconfig.json Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /user/username/projects/myproject/folder/tsconfig.json 2000 undefined Project: /user/username/projects/myproject/folder/tsconfig.json WatchType: Config file +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/myproject/folder/node_modules/@types 1 undefined Project: /user/username/projects/myproject/folder/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/myproject/folder/node_modules/@types 1 undefined Project: /user/username/projects/myproject/folder/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Project: /user/username/projects/myproject/folder/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Project: /user/username/projects/myproject/folder/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/node_modules/@types 1 undefined Project: /user/username/projects/myproject/folder/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/node_modules/@types 1 undefined Project: /user/username/projects/myproject/folder/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] `remove Project:: Info seq [hh:mm:ss:mss] Project '/user/username/projects/myproject/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (2) + /a/lib/lib.d.ts + /user/username/projects/myproject/folder/commonFile2.ts + + + ../../../../a/lib/lib.d.ts + Default library for target 'es5' + folder/commonFile2.ts + Part of 'files' list in tsconfig.json Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /user/username/projects/myproject/tsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Project: /user/username/projects/myproject/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Project: /user/username/projects/myproject/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/node_modules/@types 1 undefined Project: /user/username/projects/myproject/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/node_modules/@types 1 undefined Project: /user/username/projects/myproject/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] `remove Project:: Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (0) + + + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/myproject/folder/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/myproject/folder/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /user/username/projects/myproject/folder/commonFile1.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject2*' (Inferred) Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: Info seq [hh:mm:ss:mss] FileName: /user/username/projects/myproject/folder/commonFile2.ts ProjectRootPath: undefined -Info seq [hh:mm:ss:mss] Projects: /user/username/projects/myproject/tsconfig.json +Info seq [hh:mm:ss:mss] Projects: Info seq [hh:mm:ss:mss] FileName: /random/random.ts ProjectRootPath: undefined -Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject2* Info seq [hh:mm:ss:mss] response: { "seq": 0, @@ -554,36 +723,65 @@ Info seq [hh:mm:ss:mss] response: } After request +PolledWatches *deleted*:: +/user/username/projects/myproject/folder/node_modules/@types: + {"pollingInterval":500} +/user/username/projects/myproject/node_modules/@types: + {"pollingInterval":500} +/user/username/projects/node_modules/@types: + {"pollingInterval":500} + +FsWatches:: +/a/lib/lib.d.ts: + {} + +FsWatches *deleted*:: +/user/username/projects/myproject/folder/commonFile1.ts: + {} +/user/username/projects/myproject/folder/tsconfig.json: + {} +/user/username/projects/myproject/tsconfig.json: + {} + Projects:: -/dev/null/inferredProject1* (Inferred) *new* +/dev/null/inferredProject1* (Inferred) *deleted* + projectStateVersion: 2 + projectProgramVersion: 2 + isClosed: true *changed* + isOrphan: true +/dev/null/inferredProject2* (Inferred) *new* projectStateVersion: 1 projectProgramVersion: 1 -/user/username/projects/myproject/folder/tsconfig.json (Configured) +/user/username/projects/myproject/folder/tsconfig.json (Configured) *deleted* projectStateVersion: 2 projectProgramVersion: 1 -/user/username/projects/myproject/tsconfig.json (Configured) + isClosed: true *changed* + noOpenRef: true +/user/username/projects/myproject/tsconfig.json (Configured) *deleted* projectStateVersion: 1 projectProgramVersion: 1 + isClosed: true *changed* + noOpenRef: true ScriptInfos:: /a/lib/lib.d.ts *changed* version: Text-1 - containingProjects: 3 *changed* - /user/username/projects/myproject/folder/tsconfig.json - /user/username/projects/myproject/tsconfig.json - /dev/null/inferredProject1* *new* + containingProjects: 1 *changed* + /dev/null/inferredProject2* *new* + /user/username/projects/myproject/folder/tsconfig.json *deleted* + /user/username/projects/myproject/tsconfig.json *deleted* /random/random.ts (Open) *new* version: SVC-1-0 containingProjects: 1 - /dev/null/inferredProject1* *default* -/user/username/projects/myproject/folder/commonFile1.ts + /dev/null/inferredProject2* *default* +/user/username/projects/myproject/folder/commonFile1.ts *deleted* version: Text-1 - containingProjects: 1 - /user/username/projects/myproject/folder/tsconfig.json -/user/username/projects/myproject/folder/commonFile2.ts (Open) + containingProjects: 0 *changed* + /user/username/projects/myproject/folder/tsconfig.json *deleted* +/user/username/projects/myproject/folder/commonFile2.ts (Open) *changed* version: SVC-1-0 - containingProjects: 1 - /user/username/projects/myproject/tsconfig.json *default* + containingProjects: 0 *changed* + /user/username/projects/myproject/tsconfig.json *deleted* Before request @@ -597,21 +795,13 @@ Info seq [hh:mm:ss:mss] request: "type": "request" } Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/folder/commonFile2.ts 500 undefined WatchType: Closed Script info -Info seq [hh:mm:ss:mss] Project '/user/username/projects/myproject/folder/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (2) - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/user/username/projects/myproject/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (2) - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject2*' (Inferred) Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: Info seq [hh:mm:ss:mss] FileName: /random/random.ts ProjectRootPath: undefined -Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject2* Info seq [hh:mm:ss:mss] response: { "seq": 0, @@ -622,59 +812,25 @@ Info seq [hh:mm:ss:mss] response: } After request -PolledWatches:: -/user/username/projects/myproject/folder/node_modules/@types: - {"pollingInterval":500} -/user/username/projects/myproject/node_modules/@types: - {"pollingInterval":500} -/user/username/projects/node_modules/@types: - {"pollingInterval":500} - FsWatches:: /a/lib/lib.d.ts: {} -/user/username/projects/myproject/folder/commonFile1.ts: - {} -/user/username/projects/myproject/folder/commonFile2.ts: *new* - {} -/user/username/projects/myproject/folder/tsconfig.json: - {} -/user/username/projects/myproject/tsconfig.json: +/user/username/projects/myproject/folder/commonFile2.ts: *new* {} -Projects:: -/dev/null/inferredProject1* (Inferred) - projectStateVersion: 1 - projectProgramVersion: 1 -/user/username/projects/myproject/folder/tsconfig.json (Configured) *changed* - projectStateVersion: 2 - projectProgramVersion: 1 - noOpenRef: true *changed* -/user/username/projects/myproject/tsconfig.json (Configured) *changed* - projectStateVersion: 1 - projectProgramVersion: 1 - noOpenRef: true *changed* - ScriptInfos:: /a/lib/lib.d.ts version: Text-1 - containingProjects: 3 - /user/username/projects/myproject/folder/tsconfig.json - /user/username/projects/myproject/tsconfig.json - /dev/null/inferredProject1* + containingProjects: 1 + /dev/null/inferredProject2* /random/random.ts (Open) version: SVC-1-0 containingProjects: 1 - /dev/null/inferredProject1* *default* -/user/username/projects/myproject/folder/commonFile1.ts - version: Text-1 - containingProjects: 1 - /user/username/projects/myproject/folder/tsconfig.json + /dev/null/inferredProject2* *default* /user/username/projects/myproject/folder/commonFile2.ts *changed* open: false *changed* version: SVC-1-0 - containingProjects: 1 - /user/username/projects/myproject/tsconfig.json + containingProjects: 0 Before request @@ -687,15 +843,7 @@ Info seq [hh:mm:ss:mss] request: "seq": 4, "type": "request" } -Info seq [hh:mm:ss:mss] Project '/user/username/projects/myproject/folder/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (2) - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/user/username/projects/myproject/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (2) - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject2*' (Inferred) Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- @@ -711,40 +859,25 @@ Info seq [hh:mm:ss:mss] response: After request Projects:: -/dev/null/inferredProject1* (Inferred) *changed* +/dev/null/inferredProject2* (Inferred) *changed* projectStateVersion: 2 *changed* projectProgramVersion: 1 dirty: true *changed* isOrphan: true *changed* -/user/username/projects/myproject/folder/tsconfig.json (Configured) - projectStateVersion: 2 - projectProgramVersion: 1 - noOpenRef: true -/user/username/projects/myproject/tsconfig.json (Configured) - projectStateVersion: 1 - projectProgramVersion: 1 - noOpenRef: true ScriptInfos:: /a/lib/lib.d.ts version: Text-1 - containingProjects: 3 - /user/username/projects/myproject/folder/tsconfig.json - /user/username/projects/myproject/tsconfig.json - /dev/null/inferredProject1* + containingProjects: 1 + /dev/null/inferredProject2* /random/random.ts *deleted* open: false *changed* version: SVC-1-0 containingProjects: 0 *changed* - /dev/null/inferredProject1* *deleted* -/user/username/projects/myproject/folder/commonFile1.ts - version: Text-1 - containingProjects: 1 - /user/username/projects/myproject/folder/tsconfig.json + /dev/null/inferredProject2* *deleted* /user/username/projects/myproject/folder/commonFile2.ts version: SVC-1-0 - containingProjects: 1 - /user/username/projects/myproject/tsconfig.json + containingProjects: 0 Before request @@ -759,9 +892,9 @@ Info seq [hh:mm:ss:mss] request: "type": "request" } Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /random/random.ts ProjectRootPath: undefined:: Result: undefined -Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* -Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* projectStateVersion: 2 projectProgramVersion: 1 structureChanged: false structureIsReused:: Completely Elapsed:: *ms -Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject2* +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject2* projectStateVersion: 2 projectProgramVersion: 1 structureChanged: false structureIsReused:: Completely Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject2*' (Inferred) Info seq [hh:mm:ss:mss] Files (2) /a/lib/lib.d.ts Text-1 "/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }" /random/random.ts SVC-2-0 "export const y = 10;" @@ -773,53 +906,14 @@ Info seq [hh:mm:ss:mss] Files (2) Root file specified for compilation Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] `remove Project:: -Info seq [hh:mm:ss:mss] Project '/user/username/projects/myproject/folder/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (2) - /a/lib/lib.d.ts - /user/username/projects/myproject/folder/commonFile1.ts - - - ../../../../../a/lib/lib.d.ts - Default library for target 'es5' - commonFile1.ts - Part of 'files' list in tsconfig.json - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /user/username/projects/myproject/folder/tsconfig.json 2000 undefined Project: /user/username/projects/myproject/folder/tsconfig.json WatchType: Config file -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/myproject/folder/node_modules/@types 1 undefined Project: /user/username/projects/myproject/folder/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/myproject/folder/node_modules/@types 1 undefined Project: /user/username/projects/myproject/folder/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Project: /user/username/projects/myproject/folder/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Project: /user/username/projects/myproject/folder/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/node_modules/@types 1 undefined Project: /user/username/projects/myproject/folder/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/node_modules/@types 1 undefined Project: /user/username/projects/myproject/folder/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] `remove Project:: -Info seq [hh:mm:ss:mss] Project '/user/username/projects/myproject/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (2) - /a/lib/lib.d.ts - /user/username/projects/myproject/folder/commonFile2.ts - - - ../../../../a/lib/lib.d.ts - Default library for target 'es5' - folder/commonFile2.ts - Part of 'files' list in tsconfig.json - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /user/username/projects/myproject/tsconfig.json 2000 undefined Project: /user/username/projects/myproject/tsconfig.json WatchType: Config file -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Project: /user/username/projects/myproject/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Project: /user/username/projects/myproject/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/node_modules/@types 1 undefined Project: /user/username/projects/myproject/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/node_modules/@types 1 undefined Project: /user/username/projects/myproject/tsconfig.json WatchType: Type roots Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /user/username/projects/myproject/folder/commonFile2.ts 500 undefined WatchType: Closed Script info -Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /user/username/projects/myproject/folder/commonFile1.ts 500 undefined WatchType: Closed Script info -Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject2*' (Inferred) Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: Info seq [hh:mm:ss:mss] FileName: /random/random.ts ProjectRootPath: undefined -Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject2* Info seq [hh:mm:ss:mss] response: { "seq": 0, @@ -833,64 +927,33 @@ Info seq [hh:mm:ss:mss] response: } After request -PolledWatches *deleted*:: -/user/username/projects/myproject/folder/node_modules/@types: - {"pollingInterval":500} -/user/username/projects/myproject/node_modules/@types: - {"pollingInterval":500} -/user/username/projects/node_modules/@types: - {"pollingInterval":500} - FsWatches:: /a/lib/lib.d.ts: {} FsWatches *deleted*:: -/user/username/projects/myproject/folder/commonFile1.ts: - {} /user/username/projects/myproject/folder/commonFile2.ts: {} -/user/username/projects/myproject/folder/tsconfig.json: - {} -/user/username/projects/myproject/tsconfig.json: - {} Projects:: -/dev/null/inferredProject1* (Inferred) *changed* +/dev/null/inferredProject2* (Inferred) *changed* projectStateVersion: 2 projectProgramVersion: 1 dirty: false *changed* isOrphan: false *changed* -/user/username/projects/myproject/folder/tsconfig.json (Configured) *deleted* - projectStateVersion: 2 - projectProgramVersion: 1 - isClosed: true *changed* - noOpenRef: true -/user/username/projects/myproject/tsconfig.json (Configured) *deleted* - projectStateVersion: 1 - projectProgramVersion: 1 - isClosed: true *changed* - noOpenRef: true ScriptInfos:: -/a/lib/lib.d.ts *changed* +/a/lib/lib.d.ts version: Text-1 - containingProjects: 1 *changed* - /dev/null/inferredProject1* - /user/username/projects/myproject/folder/tsconfig.json *deleted* - /user/username/projects/myproject/tsconfig.json *deleted* + containingProjects: 1 + /dev/null/inferredProject2* /random/random.ts (Open) *new* version: SVC-2-0 containingProjects: 1 - /dev/null/inferredProject1* *default* -/user/username/projects/myproject/folder/commonFile1.ts *deleted* - version: Text-1 - containingProjects: 0 *changed* - /user/username/projects/myproject/folder/tsconfig.json *deleted* + /dev/null/inferredProject2* *default* /user/username/projects/myproject/folder/commonFile2.ts *deleted* version: SVC-1-0 - containingProjects: 0 *changed* - /user/username/projects/myproject/tsconfig.json *deleted* + containingProjects: 0 Before request @@ -903,7 +966,7 @@ Info seq [hh:mm:ss:mss] request: "seq": 6, "type": "request" } -Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject2*' (Inferred) Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- @@ -919,7 +982,7 @@ Info seq [hh:mm:ss:mss] response: After request Projects:: -/dev/null/inferredProject1* (Inferred) *changed* +/dev/null/inferredProject2* (Inferred) *changed* projectStateVersion: 3 *changed* projectProgramVersion: 1 dirty: true *changed* @@ -929,12 +992,12 @@ ScriptInfos:: /a/lib/lib.d.ts version: Text-1 containingProjects: 1 - /dev/null/inferredProject1* + /dev/null/inferredProject2* /random/random.ts *deleted* open: false *changed* version: SVC-2-0 containingProjects: 0 *changed* - /dev/null/inferredProject1* *deleted* + /dev/null/inferredProject2* *deleted* Before request @@ -1009,67 +1072,31 @@ Info seq [hh:mm:ss:mss] event: "diagnostics": [] } } -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /user/username/projects/myproject/folder/tsconfig.json ProjectRootPath: undefined:: Result: /user/username/projects/myproject/tsconfig.json -Info seq [hh:mm:ss:mss] Creating configuration project /user/username/projects/myproject/tsconfig.json -Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/tsconfig.json 2000 undefined Project: /user/username/projects/myproject/tsconfig.json WatchType: Config file -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "projectLoadingStart", - "body": { - "projectName": "/user/username/projects/myproject/tsconfig.json", - "reason": "Creating possible configured project for /user/username/projects/myproject/folder/commonFile2.ts to open" - } - } -Info seq [hh:mm:ss:mss] Config: /user/username/projects/myproject/tsconfig.json : { - "rootNames": [ - "/user/username/projects/myproject/folder/commonFile2.ts" - ], - "options": { - "configFilePath": "/user/username/projects/myproject/tsconfig.json" - } -} -Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /user/username/projects/myproject/tsconfig.json -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Project: /user/username/projects/myproject/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Project: /user/username/projects/myproject/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/node_modules/@types 1 undefined Project: /user/username/projects/myproject/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/node_modules/@types 1 undefined Project: /user/username/projects/myproject/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /user/username/projects/myproject/tsconfig.json projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms -Info seq [hh:mm:ss:mss] Project '/user/username/projects/myproject/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/folder/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/tsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject3* +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/folder/node_modules/@types 1 undefined Project: /dev/null/inferredProject3* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/folder/node_modules/@types 1 undefined Project: /dev/null/inferredProject3* WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Project: /dev/null/inferredProject3* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Project: /dev/null/inferredProject3* WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/node_modules/@types 1 undefined Project: /dev/null/inferredProject3* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/node_modules/@types 1 undefined Project: /dev/null/inferredProject3* WatchType: Type roots +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject3* projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject3*' (Inferred) Info seq [hh:mm:ss:mss] Files (2) /a/lib/lib.d.ts Text-1 "/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }" /user/username/projects/myproject/folder/commonFile2.ts SVC-2-0 "let y = 1" - ../../../../a/lib/lib.d.ts + ../../../../../a/lib/lib.d.ts Default library for target 'es5' - folder/commonFile2.ts - Part of 'files' list in tsconfig.json + commonFile2.ts + Root file specified for compilation Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "projectLoadingFinish", - "body": { - "projectName": "/user/username/projects/myproject/tsconfig.json" - } - } -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "configFileDiag", - "body": { - "triggerFile": "/user/username/projects/myproject/folder/commonFile2.ts", - "configFile": "/user/username/projects/myproject/tsconfig.json", - "diagnostics": [] - } - } Info seq [hh:mm:ss:mss] `remove Project:: -Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject2*' (Inferred) Info seq [hh:mm:ss:mss] Files (2) /a/lib/lib.d.ts /random/random.ts @@ -1085,13 +1112,13 @@ Info seq [hh:mm:ss:mss] Project '/user/username/projects/myproject/folder/tscon Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/user/username/projects/myproject/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject3*' (Inferred) Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: Info seq [hh:mm:ss:mss] FileName: /user/username/projects/myproject/folder/commonFile2.ts ProjectRootPath: undefined -Info seq [hh:mm:ss:mss] Projects: /user/username/projects/myproject/tsconfig.json +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject3* Info seq [hh:mm:ss:mss] response: { "seq": 0, @@ -1106,8 +1133,12 @@ Info seq [hh:mm:ss:mss] response: After request PolledWatches:: +/user/username/projects/myproject/folder/jsconfig.json: *new* + {"pollingInterval":2000} /user/username/projects/myproject/folder/node_modules/@types: *new* {"pollingInterval":500} +/user/username/projects/myproject/jsconfig.json: *new* + {"pollingInterval":2000} /user/username/projects/myproject/node_modules/@types: *new* {"pollingInterval":500} /user/username/projects/node_modules/@types: *new* @@ -1124,26 +1155,27 @@ FsWatches:: {} Projects:: -/dev/null/inferredProject1* (Inferred) *deleted* +/dev/null/inferredProject2* (Inferred) *deleted* projectStateVersion: 3 projectProgramVersion: 1 dirty: true isClosed: true *changed* isOrphan: true -/user/username/projects/myproject/folder/tsconfig.json (Configured) *new* +/dev/null/inferredProject3* (Inferred) *new* projectStateVersion: 1 projectProgramVersion: 1 -/user/username/projects/myproject/tsconfig.json (Configured) *new* +/user/username/projects/myproject/folder/tsconfig.json (Configured) *new* projectStateVersion: 1 projectProgramVersion: 1 + noOpenRef: true ScriptInfos:: /a/lib/lib.d.ts *changed* version: Text-1 containingProjects: 2 *changed* /user/username/projects/myproject/folder/tsconfig.json *new* - /user/username/projects/myproject/tsconfig.json *new* - /dev/null/inferredProject1* *deleted* + /dev/null/inferredProject3* *new* + /dev/null/inferredProject2* *deleted* /user/username/projects/myproject/folder/commonFile1.ts *new* version: Text-2 containingProjects: 1 @@ -1151,28 +1183,36 @@ ScriptInfos:: /user/username/projects/myproject/folder/commonFile2.ts (Open) *new* version: SVC-2-0 containingProjects: 1 - /user/username/projects/myproject/tsconfig.json *default* + /dev/null/inferredProject3* *default* 2: Check when file is closed when config file is deleted Info seq [hh:mm:ss:mss] FileWatcher:: Triggered with /user/username/projects/myproject/folder/tsconfig.json 2:: WatchInfo: /user/username/projects/myproject/folder/tsconfig.json 2000 undefined Project: /user/username/projects/myproject/folder/tsconfig.json WatchType: Config file Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /user/username/projects/myproject/folder/commonFile2.ts ProjectRootPath: undefined:: Result: /user/username/projects/myproject/tsconfig.json +Info seq [hh:mm:ss:mss] Creating configuration project /user/username/projects/myproject/tsconfig.json +Info seq [hh:mm:ss:mss] Scheduled: /user/username/projects/myproject/tsconfig.json Info seq [hh:mm:ss:mss] Scheduled: *ensureProjectForOpenFiles* Info seq [hh:mm:ss:mss] Elapsed:: *ms FileWatcher:: Triggered with /user/username/projects/myproject/folder/tsconfig.json 2:: WatchInfo: /user/username/projects/myproject/folder/tsconfig.json 2000 undefined Project: /user/username/projects/myproject/folder/tsconfig.json WatchType: Config file Before request //// [/user/username/projects/myproject/folder/tsconfig.json] deleted -Timeout callback:: count: 1 -4: *ensureProjectForOpenFiles* *new* +Timeout callback:: count: 2 +5: /user/username/projects/myproject/tsconfig.json *new* +6: *ensureProjectForOpenFiles* *new* Projects:: +/dev/null/inferredProject3* (Inferred) + projectStateVersion: 1 + projectProgramVersion: 1 /user/username/projects/myproject/folder/tsconfig.json (Configured) *changed* projectStateVersion: 1 projectProgramVersion: 1 isOrphan: true *changed* + noOpenRef: false *changed* deferredClose: true *changed* -/user/username/projects/myproject/tsconfig.json (Configured) +/user/username/projects/myproject/tsconfig.json (Configured) *new* projectStateVersion: 1 - projectProgramVersion: 1 + projectProgramVersion: 0 + dirty: true Info seq [hh:mm:ss:mss] request: { @@ -1183,12 +1223,18 @@ Info seq [hh:mm:ss:mss] request: "seq": 8, "type": "request" } +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /user/username/projects/myproject/folder/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /user/username/projects/myproject/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/folder/commonFile2.ts 500 undefined WatchType: Closed Script info Info seq [hh:mm:ss:mss] Project '/user/username/projects/myproject/folder/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Project '/user/username/projects/myproject/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (0) InitialLoadPending + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject3*' (Inferred) Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- @@ -1211,6 +1257,12 @@ PolledWatches:: /user/username/projects/node_modules/@types: {"pollingInterval":500} +PolledWatches *deleted*:: +/user/username/projects/myproject/folder/jsconfig.json: + {"pollingInterval":2000} +/user/username/projects/myproject/jsconfig.json: + {"pollingInterval":2000} + FsWatches:: /a/lib/lib.d.ts: {} @@ -1224,6 +1276,11 @@ FsWatches:: {} Projects:: +/dev/null/inferredProject3* (Inferred) *changed* + projectStateVersion: 2 *changed* + projectProgramVersion: 1 + dirty: true *changed* + isOrphan: true *changed* /user/username/projects/myproject/folder/tsconfig.json (Configured) *changed* projectStateVersion: 1 projectProgramVersion: 1 @@ -1232,7 +1289,8 @@ Projects:: deferredClose: true /user/username/projects/myproject/tsconfig.json (Configured) *changed* projectStateVersion: 1 - projectProgramVersion: 1 + projectProgramVersion: 0 + dirty: true noOpenRef: true *changed* ScriptInfos:: @@ -1240,7 +1298,7 @@ ScriptInfos:: version: Text-1 containingProjects: 2 /user/username/projects/myproject/folder/tsconfig.json - /user/username/projects/myproject/tsconfig.json + /dev/null/inferredProject3* /user/username/projects/myproject/folder/commonFile1.ts version: Text-2 containingProjects: 1 @@ -1248,8 +1306,8 @@ ScriptInfos:: /user/username/projects/myproject/folder/commonFile2.ts *changed* open: false *changed* version: SVC-2-0 - containingProjects: 1 - /user/username/projects/myproject/tsconfig.json + containingProjects: 0 *changed* + /dev/null/inferredProject3* *deleted* Before request @@ -1264,9 +1322,9 @@ Info seq [hh:mm:ss:mss] request: "type": "request" } Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /random/random.ts ProjectRootPath: undefined:: Result: undefined -Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject2* -Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject2* projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms -Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject2*' (Inferred) +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject4* +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject4* projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject4*' (Inferred) Info seq [hh:mm:ss:mss] Files (2) /a/lib/lib.d.ts Text-1 "/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }" /random/random.ts SVC-3-0 "export const y = 10;" @@ -1300,31 +1358,38 @@ Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /user/username/pr Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/node_modules/@types 1 undefined Project: /user/username/projects/myproject/folder/tsconfig.json WatchType: Type roots Info seq [hh:mm:ss:mss] `remove Project:: Info seq [hh:mm:ss:mss] Project '/user/username/projects/myproject/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (0) InitialLoadPending + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /user/username/projects/myproject/tsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] `remove Project:: +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject3*' (Inferred) Info seq [hh:mm:ss:mss] Files (2) /a/lib/lib.d.ts /user/username/projects/myproject/folder/commonFile2.ts - ../../../../a/lib/lib.d.ts + ../../../../../a/lib/lib.d.ts Default library for target 'es5' - folder/commonFile2.ts - Part of 'files' list in tsconfig.json + commonFile2.ts + Root file specified for compilation Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /user/username/projects/myproject/tsconfig.json 2000 undefined Project: /user/username/projects/myproject/tsconfig.json WatchType: Config file -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Project: /user/username/projects/myproject/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Project: /user/username/projects/myproject/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/node_modules/@types 1 undefined Project: /user/username/projects/myproject/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/node_modules/@types 1 undefined Project: /user/username/projects/myproject/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/myproject/folder/node_modules/@types 1 undefined Project: /dev/null/inferredProject3* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/myproject/folder/node_modules/@types 1 undefined Project: /dev/null/inferredProject3* WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Project: /dev/null/inferredProject3* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Project: /dev/null/inferredProject3* WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/node_modules/@types 1 undefined Project: /dev/null/inferredProject3* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/node_modules/@types 1 undefined Project: /dev/null/inferredProject3* WatchType: Type roots Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /user/username/projects/myproject/folder/commonFile2.ts 500 undefined WatchType: Closed Script info Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /user/username/projects/myproject/folder/commonFile1.ts 500 undefined WatchType: Closed Script info -Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject2*' (Inferred) +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject4*' (Inferred) Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: Info seq [hh:mm:ss:mss] FileName: /random/random.ts ProjectRootPath: undefined -Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject2* +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject4* Info seq [hh:mm:ss:mss] response: { "seq": 0, @@ -1361,7 +1426,13 @@ FsWatches *deleted*:: {} Projects:: -/dev/null/inferredProject2* (Inferred) *new* +/dev/null/inferredProject3* (Inferred) *deleted* + projectStateVersion: 2 + projectProgramVersion: 1 + dirty: true + isClosed: true *changed* + isOrphan: true +/dev/null/inferredProject4* (Inferred) *new* projectStateVersion: 1 projectProgramVersion: 1 /user/username/projects/myproject/folder/tsconfig.json (Configured) *deleted* @@ -1373,7 +1444,8 @@ Projects:: deferredClose: true /user/username/projects/myproject/tsconfig.json (Configured) *deleted* projectStateVersion: 1 - projectProgramVersion: 1 + projectProgramVersion: 0 + dirty: true isClosed: true *changed* noOpenRef: true @@ -1381,18 +1453,17 @@ ScriptInfos:: /a/lib/lib.d.ts *changed* version: Text-1 containingProjects: 1 *changed* - /dev/null/inferredProject2* *new* + /dev/null/inferredProject4* *new* /user/username/projects/myproject/folder/tsconfig.json *deleted* - /user/username/projects/myproject/tsconfig.json *deleted* + /dev/null/inferredProject3* *deleted* /random/random.ts (Open) *new* version: SVC-3-0 containingProjects: 1 - /dev/null/inferredProject2* *default* + /dev/null/inferredProject4* *default* /user/username/projects/myproject/folder/commonFile1.ts *deleted* version: Text-2 containingProjects: 0 *changed* /user/username/projects/myproject/folder/tsconfig.json *deleted* /user/username/projects/myproject/folder/commonFile2.ts *deleted* version: SVC-2-0 - containingProjects: 0 *changed* - /user/username/projects/myproject/tsconfig.json *deleted* + containingProjects: 0 diff --git a/tests/baselines/reference/tsserver/configuredProjects/add-and-then-remove-a-config-file-when-parent-folder-has-config-file.js b/tests/baselines/reference/tsserver/configuredProjects/add-and-then-remove-a-config-file-when-parent-folder-has-config-file.js index 0301d3d057e49..13eb40c7801f1 100644 --- a/tests/baselines/reference/tsserver/configuredProjects/add-and-then-remove-a-config-file-when-parent-folder-has-config-file.js +++ b/tests/baselines/reference/tsserver/configuredProjects/add-and-then-remove-a-config-file-when-parent-folder-has-config-file.js @@ -490,7 +490,6 @@ Info seq [hh:mm:ss:mss] FileName: /user/username/projects/myproject/folder/com Info seq [hh:mm:ss:mss] Projects: /user/username/projects/myproject/folder/tsconfig.json Info seq [hh:mm:ss:mss] FileName: /user/username/projects/myproject/folder/commonFile2.ts ProjectRootPath: undefined Info seq [hh:mm:ss:mss] Projects: /user/username/projects/myproject/tsconfig.json -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /user/username/projects/myproject/folder/tsconfig.json ProjectRootPath: undefined:: Result: /user/username/projects/myproject/tsconfig.json Info seq [hh:mm:ss:mss] After ensureProjectForOpenFiles: Info seq [hh:mm:ss:mss] Project '/user/username/projects/myproject/folder/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (2) @@ -525,9 +524,10 @@ Projects:: projectStateVersion: 2 projectProgramVersion: 1 dirty: false *changed* -/user/username/projects/myproject/tsconfig.json (Configured) +/user/username/projects/myproject/tsconfig.json (Configured) *changed* projectStateVersion: 1 projectProgramVersion: 1 + noOpenRef: true *changed* Before request @@ -556,11 +556,25 @@ Info seq [hh:mm:ss:mss] Files (2) Root file specified for compilation Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/user/username/projects/myproject/folder/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] `remove Project:: +Info seq [hh:mm:ss:mss] Project '/user/username/projects/myproject/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (2) + /a/lib/lib.d.ts + /user/username/projects/myproject/folder/commonFile2.ts + + + ../../../../a/lib/lib.d.ts + Default library for target 'es5' + folder/commonFile2.ts + Part of 'files' list in tsconfig.json Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/user/username/projects/myproject/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /user/username/projects/myproject/tsconfig.json 2000 undefined Project: /user/username/projects/myproject/tsconfig.json WatchType: Config file +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Project: /user/username/projects/myproject/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Project: /user/username/projects/myproject/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/node_modules/@types 1 undefined Project: /user/username/projects/myproject/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/node_modules/@types 1 undefined Project: /user/username/projects/myproject/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] Project '/user/username/projects/myproject/folder/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- @@ -572,7 +586,7 @@ Info seq [hh:mm:ss:mss] Open files: Info seq [hh:mm:ss:mss] FileName: /user/username/projects/myproject/folder/commonFile1.ts ProjectRootPath: undefined Info seq [hh:mm:ss:mss] Projects: /user/username/projects/myproject/folder/tsconfig.json Info seq [hh:mm:ss:mss] FileName: /user/username/projects/myproject/folder/commonFile2.ts ProjectRootPath: undefined -Info seq [hh:mm:ss:mss] Projects: /user/username/projects/myproject/tsconfig.json +Info seq [hh:mm:ss:mss] Projects: Info seq [hh:mm:ss:mss] FileName: /random/random.ts ProjectRootPath: undefined Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* Info seq [hh:mm:ss:mss] response: @@ -588,6 +602,24 @@ Info seq [hh:mm:ss:mss] response: } After request +PolledWatches:: +/user/username/projects/myproject/folder/node_modules/@types: + {"pollingInterval":500} +/user/username/projects/myproject/node_modules/@types: + {"pollingInterval":500} +/user/username/projects/node_modules/@types: + {"pollingInterval":500} + +FsWatches:: +/a/lib/lib.d.ts: + {} +/user/username/projects/myproject/folder/tsconfig.json: + {} + +FsWatches *deleted*:: +/user/username/projects/myproject/tsconfig.json: + {} + Projects:: /dev/null/inferredProject1* (Inferred) *new* projectStateVersion: 1 @@ -595,17 +627,19 @@ Projects:: /user/username/projects/myproject/folder/tsconfig.json (Configured) projectStateVersion: 2 projectProgramVersion: 1 -/user/username/projects/myproject/tsconfig.json (Configured) +/user/username/projects/myproject/tsconfig.json (Configured) *deleted* projectStateVersion: 1 projectProgramVersion: 1 + isClosed: true *changed* + noOpenRef: true ScriptInfos:: /a/lib/lib.d.ts *changed* version: Text-1 - containingProjects: 3 *changed* + containingProjects: 2 *changed* /user/username/projects/myproject/folder/tsconfig.json - /user/username/projects/myproject/tsconfig.json /dev/null/inferredProject1* *new* + /user/username/projects/myproject/tsconfig.json *deleted* /random/random.ts (Open) *new* version: SVC-1-0 containingProjects: 1 @@ -614,10 +648,10 @@ ScriptInfos:: version: SVC-1-0 containingProjects: 1 /user/username/projects/myproject/folder/tsconfig.json *default* -/user/username/projects/myproject/folder/commonFile2.ts (Open) +/user/username/projects/myproject/folder/commonFile2.ts (Open) *changed* version: SVC-1-0 - containingProjects: 1 - /user/username/projects/myproject/tsconfig.json *default* + containingProjects: 0 *changed* + /user/username/projects/myproject/tsconfig.json *deleted* Before request @@ -634,10 +668,6 @@ Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /user/username/project Info seq [hh:mm:ss:mss] Project '/user/username/projects/myproject/folder/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (2) -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/user/username/projects/myproject/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (2) - Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) Info seq [hh:mm:ss:mss] Files (2) @@ -645,7 +675,7 @@ Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: Info seq [hh:mm:ss:mss] FileName: /user/username/projects/myproject/folder/commonFile2.ts ProjectRootPath: undefined -Info seq [hh:mm:ss:mss] Projects: /user/username/projects/myproject/tsconfig.json +Info seq [hh:mm:ss:mss] Projects: Info seq [hh:mm:ss:mss] FileName: /random/random.ts ProjectRootPath: undefined Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* Info seq [hh:mm:ss:mss] response: @@ -673,15 +703,21 @@ FsWatches:: {} /user/username/projects/myproject/folder/tsconfig.json: {} -/user/username/projects/myproject/tsconfig.json: - {} + +Projects:: +/dev/null/inferredProject1* (Inferred) + projectStateVersion: 1 + projectProgramVersion: 1 +/user/username/projects/myproject/folder/tsconfig.json (Configured) *changed* + projectStateVersion: 2 + projectProgramVersion: 1 + noOpenRef: true *changed* ScriptInfos:: /a/lib/lib.d.ts version: Text-1 - containingProjects: 3 + containingProjects: 2 /user/username/projects/myproject/folder/tsconfig.json - /user/username/projects/myproject/tsconfig.json /dev/null/inferredProject1* /random/random.ts (Open) version: SVC-1-0 @@ -694,8 +730,7 @@ ScriptInfos:: /user/username/projects/myproject/folder/tsconfig.json /user/username/projects/myproject/folder/commonFile2.ts (Open) version: SVC-1-0 - containingProjects: 1 - /user/username/projects/myproject/tsconfig.json *default* + containingProjects: 0 Before request @@ -712,10 +747,6 @@ Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /user/username/project Info seq [hh:mm:ss:mss] Project '/user/username/projects/myproject/folder/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (2) -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/user/username/projects/myproject/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (2) - Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) Info seq [hh:mm:ss:mss] Files (2) @@ -751,28 +782,12 @@ FsWatches:: {} /user/username/projects/myproject/folder/tsconfig.json: {} -/user/username/projects/myproject/tsconfig.json: - {} - -Projects:: -/dev/null/inferredProject1* (Inferred) - projectStateVersion: 1 - projectProgramVersion: 1 -/user/username/projects/myproject/folder/tsconfig.json (Configured) *changed* - projectStateVersion: 2 - projectProgramVersion: 1 - noOpenRef: true *changed* -/user/username/projects/myproject/tsconfig.json (Configured) *changed* - projectStateVersion: 1 - projectProgramVersion: 1 - noOpenRef: true *changed* ScriptInfos:: /a/lib/lib.d.ts version: Text-1 - containingProjects: 3 + containingProjects: 2 /user/username/projects/myproject/folder/tsconfig.json - /user/username/projects/myproject/tsconfig.json /dev/null/inferredProject1* /random/random.ts (Open) version: SVC-1-0 @@ -785,8 +800,7 @@ ScriptInfos:: /user/username/projects/myproject/folder/commonFile2.ts *changed* open: false *changed* version: SVC-1-0 - containingProjects: 1 - /user/username/projects/myproject/tsconfig.json + containingProjects: 0 Before request @@ -802,10 +816,6 @@ Info seq [hh:mm:ss:mss] request: Info seq [hh:mm:ss:mss] Project '/user/username/projects/myproject/folder/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (2) -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/user/username/projects/myproject/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (2) - Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) Info seq [hh:mm:ss:mss] Files (2) @@ -832,17 +842,12 @@ Projects:: projectStateVersion: 2 projectProgramVersion: 1 noOpenRef: true -/user/username/projects/myproject/tsconfig.json (Configured) - projectStateVersion: 1 - projectProgramVersion: 1 - noOpenRef: true ScriptInfos:: /a/lib/lib.d.ts version: Text-1 - containingProjects: 3 + containingProjects: 2 /user/username/projects/myproject/folder/tsconfig.json - /user/username/projects/myproject/tsconfig.json /dev/null/inferredProject1* /random/random.ts *deleted* open: false *changed* @@ -855,8 +860,7 @@ ScriptInfos:: /user/username/projects/myproject/folder/tsconfig.json /user/username/projects/myproject/folder/commonFile2.ts version: SVC-1-0 - containingProjects: 1 - /user/username/projects/myproject/tsconfig.json + containingProjects: 0 Before request @@ -905,24 +909,6 @@ Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /user/username/pr Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Project: /user/username/projects/myproject/folder/tsconfig.json WatchType: Type roots Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/node_modules/@types 1 undefined Project: /user/username/projects/myproject/folder/tsconfig.json WatchType: Type roots Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/node_modules/@types 1 undefined Project: /user/username/projects/myproject/folder/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] `remove Project:: -Info seq [hh:mm:ss:mss] Project '/user/username/projects/myproject/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (2) - /a/lib/lib.d.ts - /user/username/projects/myproject/folder/commonFile2.ts - - - ../../../../a/lib/lib.d.ts - Default library for target 'es5' - folder/commonFile2.ts - Part of 'files' list in tsconfig.json - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /user/username/projects/myproject/tsconfig.json 2000 undefined Project: /user/username/projects/myproject/tsconfig.json WatchType: Config file -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Project: /user/username/projects/myproject/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Project: /user/username/projects/myproject/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/node_modules/@types 1 undefined Project: /user/username/projects/myproject/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/node_modules/@types 1 undefined Project: /user/username/projects/myproject/tsconfig.json WatchType: Type roots Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /user/username/projects/myproject/folder/commonFile1.ts 500 undefined WatchType: Closed Script info Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /user/username/projects/myproject/folder/commonFile2.ts 500 undefined WatchType: Closed Script info Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) @@ -964,8 +950,6 @@ FsWatches *deleted*:: {} /user/username/projects/myproject/folder/tsconfig.json: {} -/user/username/projects/myproject/tsconfig.json: - {} Projects:: /dev/null/inferredProject1* (Inferred) *changed* @@ -978,11 +962,6 @@ Projects:: projectProgramVersion: 1 isClosed: true *changed* noOpenRef: true -/user/username/projects/myproject/tsconfig.json (Configured) *deleted* - projectStateVersion: 1 - projectProgramVersion: 1 - isClosed: true *changed* - noOpenRef: true ScriptInfos:: /a/lib/lib.d.ts *changed* @@ -990,7 +969,6 @@ ScriptInfos:: containingProjects: 1 *changed* /dev/null/inferredProject1* /user/username/projects/myproject/folder/tsconfig.json *deleted* - /user/username/projects/myproject/tsconfig.json *deleted* /random/random.ts (Open) *new* version: SVC-2-0 containingProjects: 1 @@ -1001,8 +979,7 @@ ScriptInfos:: /user/username/projects/myproject/folder/tsconfig.json *deleted* /user/username/projects/myproject/folder/commonFile2.ts *deleted* version: SVC-1-0 - containingProjects: 0 *changed* - /user/username/projects/myproject/tsconfig.json *deleted* + containingProjects: 0 Before request @@ -1201,70 +1178,45 @@ Info seq [hh:mm:ss:mss] request: "type": "request" } Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /user/username/projects/myproject/folder/commonFile2.ts ProjectRootPath: undefined:: Result: /user/username/projects/myproject/folder/tsconfig.json -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /user/username/projects/myproject/folder/tsconfig.json ProjectRootPath: undefined:: Result: /user/username/projects/myproject/tsconfig.json -Info seq [hh:mm:ss:mss] Creating configuration project /user/username/projects/myproject/tsconfig.json -Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/tsconfig.json 2000 undefined Project: /user/username/projects/myproject/tsconfig.json WatchType: Config file Info seq [hh:mm:ss:mss] event: { "seq": 0, "type": "event", - "event": "projectLoadingStart", + "event": "configFileDiag", "body": { - "projectName": "/user/username/projects/myproject/tsconfig.json", - "reason": "Creating possible configured project for /user/username/projects/myproject/folder/commonFile2.ts to open" + "triggerFile": "/user/username/projects/myproject/folder/commonFile2.ts", + "configFile": "/user/username/projects/myproject/folder/tsconfig.json", + "diagnostics": [] } } -Info seq [hh:mm:ss:mss] Config: /user/username/projects/myproject/tsconfig.json : { - "rootNames": [ - "/user/username/projects/myproject/folder/commonFile2.ts" - ], - "options": { - "configFilePath": "/user/username/projects/myproject/tsconfig.json" - } -} -Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /user/username/projects/myproject/tsconfig.json -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Project: /user/username/projects/myproject/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Project: /user/username/projects/myproject/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/node_modules/@types 1 undefined Project: /user/username/projects/myproject/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/node_modules/@types 1 undefined Project: /user/username/projects/myproject/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /user/username/projects/myproject/tsconfig.json projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms -Info seq [hh:mm:ss:mss] Project '/user/username/projects/myproject/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/folder/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/tsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject2* +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/folder/node_modules/@types 1 undefined Project: /dev/null/inferredProject2* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/folder/node_modules/@types 1 undefined Project: /dev/null/inferredProject2* WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Project: /dev/null/inferredProject2* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Project: /dev/null/inferredProject2* WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/node_modules/@types 1 undefined Project: /dev/null/inferredProject2* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/node_modules/@types 1 undefined Project: /dev/null/inferredProject2* WatchType: Type roots +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject2* projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject2*' (Inferred) Info seq [hh:mm:ss:mss] Files (2) /a/lib/lib.d.ts Text-1 "/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }" /user/username/projects/myproject/folder/commonFile2.ts SVC-2-0 "let y = 1" - ../../../../a/lib/lib.d.ts + ../../../../../a/lib/lib.d.ts Default library for target 'es5' - folder/commonFile2.ts - Part of 'files' list in tsconfig.json + commonFile2.ts + Root file specified for compilation Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "projectLoadingFinish", - "body": { - "projectName": "/user/username/projects/myproject/tsconfig.json" - } - } -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "configFileDiag", - "body": { - "triggerFile": "/user/username/projects/myproject/folder/commonFile2.ts", - "configFile": "/user/username/projects/myproject/tsconfig.json", - "diagnostics": [] - } - } Info seq [hh:mm:ss:mss] Project '/user/username/projects/myproject/folder/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/user/username/projects/myproject/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject2*' (Inferred) Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- @@ -1272,7 +1224,7 @@ Info seq [hh:mm:ss:mss] Open files: Info seq [hh:mm:ss:mss] FileName: /user/username/projects/myproject/folder/commonFile1.ts ProjectRootPath: undefined Info seq [hh:mm:ss:mss] Projects: /user/username/projects/myproject/folder/tsconfig.json Info seq [hh:mm:ss:mss] FileName: /user/username/projects/myproject/folder/commonFile2.ts ProjectRootPath: undefined -Info seq [hh:mm:ss:mss] Projects: /user/username/projects/myproject/tsconfig.json +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject2* Info seq [hh:mm:ss:mss] response: { "seq": 0, @@ -1287,8 +1239,12 @@ Info seq [hh:mm:ss:mss] response: After request PolledWatches:: +/user/username/projects/myproject/folder/jsconfig.json: *new* + {"pollingInterval":2000} /user/username/projects/myproject/folder/node_modules/@types: {"pollingInterval":500} +/user/username/projects/myproject/jsconfig.json: *new* + {"pollingInterval":2000} /user/username/projects/myproject/node_modules/@types: {"pollingInterval":500} /user/username/projects/node_modules/@types: @@ -1303,10 +1259,10 @@ FsWatches:: {} Projects:: -/user/username/projects/myproject/folder/tsconfig.json (Configured) +/dev/null/inferredProject2* (Inferred) *new* projectStateVersion: 1 projectProgramVersion: 1 -/user/username/projects/myproject/tsconfig.json (Configured) *new* +/user/username/projects/myproject/folder/tsconfig.json (Configured) projectStateVersion: 1 projectProgramVersion: 1 @@ -1315,7 +1271,7 @@ ScriptInfos:: version: Text-1 containingProjects: 2 *changed* /user/username/projects/myproject/folder/tsconfig.json - /user/username/projects/myproject/tsconfig.json *new* + /dev/null/inferredProject2* *new* /user/username/projects/myproject/folder/commonFile1.ts (Open) version: SVC-2-0 containingProjects: 1 @@ -1323,32 +1279,98 @@ ScriptInfos:: /user/username/projects/myproject/folder/commonFile2.ts (Open) *new* version: SVC-2-0 containingProjects: 1 - /user/username/projects/myproject/tsconfig.json *default* + /dev/null/inferredProject2* *default* 2: When both files are open and config file is deleted Info seq [hh:mm:ss:mss] FileWatcher:: Triggered with /user/username/projects/myproject/folder/tsconfig.json 2:: WatchInfo: /user/username/projects/myproject/folder/tsconfig.json 2000 undefined Project: /user/username/projects/myproject/folder/tsconfig.json WatchType: Config file Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /user/username/projects/myproject/folder/commonFile1.ts ProjectRootPath: undefined:: Result: /user/username/projects/myproject/tsconfig.json +Info seq [hh:mm:ss:mss] Creating configuration project /user/username/projects/myproject/tsconfig.json +Info seq [hh:mm:ss:mss] Scheduled: /user/username/projects/myproject/tsconfig.json Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /user/username/projects/myproject/folder/commonFile2.ts ProjectRootPath: undefined:: Result: /user/username/projects/myproject/tsconfig.json Info seq [hh:mm:ss:mss] Scheduled: *ensureProjectForOpenFiles* Info seq [hh:mm:ss:mss] Elapsed:: *ms FileWatcher:: Triggered with /user/username/projects/myproject/folder/tsconfig.json 2:: WatchInfo: /user/username/projects/myproject/folder/tsconfig.json 2000 undefined Project: /user/username/projects/myproject/folder/tsconfig.json WatchType: Config file -Before running Timeout callback:: count: 1 -5: *ensureProjectForOpenFiles* +Before running Timeout callback:: count: 2 +5: /user/username/projects/myproject/tsconfig.json +6: *ensureProjectForOpenFiles* //// [/user/username/projects/myproject/folder/tsconfig.json] deleted -Timeout callback:: count: 1 -5: *ensureProjectForOpenFiles* *new* +Timeout callback:: count: 2 +5: /user/username/projects/myproject/tsconfig.json *new* +6: *ensureProjectForOpenFiles* *new* Projects:: +/dev/null/inferredProject2* (Inferred) + projectStateVersion: 1 + projectProgramVersion: 1 /user/username/projects/myproject/folder/tsconfig.json (Configured) *changed* projectStateVersion: 1 projectProgramVersion: 1 isOrphan: true *changed* deferredClose: true *changed* -/user/username/projects/myproject/tsconfig.json (Configured) +/user/username/projects/myproject/tsconfig.json (Configured) *new* projectStateVersion: 1 - projectProgramVersion: 1 + projectProgramVersion: 0 + dirty: true + +Info seq [hh:mm:ss:mss] Running: /user/username/projects/myproject/tsconfig.json +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingStart", + "body": { + "projectName": "/user/username/projects/myproject/tsconfig.json", + "reason": "Change in config file /user/username/projects/myproject/folder/tsconfig.json detected, Creating possible configured project for /user/username/projects/myproject/folder/commonFile1.ts to open" + } + } +Info seq [hh:mm:ss:mss] Config: /user/username/projects/myproject/tsconfig.json : { + "rootNames": [ + "/user/username/projects/myproject/folder/commonFile2.ts" + ], + "options": { + "configFilePath": "/user/username/projects/myproject/tsconfig.json" + } +} +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /user/username/projects/myproject/folder/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /user/username/projects/myproject/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /user/username/projects/myproject/tsconfig.json +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Project: /user/username/projects/myproject/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Project: /user/username/projects/myproject/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/node_modules/@types 1 undefined Project: /user/username/projects/myproject/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/node_modules/@types 1 undefined Project: /user/username/projects/myproject/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /user/username/projects/myproject/tsconfig.json projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/user/username/projects/myproject/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (2) + /a/lib/lib.d.ts Text-1 "/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }" + /user/username/projects/myproject/folder/commonFile2.ts SVC-2-0 "let y = 1" + + + ../../../../a/lib/lib.d.ts + Default library for target 'es5' + folder/commonFile2.ts + Part of 'files' list in tsconfig.json -Host is moving to new time +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingFinish", + "body": { + "projectName": "/user/username/projects/myproject/tsconfig.json" + } + } +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "configFileDiag", + "body": { + "triggerFile": "/user/username/projects/myproject/tsconfig.json", + "configFile": "/user/username/projects/myproject/tsconfig.json", + "diagnostics": [] + } + } Info seq [hh:mm:ss:mss] Running: *ensureProjectForOpenFiles* Info seq [hh:mm:ss:mss] Before ensureProjectForOpenFiles: Info seq [hh:mm:ss:mss] Project '/user/username/projects/myproject/folder/tsconfig.json' (Configured) @@ -1358,23 +1380,20 @@ Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Project '/user/username/projects/myproject/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (2) +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject2*' (Inferred) +Info seq [hh:mm:ss:mss] Files (2) + Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: Info seq [hh:mm:ss:mss] FileName: /user/username/projects/myproject/folder/commonFile1.ts ProjectRootPath: undefined Info seq [hh:mm:ss:mss] Projects: /user/username/projects/myproject/folder/tsconfig.json Info seq [hh:mm:ss:mss] FileName: /user/username/projects/myproject/folder/commonFile2.ts ProjectRootPath: undefined Info seq [hh:mm:ss:mss] Projects: /user/username/projects/myproject/tsconfig.json -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /user/username/projects/myproject/tsconfig.json ProjectRootPath: undefined:: Result: undefined Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/folder/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject2* -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/folder/node_modules/@types 1 undefined Project: /dev/null/inferredProject2* WatchType: Type roots -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/folder/node_modules/@types 1 undefined Project: /dev/null/inferredProject2* WatchType: Type roots -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Project: /dev/null/inferredProject2* WatchType: Type roots -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Project: /dev/null/inferredProject2* WatchType: Type roots -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/node_modules/@types 1 undefined Project: /dev/null/inferredProject2* WatchType: Type roots -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/node_modules/@types 1 undefined Project: /dev/null/inferredProject2* WatchType: Type roots -Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject2* projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject2* projectStateVersion: 2 projectProgramVersion: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject2*' (Inferred) Info seq [hh:mm:ss:mss] Files (2) /a/lib/lib.d.ts Text-1 "/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }" @@ -1421,17 +1440,23 @@ Info seq [hh:mm:ss:mss] event: After running Timeout callback:: count: 0 PolledWatches:: -/user/username/projects/myproject/folder/jsconfig.json: *new* - {"pollingInterval":2000} +/user/username/projects/myproject/folder/jsconfig.json: + {"pollingInterval":2000} *new* /user/username/projects/myproject/folder/node_modules/@types: {"pollingInterval":500} -/user/username/projects/myproject/jsconfig.json: *new* - {"pollingInterval":2000} +/user/username/projects/myproject/jsconfig.json: + {"pollingInterval":2000} *new* /user/username/projects/myproject/node_modules/@types: {"pollingInterval":500} /user/username/projects/node_modules/@types: {"pollingInterval":500} +PolledWatches *deleted*:: +/user/username/projects/myproject/folder/jsconfig.json: + {"pollingInterval":2000} +/user/username/projects/myproject/jsconfig.json: + {"pollingInterval":2000} + FsWatches:: /a/lib/lib.d.ts: {} @@ -1441,34 +1466,36 @@ FsWatches:: {} Projects:: -/dev/null/inferredProject2* (Inferred) *new* - projectStateVersion: 1 - projectProgramVersion: 1 +/dev/null/inferredProject2* (Inferred) *changed* + projectStateVersion: 2 *changed* + projectProgramVersion: 2 *changed* /user/username/projects/myproject/folder/tsconfig.json (Configured) projectStateVersion: 1 projectProgramVersion: 1 isOrphan: true deferredClose: true -/user/username/projects/myproject/tsconfig.json (Configured) +/user/username/projects/myproject/tsconfig.json (Configured) *changed* projectStateVersion: 1 - projectProgramVersion: 1 + projectProgramVersion: 1 *changed* + dirty: false *changed* ScriptInfos:: /a/lib/lib.d.ts *changed* version: Text-1 containingProjects: 3 *changed* /user/username/projects/myproject/folder/tsconfig.json - /user/username/projects/myproject/tsconfig.json - /dev/null/inferredProject2* *new* + /dev/null/inferredProject2* + /user/username/projects/myproject/tsconfig.json *new* /user/username/projects/myproject/folder/commonFile1.ts (Open) *changed* version: SVC-2-0 containingProjects: 2 *changed* /dev/null/inferredProject2* *default* *new* /user/username/projects/myproject/folder/tsconfig.json -/user/username/projects/myproject/folder/commonFile2.ts (Open) +/user/username/projects/myproject/folder/commonFile2.ts (Open) *changed* version: SVC-2-0 - containingProjects: 1 - /user/username/projects/myproject/tsconfig.json *default* + containingProjects: 1 *changed* + /user/username/projects/myproject/tsconfig.json *default* *new* + /dev/null/inferredProject2* *deleted* Info seq [hh:mm:ss:mss] FileWatcher:: Triggered with /user/username/projects/myproject/folder/tsconfig.json 0:: WatchInfo: /user/username/projects/myproject/folder/tsconfig.json 2000 undefined Project: /user/username/projects/myproject/folder/tsconfig.json WatchType: Config file Info seq [hh:mm:ss:mss] Scheduled: /user/username/projects/myproject/folder/tsconfig.json @@ -1477,8 +1504,8 @@ Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /user/username/project Info seq [hh:mm:ss:mss] Scheduled: *ensureProjectForOpenFiles* Info seq [hh:mm:ss:mss] Elapsed:: *ms FileWatcher:: Triggered with /user/username/projects/myproject/folder/tsconfig.json 0:: WatchInfo: /user/username/projects/myproject/folder/tsconfig.json 2000 undefined Project: /user/username/projects/myproject/folder/tsconfig.json WatchType: Config file Before running Timeout callback:: count: 2 -6: /user/username/projects/myproject/folder/tsconfig.json -7: *ensureProjectForOpenFiles* +7: /user/username/projects/myproject/folder/tsconfig.json +8: *ensureProjectForOpenFiles* //// [/user/username/projects/myproject/folder/tsconfig.json] { "files": [ @@ -1488,13 +1515,13 @@ Before running Timeout callback:: count: 2 Timeout callback:: count: 2 -6: /user/username/projects/myproject/folder/tsconfig.json *new* -7: *ensureProjectForOpenFiles* *new* +7: /user/username/projects/myproject/folder/tsconfig.json *new* +8: *ensureProjectForOpenFiles* *new* Projects:: /dev/null/inferredProject2* (Inferred) - projectStateVersion: 1 - projectProgramVersion: 1 + projectStateVersion: 2 + projectProgramVersion: 2 /user/username/projects/myproject/folder/tsconfig.json (Configured) *changed* projectStateVersion: 2 *changed* projectProgramVersion: 1 @@ -1566,11 +1593,10 @@ Info seq [hh:mm:ss:mss] FileName: /user/username/projects/myproject/folder/com Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject2*,/user/username/projects/myproject/folder/tsconfig.json Info seq [hh:mm:ss:mss] FileName: /user/username/projects/myproject/folder/commonFile2.ts ProjectRootPath: undefined Info seq [hh:mm:ss:mss] Projects: /user/username/projects/myproject/tsconfig.json -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /user/username/projects/myproject/folder/tsconfig.json ProjectRootPath: undefined:: Result: /user/username/projects/myproject/tsconfig.json Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /user/username/projects/myproject/folder/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /user/username/projects/myproject/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject2* -Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject2* projectStateVersion: 2 projectProgramVersion: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject2* projectStateVersion: 3 projectProgramVersion: 2 structureChanged: true structureIsReused:: Not Elapsed:: *ms Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject2*' (Inferred) Info seq [hh:mm:ss:mss] Files (0) @@ -1634,16 +1660,17 @@ FsWatches:: Projects:: /dev/null/inferredProject2* (Inferred) *changed* - projectStateVersion: 2 *changed* - projectProgramVersion: 2 *changed* + projectStateVersion: 3 *changed* + projectProgramVersion: 3 *changed* isOrphan: true *changed* /user/username/projects/myproject/folder/tsconfig.json (Configured) *changed* projectStateVersion: 2 projectProgramVersion: 1 dirty: false *changed* -/user/username/projects/myproject/tsconfig.json (Configured) +/user/username/projects/myproject/tsconfig.json (Configured) *changed* projectStateVersion: 1 projectProgramVersion: 1 + noOpenRef: true *changed* ScriptInfos:: /a/lib/lib.d.ts *changed* @@ -1690,6 +1717,24 @@ Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] `remove Project:: +Info seq [hh:mm:ss:mss] Project '/user/username/projects/myproject/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (2) + /a/lib/lib.d.ts + /user/username/projects/myproject/folder/commonFile2.ts + + + ../../../../a/lib/lib.d.ts + Default library for target 'es5' + folder/commonFile2.ts + Part of 'files' list in tsconfig.json + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /user/username/projects/myproject/tsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Project: /user/username/projects/myproject/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Project: /user/username/projects/myproject/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/node_modules/@types 1 undefined Project: /user/username/projects/myproject/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/node_modules/@types 1 undefined Project: /user/username/projects/myproject/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] `remove Project:: Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject2*' (Inferred) Info seq [hh:mm:ss:mss] Files (0) @@ -1705,10 +1750,6 @@ Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /us Info seq [hh:mm:ss:mss] Project '/user/username/projects/myproject/folder/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (2) -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/user/username/projects/myproject/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (2) - Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject3*' (Inferred) Info seq [hh:mm:ss:mss] Files (2) @@ -1718,7 +1759,7 @@ Info seq [hh:mm:ss:mss] Open files: Info seq [hh:mm:ss:mss] FileName: /user/username/projects/myproject/folder/commonFile1.ts ProjectRootPath: undefined Info seq [hh:mm:ss:mss] Projects: /user/username/projects/myproject/folder/tsconfig.json Info seq [hh:mm:ss:mss] FileName: /user/username/projects/myproject/folder/commonFile2.ts ProjectRootPath: undefined -Info seq [hh:mm:ss:mss] Projects: /user/username/projects/myproject/tsconfig.json +Info seq [hh:mm:ss:mss] Projects: Info seq [hh:mm:ss:mss] FileName: /random/random.ts ProjectRootPath: undefined Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject3* Info seq [hh:mm:ss:mss] response: @@ -1734,10 +1775,28 @@ Info seq [hh:mm:ss:mss] response: } After request +PolledWatches:: +/user/username/projects/myproject/folder/node_modules/@types: + {"pollingInterval":500} +/user/username/projects/myproject/node_modules/@types: + {"pollingInterval":500} +/user/username/projects/node_modules/@types: + {"pollingInterval":500} + +FsWatches:: +/a/lib/lib.d.ts: + {} +/user/username/projects/myproject/folder/tsconfig.json: + {} + +FsWatches *deleted*:: +/user/username/projects/myproject/tsconfig.json: + {} + Projects:: /dev/null/inferredProject2* (Inferred) *deleted* - projectStateVersion: 2 - projectProgramVersion: 2 + projectStateVersion: 3 + projectProgramVersion: 3 isClosed: true *changed* isOrphan: true /dev/null/inferredProject3* (Inferred) *new* @@ -1746,17 +1805,19 @@ Projects:: /user/username/projects/myproject/folder/tsconfig.json (Configured) projectStateVersion: 2 projectProgramVersion: 1 -/user/username/projects/myproject/tsconfig.json (Configured) +/user/username/projects/myproject/tsconfig.json (Configured) *deleted* projectStateVersion: 1 projectProgramVersion: 1 + isClosed: true *changed* + noOpenRef: true ScriptInfos:: /a/lib/lib.d.ts *changed* version: Text-1 - containingProjects: 3 *changed* + containingProjects: 2 *changed* /user/username/projects/myproject/folder/tsconfig.json - /user/username/projects/myproject/tsconfig.json /dev/null/inferredProject3* *new* + /user/username/projects/myproject/tsconfig.json *deleted* /random/random.ts (Open) *new* version: SVC-3-0 containingProjects: 1 @@ -1765,10 +1826,10 @@ ScriptInfos:: version: SVC-2-0 containingProjects: 1 /user/username/projects/myproject/folder/tsconfig.json *default* -/user/username/projects/myproject/folder/commonFile2.ts (Open) +/user/username/projects/myproject/folder/commonFile2.ts (Open) *changed* version: SVC-2-0 - containingProjects: 1 - /user/username/projects/myproject/tsconfig.json *default* + containingProjects: 0 *changed* + /user/username/projects/myproject/tsconfig.json *deleted* Before request @@ -1785,10 +1846,6 @@ Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /user/username/project Info seq [hh:mm:ss:mss] Project '/user/username/projects/myproject/folder/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (2) -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/user/username/projects/myproject/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (2) - Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject3*' (Inferred) Info seq [hh:mm:ss:mss] Files (2) @@ -1796,7 +1853,7 @@ Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: Info seq [hh:mm:ss:mss] FileName: /user/username/projects/myproject/folder/commonFile2.ts ProjectRootPath: undefined -Info seq [hh:mm:ss:mss] Projects: /user/username/projects/myproject/tsconfig.json +Info seq [hh:mm:ss:mss] Projects: Info seq [hh:mm:ss:mss] FileName: /random/random.ts ProjectRootPath: undefined Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject3* Info seq [hh:mm:ss:mss] response: @@ -1824,15 +1881,21 @@ FsWatches:: {} /user/username/projects/myproject/folder/tsconfig.json: {} -/user/username/projects/myproject/tsconfig.json: - {} + +Projects:: +/dev/null/inferredProject3* (Inferred) + projectStateVersion: 1 + projectProgramVersion: 1 +/user/username/projects/myproject/folder/tsconfig.json (Configured) *changed* + projectStateVersion: 2 + projectProgramVersion: 1 + noOpenRef: true *changed* ScriptInfos:: /a/lib/lib.d.ts version: Text-1 - containingProjects: 3 + containingProjects: 2 /user/username/projects/myproject/folder/tsconfig.json - /user/username/projects/myproject/tsconfig.json /dev/null/inferredProject3* /random/random.ts (Open) version: SVC-3-0 @@ -1845,8 +1908,7 @@ ScriptInfos:: /user/username/projects/myproject/folder/tsconfig.json /user/username/projects/myproject/folder/commonFile2.ts (Open) version: SVC-2-0 - containingProjects: 1 - /user/username/projects/myproject/tsconfig.json *default* + containingProjects: 0 Before request @@ -1863,10 +1925,6 @@ Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /user/username/project Info seq [hh:mm:ss:mss] Project '/user/username/projects/myproject/folder/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (2) -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/user/username/projects/myproject/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (2) - Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject3*' (Inferred) Info seq [hh:mm:ss:mss] Files (2) @@ -1902,28 +1960,12 @@ FsWatches:: {} /user/username/projects/myproject/folder/tsconfig.json: {} -/user/username/projects/myproject/tsconfig.json: - {} - -Projects:: -/dev/null/inferredProject3* (Inferred) - projectStateVersion: 1 - projectProgramVersion: 1 -/user/username/projects/myproject/folder/tsconfig.json (Configured) *changed* - projectStateVersion: 2 - projectProgramVersion: 1 - noOpenRef: true *changed* -/user/username/projects/myproject/tsconfig.json (Configured) *changed* - projectStateVersion: 1 - projectProgramVersion: 1 - noOpenRef: true *changed* ScriptInfos:: /a/lib/lib.d.ts version: Text-1 - containingProjects: 3 + containingProjects: 2 /user/username/projects/myproject/folder/tsconfig.json - /user/username/projects/myproject/tsconfig.json /dev/null/inferredProject3* /random/random.ts (Open) version: SVC-3-0 @@ -1936,8 +1978,7 @@ ScriptInfos:: /user/username/projects/myproject/folder/commonFile2.ts *changed* open: false *changed* version: SVC-2-0 - containingProjects: 1 - /user/username/projects/myproject/tsconfig.json + containingProjects: 0 Before request @@ -1953,10 +1994,6 @@ Info seq [hh:mm:ss:mss] request: Info seq [hh:mm:ss:mss] Project '/user/username/projects/myproject/folder/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (2) -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/user/username/projects/myproject/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (2) - Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject3*' (Inferred) Info seq [hh:mm:ss:mss] Files (2) @@ -1983,17 +2020,12 @@ Projects:: projectStateVersion: 2 projectProgramVersion: 1 noOpenRef: true -/user/username/projects/myproject/tsconfig.json (Configured) - projectStateVersion: 1 - projectProgramVersion: 1 - noOpenRef: true ScriptInfos:: /a/lib/lib.d.ts version: Text-1 - containingProjects: 3 + containingProjects: 2 /user/username/projects/myproject/folder/tsconfig.json - /user/username/projects/myproject/tsconfig.json /dev/null/inferredProject3* /random/random.ts *deleted* open: false *changed* @@ -2006,8 +2038,7 @@ ScriptInfos:: /user/username/projects/myproject/folder/tsconfig.json /user/username/projects/myproject/folder/commonFile2.ts version: SVC-2-0 - containingProjects: 1 - /user/username/projects/myproject/tsconfig.json + containingProjects: 0 Before request @@ -2056,24 +2087,6 @@ Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /user/username/pr Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Project: /user/username/projects/myproject/folder/tsconfig.json WatchType: Type roots Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/node_modules/@types 1 undefined Project: /user/username/projects/myproject/folder/tsconfig.json WatchType: Type roots Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/node_modules/@types 1 undefined Project: /user/username/projects/myproject/folder/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] `remove Project:: -Info seq [hh:mm:ss:mss] Project '/user/username/projects/myproject/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (2) - /a/lib/lib.d.ts - /user/username/projects/myproject/folder/commonFile2.ts - - - ../../../../a/lib/lib.d.ts - Default library for target 'es5' - folder/commonFile2.ts - Part of 'files' list in tsconfig.json - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /user/username/projects/myproject/tsconfig.json 2000 undefined Project: /user/username/projects/myproject/tsconfig.json WatchType: Config file -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Project: /user/username/projects/myproject/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Project: /user/username/projects/myproject/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/node_modules/@types 1 undefined Project: /user/username/projects/myproject/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/node_modules/@types 1 undefined Project: /user/username/projects/myproject/tsconfig.json WatchType: Type roots Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /user/username/projects/myproject/folder/commonFile1.ts 500 undefined WatchType: Closed Script info Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /user/username/projects/myproject/folder/commonFile2.ts 500 undefined WatchType: Closed Script info Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject3*' (Inferred) @@ -2115,8 +2128,6 @@ FsWatches *deleted*:: {} /user/username/projects/myproject/folder/tsconfig.json: {} -/user/username/projects/myproject/tsconfig.json: - {} Projects:: /dev/null/inferredProject3* (Inferred) *changed* @@ -2129,11 +2140,6 @@ Projects:: projectProgramVersion: 1 isClosed: true *changed* noOpenRef: true -/user/username/projects/myproject/tsconfig.json (Configured) *deleted* - projectStateVersion: 1 - projectProgramVersion: 1 - isClosed: true *changed* - noOpenRef: true ScriptInfos:: /a/lib/lib.d.ts *changed* @@ -2141,7 +2147,6 @@ ScriptInfos:: containingProjects: 1 *changed* /dev/null/inferredProject3* /user/username/projects/myproject/folder/tsconfig.json *deleted* - /user/username/projects/myproject/tsconfig.json *deleted* /random/random.ts (Open) *new* version: SVC-4-0 containingProjects: 1 @@ -2152,8 +2157,7 @@ ScriptInfos:: /user/username/projects/myproject/folder/tsconfig.json *deleted* /user/username/projects/myproject/folder/commonFile2.ts *deleted* version: SVC-2-0 - containingProjects: 0 *changed* - /user/username/projects/myproject/tsconfig.json *deleted* + containingProjects: 0 Before request @@ -2368,8 +2372,8 @@ FsWatches:: {} Timeout callback:: count: 2 -8: /user/username/projects/myproject/tsconfig.json *new* -9: *ensureProjectForOpenFiles* *new* +9: /user/username/projects/myproject/tsconfig.json *new* +10: *ensureProjectForOpenFiles* *new* Projects:: /user/username/projects/myproject/folder/tsconfig.json (Configured) *changed* @@ -3012,10 +3016,10 @@ FsWatches:: {} Timeout callback:: count: 2 -8: /user/username/projects/myproject/tsconfig.json *deleted* -9: *ensureProjectForOpenFiles* *deleted* -10: /user/username/projects/myproject/tsconfig.json *new* -11: *ensureProjectForOpenFiles* *new* +9: /user/username/projects/myproject/tsconfig.json *deleted* +10: *ensureProjectForOpenFiles* *deleted* +11: /user/username/projects/myproject/tsconfig.json *new* +12: *ensureProjectForOpenFiles* *new* Projects:: /user/username/projects/myproject/folder/tsconfig.json (Configured) *changed* @@ -3840,10 +3844,10 @@ FsWatches:: {} Timeout callback:: count: 2 -10: /user/username/projects/myproject/tsconfig.json *deleted* -11: *ensureProjectForOpenFiles* *deleted* -12: /user/username/projects/myproject/tsconfig.json *new* -13: *ensureProjectForOpenFiles* *new* +11: /user/username/projects/myproject/tsconfig.json *deleted* +12: *ensureProjectForOpenFiles* *deleted* +13: /user/username/projects/myproject/tsconfig.json *new* +14: *ensureProjectForOpenFiles* *new* Projects:: /user/username/projects/myproject/folder/tsconfig.json (Configured) *changed* @@ -4649,70 +4653,45 @@ Info seq [hh:mm:ss:mss] request: "type": "request" } Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /user/username/projects/myproject/folder/commonFile2.ts ProjectRootPath: undefined:: Result: /user/username/projects/myproject/folder/tsconfig.json -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /user/username/projects/myproject/folder/tsconfig.json ProjectRootPath: undefined:: Result: /user/username/projects/myproject/tsconfig.json -Info seq [hh:mm:ss:mss] Creating configuration project /user/username/projects/myproject/tsconfig.json -Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/tsconfig.json 2000 undefined Project: /user/username/projects/myproject/tsconfig.json WatchType: Config file Info seq [hh:mm:ss:mss] event: { "seq": 0, "type": "event", - "event": "projectLoadingStart", + "event": "configFileDiag", "body": { - "projectName": "/user/username/projects/myproject/tsconfig.json", - "reason": "Creating possible configured project for /user/username/projects/myproject/folder/commonFile2.ts to open" + "triggerFile": "/user/username/projects/myproject/folder/commonFile2.ts", + "configFile": "/user/username/projects/myproject/folder/tsconfig.json", + "diagnostics": [] } } -Info seq [hh:mm:ss:mss] Config: /user/username/projects/myproject/tsconfig.json : { - "rootNames": [ - "/user/username/projects/myproject/folder/commonFile2.ts" - ], - "options": { - "configFilePath": "/user/username/projects/myproject/tsconfig.json" - } -} -Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /user/username/projects/myproject/tsconfig.json -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Project: /user/username/projects/myproject/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Project: /user/username/projects/myproject/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/node_modules/@types 1 undefined Project: /user/username/projects/myproject/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/node_modules/@types 1 undefined Project: /user/username/projects/myproject/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /user/username/projects/myproject/tsconfig.json projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms -Info seq [hh:mm:ss:mss] Project '/user/username/projects/myproject/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/folder/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/tsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject7* +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/folder/node_modules/@types 1 undefined Project: /dev/null/inferredProject7* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/folder/node_modules/@types 1 undefined Project: /dev/null/inferredProject7* WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Project: /dev/null/inferredProject7* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Project: /dev/null/inferredProject7* WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/node_modules/@types 1 undefined Project: /dev/null/inferredProject7* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/node_modules/@types 1 undefined Project: /dev/null/inferredProject7* WatchType: Type roots +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject7* projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject7*' (Inferred) Info seq [hh:mm:ss:mss] Files (2) /a/lib/lib.d.ts Text-1 "/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }" /user/username/projects/myproject/folder/commonFile2.ts SVC-6-0 "let y = 1" - ../../../../a/lib/lib.d.ts + ../../../../../a/lib/lib.d.ts Default library for target 'es5' - folder/commonFile2.ts - Part of 'files' list in tsconfig.json + commonFile2.ts + Root file specified for compilation Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "projectLoadingFinish", - "body": { - "projectName": "/user/username/projects/myproject/tsconfig.json" - } - } -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "configFileDiag", - "body": { - "triggerFile": "/user/username/projects/myproject/folder/commonFile2.ts", - "configFile": "/user/username/projects/myproject/tsconfig.json", - "diagnostics": [] - } - } Info seq [hh:mm:ss:mss] Project '/user/username/projects/myproject/folder/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/user/username/projects/myproject/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject7*' (Inferred) Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- @@ -4720,7 +4699,7 @@ Info seq [hh:mm:ss:mss] Open files: Info seq [hh:mm:ss:mss] FileName: /user/username/projects/myproject/folder/commonFile1.ts ProjectRootPath: undefined Info seq [hh:mm:ss:mss] Projects: /user/username/projects/myproject/folder/tsconfig.json Info seq [hh:mm:ss:mss] FileName: /user/username/projects/myproject/folder/commonFile2.ts ProjectRootPath: undefined -Info seq [hh:mm:ss:mss] Projects: /user/username/projects/myproject/tsconfig.json +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject7* Info seq [hh:mm:ss:mss] response: { "seq": 0, @@ -4735,8 +4714,12 @@ Info seq [hh:mm:ss:mss] response: After request PolledWatches:: +/user/username/projects/myproject/folder/jsconfig.json: *new* + {"pollingInterval":2000} /user/username/projects/myproject/folder/node_modules/@types: {"pollingInterval":500} +/user/username/projects/myproject/jsconfig.json: *new* + {"pollingInterval":2000} /user/username/projects/myproject/node_modules/@types: {"pollingInterval":500} /user/username/projects/node_modules/@types: @@ -4751,10 +4734,10 @@ FsWatches:: {} Projects:: -/user/username/projects/myproject/folder/tsconfig.json (Configured) +/dev/null/inferredProject7* (Inferred) *new* projectStateVersion: 1 projectProgramVersion: 1 -/user/username/projects/myproject/tsconfig.json (Configured) *new* +/user/username/projects/myproject/folder/tsconfig.json (Configured) projectStateVersion: 1 projectProgramVersion: 1 @@ -4763,7 +4746,7 @@ ScriptInfos:: version: Text-1 containingProjects: 2 *changed* /user/username/projects/myproject/folder/tsconfig.json - /user/username/projects/myproject/tsconfig.json *new* + /dev/null/inferredProject7* *new* /user/username/projects/myproject/folder/commonFile1.ts (Open) version: SVC-6-0 containingProjects: 1 @@ -4771,7 +4754,7 @@ ScriptInfos:: /user/username/projects/myproject/folder/commonFile2.ts (Open) *new* version: SVC-6-0 containingProjects: 1 - /user/username/projects/myproject/tsconfig.json *default* + /dev/null/inferredProject7* *default* Before request @@ -4784,12 +4767,15 @@ Info seq [hh:mm:ss:mss] request: "seq": 41, "type": "request" } +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /user/username/projects/myproject/folder/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /user/username/projects/myproject/tsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /user/username/projects/myproject/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/folder/commonFile2.ts 500 undefined WatchType: Closed Script info Info seq [hh:mm:ss:mss] Project '/user/username/projects/myproject/folder/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/user/username/projects/myproject/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject7*' (Inferred) Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- @@ -4814,6 +4800,12 @@ PolledWatches:: /user/username/projects/node_modules/@types: {"pollingInterval":500} +PolledWatches *deleted*:: +/user/username/projects/myproject/folder/jsconfig.json: + {"pollingInterval":2000} +/user/username/projects/myproject/jsconfig.json: + {"pollingInterval":2000} + FsWatches:: /a/lib/lib.d.ts: {} @@ -4821,24 +4813,27 @@ FsWatches:: {} /user/username/projects/myproject/folder/tsconfig.json: {} + +FsWatches *deleted*:: /user/username/projects/myproject/tsconfig.json: {} Projects:: -/user/username/projects/myproject/folder/tsconfig.json (Configured) - projectStateVersion: 1 +/dev/null/inferredProject7* (Inferred) *changed* + projectStateVersion: 2 *changed* projectProgramVersion: 1 -/user/username/projects/myproject/tsconfig.json (Configured) *changed* + dirty: true *changed* + isOrphan: true *changed* +/user/username/projects/myproject/folder/tsconfig.json (Configured) projectStateVersion: 1 projectProgramVersion: 1 - noOpenRef: true *changed* ScriptInfos:: /a/lib/lib.d.ts version: Text-1 containingProjects: 2 /user/username/projects/myproject/folder/tsconfig.json - /user/username/projects/myproject/tsconfig.json + /dev/null/inferredProject7* /user/username/projects/myproject/folder/commonFile1.ts (Open) version: SVC-6-0 containingProjects: 1 @@ -4846,8 +4841,8 @@ ScriptInfos:: /user/username/projects/myproject/folder/commonFile2.ts *changed* open: false *changed* version: SVC-6-0 - containingProjects: 1 - /user/username/projects/myproject/tsconfig.json + containingProjects: 0 *changed* + /dev/null/inferredProject7* *deleted* Before request @@ -4862,9 +4857,9 @@ Info seq [hh:mm:ss:mss] request: "type": "request" } Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /random/random.ts ProjectRootPath: undefined:: Result: undefined -Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject7* -Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject7* projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms -Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject7*' (Inferred) +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject8* +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject8* projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject8*' (Inferred) Info seq [hh:mm:ss:mss] Files (2) /a/lib/lib.d.ts Text-1 "/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }" /random/random.ts SVC-10-0 "export const y = 10;" @@ -4877,29 +4872,30 @@ Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] `remove Project:: -Info seq [hh:mm:ss:mss] Project '/user/username/projects/myproject/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject7*' (Inferred) Info seq [hh:mm:ss:mss] Files (2) /a/lib/lib.d.ts /user/username/projects/myproject/folder/commonFile2.ts - ../../../../a/lib/lib.d.ts + ../../../../../a/lib/lib.d.ts Default library for target 'es5' - folder/commonFile2.ts - Part of 'files' list in tsconfig.json + commonFile2.ts + Root file specified for compilation Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /user/username/projects/myproject/tsconfig.json 2000 undefined Project: /user/username/projects/myproject/tsconfig.json WatchType: Config file -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Project: /user/username/projects/myproject/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Project: /user/username/projects/myproject/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/node_modules/@types 1 undefined Project: /user/username/projects/myproject/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/node_modules/@types 1 undefined Project: /user/username/projects/myproject/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/myproject/folder/node_modules/@types 1 undefined Project: /dev/null/inferredProject7* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/myproject/folder/node_modules/@types 1 undefined Project: /dev/null/inferredProject7* WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Project: /dev/null/inferredProject7* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Project: /dev/null/inferredProject7* WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/node_modules/@types 1 undefined Project: /dev/null/inferredProject7* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/node_modules/@types 1 undefined Project: /dev/null/inferredProject7* WatchType: Type roots Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /user/username/projects/myproject/folder/commonFile2.ts 500 undefined WatchType: Closed Script info Info seq [hh:mm:ss:mss] Project '/user/username/projects/myproject/folder/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject7*' (Inferred) +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject8*' (Inferred) Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- @@ -4907,7 +4903,7 @@ Info seq [hh:mm:ss:mss] Open files: Info seq [hh:mm:ss:mss] FileName: /user/username/projects/myproject/folder/commonFile1.ts ProjectRootPath: undefined Info seq [hh:mm:ss:mss] Projects: /user/username/projects/myproject/folder/tsconfig.json Info seq [hh:mm:ss:mss] FileName: /random/random.ts ProjectRootPath: undefined -Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject7* +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject8* Info seq [hh:mm:ss:mss] response: { "seq": 0, @@ -4938,38 +4934,36 @@ FsWatches:: FsWatches *deleted*:: /user/username/projects/myproject/folder/commonFile2.ts: {} -/user/username/projects/myproject/tsconfig.json: - {} Projects:: -/dev/null/inferredProject7* (Inferred) *new* - projectStateVersion: 1 +/dev/null/inferredProject7* (Inferred) *deleted* + projectStateVersion: 2 projectProgramVersion: 1 -/user/username/projects/myproject/folder/tsconfig.json (Configured) + dirty: true + isClosed: true *changed* + isOrphan: true +/dev/null/inferredProject8* (Inferred) *new* projectStateVersion: 1 projectProgramVersion: 1 -/user/username/projects/myproject/tsconfig.json (Configured) *deleted* +/user/username/projects/myproject/folder/tsconfig.json (Configured) projectStateVersion: 1 projectProgramVersion: 1 - isClosed: true *changed* - noOpenRef: true ScriptInfos:: /a/lib/lib.d.ts *changed* version: Text-1 containingProjects: 2 *changed* /user/username/projects/myproject/folder/tsconfig.json - /dev/null/inferredProject7* *new* - /user/username/projects/myproject/tsconfig.json *deleted* + /dev/null/inferredProject8* *new* + /dev/null/inferredProject7* *deleted* /random/random.ts (Open) *new* version: SVC-10-0 containingProjects: 1 - /dev/null/inferredProject7* *default* + /dev/null/inferredProject8* *default* /user/username/projects/myproject/folder/commonFile1.ts (Open) version: SVC-6-0 containingProjects: 1 /user/username/projects/myproject/folder/tsconfig.json *default* /user/username/projects/myproject/folder/commonFile2.ts *deleted* version: SVC-6-0 - containingProjects: 0 *changed* - /user/username/projects/myproject/tsconfig.json *deleted* + containingProjects: 0 diff --git a/tests/baselines/reference/tsserver/configuredProjects/add-and-then-remove-a-config-file-with-sibling-jsconfig-file-and-file-from-first-config-is-not-open.js b/tests/baselines/reference/tsserver/configuredProjects/add-and-then-remove-a-config-file-with-sibling-jsconfig-file-and-file-from-first-config-is-not-open.js index f92af5cb7e3da..66256be28d78e 100644 --- a/tests/baselines/reference/tsserver/configuredProjects/add-and-then-remove-a-config-file-with-sibling-jsconfig-file-and-file-from-first-config-is-not-open.js +++ b/tests/baselines/reference/tsserver/configuredProjects/add-and-then-remove-a-config-file-with-sibling-jsconfig-file-and-file-from-first-config-is-not-open.js @@ -151,9 +151,131 @@ Info seq [hh:mm:ss:mss] event: "diagnostics": [] } } -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /user/username/projects/myproject/folder/tsconfig.json ProjectRootPath: undefined:: Result: /user/username/projects/myproject/folder/jsconfig.json +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/folder/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/tsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/folder/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/folder/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (2) + /a/lib/lib.d.ts Text-1 "/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }" + /user/username/projects/myproject/folder/commonFile2.ts SVC-1-0 "let y = 1" + + + ../../../../../a/lib/lib.d.ts + Default library for target 'es5' + commonFile2.ts + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/user/username/projects/myproject/folder/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (2) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (2) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /user/username/projects/myproject/folder/commonFile2.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "open", + "request_seq": 1, + "success": true, + "performanceData": { + "updateGraphDurationMs": * + } + } +After request + +PolledWatches:: +/user/username/projects/myproject/folder/node_modules/@types: *new* + {"pollingInterval":500} +/user/username/projects/myproject/jsconfig.json: *new* + {"pollingInterval":2000} +/user/username/projects/myproject/node_modules/@types: *new* + {"pollingInterval":500} +/user/username/projects/myproject/tsconfig.json: *new* + {"pollingInterval":2000} +/user/username/projects/node_modules/@types: *new* + {"pollingInterval":500} + +FsWatches:: +/a/lib/lib.d.ts: *new* + {} +/user/username/projects/myproject/folder/commonFile1.ts: *new* + {} +/user/username/projects/myproject/folder/jsconfig.json: *new* + {} +/user/username/projects/myproject/folder/tsconfig.json: *new* + {} + +Projects:: +/dev/null/inferredProject1* (Inferred) *new* + projectStateVersion: 1 + projectProgramVersion: 1 +/user/username/projects/myproject/folder/tsconfig.json (Configured) *new* + projectStateVersion: 1 + projectProgramVersion: 1 + noOpenRef: true + +ScriptInfos:: +/a/lib/lib.d.ts *new* + version: Text-1 + containingProjects: 2 + /user/username/projects/myproject/folder/tsconfig.json + /dev/null/inferredProject1* +/user/username/projects/myproject/folder/commonFile1.ts *new* + version: Text-1 + containingProjects: 1 + /user/username/projects/myproject/folder/tsconfig.json +/user/username/projects/myproject/folder/commonFile2.ts (Open) *new* + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject1* *default* + +1: When config file is deleted +Info seq [hh:mm:ss:mss] FileWatcher:: Triggered with /user/username/projects/myproject/folder/tsconfig.json 2:: WatchInfo: /user/username/projects/myproject/folder/tsconfig.json 2000 undefined Project: /user/username/projects/myproject/folder/tsconfig.json WatchType: Config file +Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /user/username/projects/myproject/folder/commonFile2.ts ProjectRootPath: undefined:: Result: /user/username/projects/myproject/folder/jsconfig.json Info seq [hh:mm:ss:mss] Creating configuration project /user/username/projects/myproject/folder/jsconfig.json -Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/folder/jsconfig.json 2000 undefined Project: /user/username/projects/myproject/folder/jsconfig.json WatchType: Config file +Info seq [hh:mm:ss:mss] Scheduled: /user/username/projects/myproject/folder/jsconfig.json +Info seq [hh:mm:ss:mss] Scheduled: *ensureProjectForOpenFiles* +Info seq [hh:mm:ss:mss] Elapsed:: *ms FileWatcher:: Triggered with /user/username/projects/myproject/folder/tsconfig.json 2:: WatchInfo: /user/username/projects/myproject/folder/tsconfig.json 2000 undefined Project: /user/username/projects/myproject/folder/tsconfig.json WatchType: Config file +Before running Timeout callback:: count: 2 +1: /user/username/projects/myproject/folder/jsconfig.json +2: *ensureProjectForOpenFiles* +//// [/user/username/projects/myproject/folder/tsconfig.json] deleted + +Timeout callback:: count: 2 +1: /user/username/projects/myproject/folder/jsconfig.json *new* +2: *ensureProjectForOpenFiles* *new* + +Projects:: +/dev/null/inferredProject1* (Inferred) + projectStateVersion: 1 + projectProgramVersion: 1 +/user/username/projects/myproject/folder/jsconfig.json (Configured) *new* + projectStateVersion: 1 + projectProgramVersion: 0 + dirty: true +/user/username/projects/myproject/folder/tsconfig.json (Configured) *changed* + projectStateVersion: 1 + projectProgramVersion: 1 + isOrphan: true *changed* + noOpenRef: false *changed* + deferredClose: true *changed* + +Info seq [hh:mm:ss:mss] Running: /user/username/projects/myproject/folder/jsconfig.json Info seq [hh:mm:ss:mss] event: { "seq": 0, @@ -161,7 +283,7 @@ Info seq [hh:mm:ss:mss] event: "event": "projectLoadingStart", "body": { "projectName": "/user/username/projects/myproject/folder/jsconfig.json", - "reason": "Creating possible configured project for /user/username/projects/myproject/folder/commonFile2.ts to open" + "reason": "Change in config file /user/username/projects/myproject/folder/tsconfig.json detected, Creating possible configured project for /user/username/projects/myproject/folder/commonFile2.ts to open" } } Info seq [hh:mm:ss:mss] Config: /user/username/projects/myproject/folder/jsconfig.json : { @@ -177,6 +299,8 @@ Info seq [hh:mm:ss:mss] Config: /user/username/projects/myproject/folder/jsconf "configFilePath": "/user/username/projects/myproject/folder/jsconfig.json" } } +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /user/username/projects/myproject/tsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /user/username/projects/myproject/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /user/username/projects/myproject/folder/jsconfig.json Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/folder/node_modules/@types 1 undefined Project: /user/username/projects/myproject/folder/jsconfig.json WatchType: Type roots Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/folder/node_modules/@types 1 undefined Project: /user/username/projects/myproject/folder/jsconfig.json WatchType: Type roots @@ -259,11 +383,13 @@ Info seq [hh:mm:ss:mss] event: "type": "event", "event": "configFileDiag", "body": { - "triggerFile": "/user/username/projects/myproject/folder/commonFile2.ts", + "triggerFile": "/user/username/projects/myproject/folder/jsconfig.json", "configFile": "/user/username/projects/myproject/folder/jsconfig.json", "diagnostics": [] } } +Info seq [hh:mm:ss:mss] Running: *ensureProjectForOpenFiles* +Info seq [hh:mm:ss:mss] Before ensureProjectForOpenFiles: Info seq [hh:mm:ss:mss] Project '/user/username/projects/myproject/folder/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (2) @@ -272,99 +398,21 @@ Info seq [hh:mm:ss:mss] Project '/user/username/projects/myproject/folder/jscon Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Open files: -Info seq [hh:mm:ss:mss] FileName: /user/username/projects/myproject/folder/commonFile2.ts ProjectRootPath: undefined -Info seq [hh:mm:ss:mss] Projects: /user/username/projects/myproject/folder/jsconfig.json -Info seq [hh:mm:ss:mss] response: - { - "seq": 0, - "type": "response", - "command": "open", - "request_seq": 1, - "success": true, - "performanceData": { - "updateGraphDurationMs": * - } - } -After request - -PolledWatches:: -/user/username/projects/myproject/folder/node_modules/@types: *new* - {"pollingInterval":500} -/user/username/projects/myproject/node_modules/@types: *new* - {"pollingInterval":500} -/user/username/projects/node_modules/@types: *new* - {"pollingInterval":500} - -FsWatches:: -/a/lib/lib.d.ts: *new* - {} -/user/username/projects/myproject/folder/commonFile1.ts: *new* - {} -/user/username/projects/myproject/folder/jsconfig.json: *new* - {} -/user/username/projects/myproject/folder/tsconfig.json: *new* - {} - -Projects:: -/user/username/projects/myproject/folder/jsconfig.json (Configured) *new* - projectStateVersion: 1 - projectProgramVersion: 1 -/user/username/projects/myproject/folder/tsconfig.json (Configured) *new* - projectStateVersion: 1 - projectProgramVersion: 1 - -ScriptInfos:: -/a/lib/lib.d.ts *new* - version: Text-1 - containingProjects: 2 - /user/username/projects/myproject/folder/tsconfig.json - /user/username/projects/myproject/folder/jsconfig.json -/user/username/projects/myproject/folder/commonFile1.ts *new* - version: Text-1 - containingProjects: 1 - /user/username/projects/myproject/folder/tsconfig.json -/user/username/projects/myproject/folder/commonFile2.ts (Open) *new* - version: SVC-1-0 - containingProjects: 1 - /user/username/projects/myproject/folder/jsconfig.json *default* - -1: When config file is deleted -Info seq [hh:mm:ss:mss] FileWatcher:: Triggered with /user/username/projects/myproject/folder/tsconfig.json 2:: WatchInfo: /user/username/projects/myproject/folder/tsconfig.json 2000 undefined Project: /user/username/projects/myproject/folder/tsconfig.json WatchType: Config file -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /user/username/projects/myproject/folder/commonFile2.ts ProjectRootPath: undefined:: Result: /user/username/projects/myproject/folder/jsconfig.json -Info seq [hh:mm:ss:mss] Scheduled: *ensureProjectForOpenFiles* -Info seq [hh:mm:ss:mss] Elapsed:: *ms FileWatcher:: Triggered with /user/username/projects/myproject/folder/tsconfig.json 2:: WatchInfo: /user/username/projects/myproject/folder/tsconfig.json 2000 undefined Project: /user/username/projects/myproject/folder/tsconfig.json WatchType: Config file -Before running Timeout callback:: count: 1 -1: *ensureProjectForOpenFiles* -//// [/user/username/projects/myproject/folder/tsconfig.json] deleted - -Timeout callback:: count: 1 -1: *ensureProjectForOpenFiles* *new* - -Projects:: -/user/username/projects/myproject/folder/jsconfig.json (Configured) - projectStateVersion: 1 - projectProgramVersion: 1 -/user/username/projects/myproject/folder/tsconfig.json (Configured) *changed* - projectStateVersion: 1 - projectProgramVersion: 1 - isOrphan: true *changed* - deferredClose: true *changed* - -Host is moving to new time -Info seq [hh:mm:ss:mss] Running: *ensureProjectForOpenFiles* -Info seq [hh:mm:ss:mss] Before ensureProjectForOpenFiles: -Info seq [hh:mm:ss:mss] Project '/user/username/projects/myproject/folder/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (2) - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/user/username/projects/myproject/folder/jsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: Info seq [hh:mm:ss:mss] FileName: /user/username/projects/myproject/folder/commonFile2.ts ProjectRootPath: undefined Info seq [hh:mm:ss:mss] Projects: /user/username/projects/myproject/folder/jsconfig.json +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* projectStateVersion: 2 projectProgramVersion: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (0) + + + +Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] After ensureProjectForOpenFiles: Info seq [hh:mm:ss:mss] Project '/user/username/projects/myproject/folder/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (2) @@ -373,6 +421,10 @@ Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Project '/user/username/projects/myproject/folder/jsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (2) +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (0) + Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: Info seq [hh:mm:ss:mss] FileName: /user/username/projects/myproject/folder/commonFile2.ts ProjectRootPath: undefined @@ -391,14 +443,70 @@ Info seq [hh:mm:ss:mss] event: } After running Timeout callback:: count: 0 +PolledWatches:: +/user/username/projects/myproject/folder/node_modules/@types: + {"pollingInterval":500} +/user/username/projects/myproject/node_modules/@types: + {"pollingInterval":500} +/user/username/projects/node_modules/@types: + {"pollingInterval":500} + +PolledWatches *deleted*:: +/user/username/projects/myproject/jsconfig.json: + {"pollingInterval":2000} +/user/username/projects/myproject/tsconfig.json: + {"pollingInterval":2000} + +FsWatches:: +/a/lib/lib.d.ts: + {} +/user/username/projects/myproject/folder/commonFile1.ts: + {} +/user/username/projects/myproject/folder/jsconfig.json: + {} +/user/username/projects/myproject/folder/tsconfig.json: + {} + +Projects:: +/dev/null/inferredProject1* (Inferred) *changed* + projectStateVersion: 2 *changed* + projectProgramVersion: 2 *changed* + isOrphan: true *changed* +/user/username/projects/myproject/folder/jsconfig.json (Configured) *changed* + projectStateVersion: 1 + projectProgramVersion: 1 *changed* + dirty: false *changed* +/user/username/projects/myproject/folder/tsconfig.json (Configured) + projectStateVersion: 1 + projectProgramVersion: 1 + isOrphan: true + deferredClose: true + +ScriptInfos:: +/a/lib/lib.d.ts *changed* + version: Text-1 + containingProjects: 2 *changed* + /user/username/projects/myproject/folder/tsconfig.json + /user/username/projects/myproject/folder/jsconfig.json *new* + /dev/null/inferredProject1* *deleted* +/user/username/projects/myproject/folder/commonFile1.ts + version: Text-1 + containingProjects: 1 + /user/username/projects/myproject/folder/tsconfig.json +/user/username/projects/myproject/folder/commonFile2.ts (Open) *changed* + version: SVC-1-0 + containingProjects: 1 *changed* + /user/username/projects/myproject/folder/jsconfig.json *default* *new* + /dev/null/inferredProject1* *deleted* + Info seq [hh:mm:ss:mss] FileWatcher:: Triggered with /user/username/projects/myproject/folder/tsconfig.json 0:: WatchInfo: /user/username/projects/myproject/folder/tsconfig.json 2000 undefined Project: /user/username/projects/myproject/folder/tsconfig.json WatchType: Config file Info seq [hh:mm:ss:mss] Scheduled: /user/username/projects/myproject/folder/tsconfig.json Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /user/username/projects/myproject/folder/commonFile2.ts ProjectRootPath: undefined:: Result: /user/username/projects/myproject/folder/tsconfig.json Info seq [hh:mm:ss:mss] Scheduled: *ensureProjectForOpenFiles* Info seq [hh:mm:ss:mss] Elapsed:: *ms FileWatcher:: Triggered with /user/username/projects/myproject/folder/tsconfig.json 0:: WatchInfo: /user/username/projects/myproject/folder/tsconfig.json 2000 undefined Project: /user/username/projects/myproject/folder/tsconfig.json WatchType: Config file Before running Timeout callback:: count: 2 -2: /user/username/projects/myproject/folder/tsconfig.json -3: *ensureProjectForOpenFiles* +3: /user/username/projects/myproject/folder/tsconfig.json +4: *ensureProjectForOpenFiles* //// [/user/username/projects/myproject/folder/tsconfig.json] { "files": [ @@ -408,10 +516,14 @@ Before running Timeout callback:: count: 2 Timeout callback:: count: 2 -2: /user/username/projects/myproject/folder/tsconfig.json *new* -3: *ensureProjectForOpenFiles* *new* +3: /user/username/projects/myproject/folder/tsconfig.json *new* +4: *ensureProjectForOpenFiles* *new* Projects:: +/dev/null/inferredProject1* (Inferred) + projectStateVersion: 2 + projectProgramVersion: 2 + isOrphan: true /user/username/projects/myproject/folder/jsconfig.json (Configured) projectStateVersion: 1 projectProgramVersion: 1 @@ -473,11 +585,14 @@ Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Project '/user/username/projects/myproject/folder/jsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (2) +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (0) + Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: Info seq [hh:mm:ss:mss] FileName: /user/username/projects/myproject/folder/commonFile2.ts ProjectRootPath: undefined Info seq [hh:mm:ss:mss] Projects: /user/username/projects/myproject/folder/jsconfig.json -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /user/username/projects/myproject/folder/tsconfig.json ProjectRootPath: undefined:: Result: /user/username/projects/myproject/folder/jsconfig.json Info seq [hh:mm:ss:mss] After ensureProjectForOpenFiles: Info seq [hh:mm:ss:mss] Project '/user/username/projects/myproject/folder/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (2) @@ -486,6 +601,10 @@ Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Project '/user/username/projects/myproject/folder/jsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (2) +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (0) + Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: Info seq [hh:mm:ss:mss] FileName: /user/username/projects/myproject/folder/commonFile2.ts ProjectRootPath: undefined @@ -505,13 +624,19 @@ Info seq [hh:mm:ss:mss] event: After running Timeout callback:: count: 0 Projects:: -/user/username/projects/myproject/folder/jsconfig.json (Configured) +/dev/null/inferredProject1* (Inferred) + projectStateVersion: 2 + projectProgramVersion: 2 + isOrphan: true +/user/username/projects/myproject/folder/jsconfig.json (Configured) *changed* projectStateVersion: 1 projectProgramVersion: 1 + noOpenRef: true *changed* /user/username/projects/myproject/folder/tsconfig.json (Configured) *changed* projectStateVersion: 2 projectProgramVersion: 1 dirty: false *changed* + noOpenRef: true *changed* Before request @@ -526,9 +651,9 @@ Info seq [hh:mm:ss:mss] request: "type": "request" } Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /random/random.ts ProjectRootPath: undefined:: Result: undefined -Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* -Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms -Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject2* +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject2* projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject2*' (Inferred) Info seq [hh:mm:ss:mss] Files (2) /a/lib/lib.d.ts Text-1 "/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }" /random/random.ts SVC-1-0 "export const y = 10;" @@ -540,23 +665,69 @@ Info seq [hh:mm:ss:mss] Files (2) Root file specified for compilation Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] `remove Project:: Info seq [hh:mm:ss:mss] Project '/user/username/projects/myproject/folder/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (2) + /a/lib/lib.d.ts + /user/username/projects/myproject/folder/commonFile1.ts + + + ../../../../../a/lib/lib.d.ts + Default library for target 'es5' + commonFile1.ts + Part of 'files' list in tsconfig.json Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /user/username/projects/myproject/folder/tsconfig.json 2000 undefined Project: /user/username/projects/myproject/folder/tsconfig.json WatchType: Config file +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/myproject/folder/node_modules/@types 1 undefined Project: /user/username/projects/myproject/folder/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/myproject/folder/node_modules/@types 1 undefined Project: /user/username/projects/myproject/folder/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Project: /user/username/projects/myproject/folder/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Project: /user/username/projects/myproject/folder/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/node_modules/@types 1 undefined Project: /user/username/projects/myproject/folder/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/node_modules/@types 1 undefined Project: /user/username/projects/myproject/folder/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] `remove Project:: Info seq [hh:mm:ss:mss] Project '/user/username/projects/myproject/folder/jsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (2) + /a/lib/lib.d.ts + /user/username/projects/myproject/folder/commonFile2.ts + + + ../../../../../a/lib/lib.d.ts + Default library for target 'es5' + commonFile2.ts + Part of 'files' list in tsconfig.json Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /user/username/projects/myproject/folder/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/myproject/folder/node_modules/@types 1 undefined Project: /user/username/projects/myproject/folder/jsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/myproject/folder/node_modules/@types 1 undefined Project: /user/username/projects/myproject/folder/jsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Project: /user/username/projects/myproject/folder/jsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Project: /user/username/projects/myproject/folder/jsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/node_modules/@types 1 undefined Project: /user/username/projects/myproject/folder/jsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/node_modules/@types 1 undefined Project: /user/username/projects/myproject/folder/jsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] `remove Project:: Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (0) + + + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/myproject/folder/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/myproject/folder/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /user/username/projects/myproject/folder/commonFile1.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject2*' (Inferred) Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: Info seq [hh:mm:ss:mss] FileName: /user/username/projects/myproject/folder/commonFile2.ts ProjectRootPath: undefined -Info seq [hh:mm:ss:mss] Projects: /user/username/projects/myproject/folder/jsconfig.json +Info seq [hh:mm:ss:mss] Projects: Info seq [hh:mm:ss:mss] FileName: /random/random.ts ProjectRootPath: undefined -Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject2* Info seq [hh:mm:ss:mss] response: { "seq": 0, @@ -570,36 +741,65 @@ Info seq [hh:mm:ss:mss] response: } After request +PolledWatches *deleted*:: +/user/username/projects/myproject/folder/node_modules/@types: + {"pollingInterval":500} +/user/username/projects/myproject/node_modules/@types: + {"pollingInterval":500} +/user/username/projects/node_modules/@types: + {"pollingInterval":500} + +FsWatches:: +/a/lib/lib.d.ts: + {} + +FsWatches *deleted*:: +/user/username/projects/myproject/folder/commonFile1.ts: + {} +/user/username/projects/myproject/folder/jsconfig.json: + {} +/user/username/projects/myproject/folder/tsconfig.json: + {} + Projects:: -/dev/null/inferredProject1* (Inferred) *new* +/dev/null/inferredProject1* (Inferred) *deleted* + projectStateVersion: 2 + projectProgramVersion: 2 + isClosed: true *changed* + isOrphan: true +/dev/null/inferredProject2* (Inferred) *new* projectStateVersion: 1 projectProgramVersion: 1 -/user/username/projects/myproject/folder/jsconfig.json (Configured) +/user/username/projects/myproject/folder/jsconfig.json (Configured) *deleted* projectStateVersion: 1 projectProgramVersion: 1 -/user/username/projects/myproject/folder/tsconfig.json (Configured) + isClosed: true *changed* + noOpenRef: true +/user/username/projects/myproject/folder/tsconfig.json (Configured) *deleted* projectStateVersion: 2 projectProgramVersion: 1 + isClosed: true *changed* + noOpenRef: true ScriptInfos:: /a/lib/lib.d.ts *changed* version: Text-1 - containingProjects: 3 *changed* - /user/username/projects/myproject/folder/tsconfig.json - /user/username/projects/myproject/folder/jsconfig.json - /dev/null/inferredProject1* *new* + containingProjects: 1 *changed* + /dev/null/inferredProject2* *new* + /user/username/projects/myproject/folder/tsconfig.json *deleted* + /user/username/projects/myproject/folder/jsconfig.json *deleted* /random/random.ts (Open) *new* version: SVC-1-0 containingProjects: 1 - /dev/null/inferredProject1* *default* -/user/username/projects/myproject/folder/commonFile1.ts + /dev/null/inferredProject2* *default* +/user/username/projects/myproject/folder/commonFile1.ts *deleted* version: Text-1 - containingProjects: 1 - /user/username/projects/myproject/folder/tsconfig.json -/user/username/projects/myproject/folder/commonFile2.ts (Open) + containingProjects: 0 *changed* + /user/username/projects/myproject/folder/tsconfig.json *deleted* +/user/username/projects/myproject/folder/commonFile2.ts (Open) *changed* version: SVC-1-0 - containingProjects: 1 - /user/username/projects/myproject/folder/jsconfig.json *default* + containingProjects: 0 *changed* + /user/username/projects/myproject/folder/jsconfig.json *deleted* Before request @@ -613,21 +813,13 @@ Info seq [hh:mm:ss:mss] request: "type": "request" } Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/folder/commonFile2.ts 500 undefined WatchType: Closed Script info -Info seq [hh:mm:ss:mss] Project '/user/username/projects/myproject/folder/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (2) - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/user/username/projects/myproject/folder/jsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (2) - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject2*' (Inferred) Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: Info seq [hh:mm:ss:mss] FileName: /random/random.ts ProjectRootPath: undefined -Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject2* Info seq [hh:mm:ss:mss] response: { "seq": 0, @@ -638,59 +830,25 @@ Info seq [hh:mm:ss:mss] response: } After request -PolledWatches:: -/user/username/projects/myproject/folder/node_modules/@types: - {"pollingInterval":500} -/user/username/projects/myproject/node_modules/@types: - {"pollingInterval":500} -/user/username/projects/node_modules/@types: - {"pollingInterval":500} - FsWatches:: /a/lib/lib.d.ts: {} -/user/username/projects/myproject/folder/commonFile1.ts: - {} /user/username/projects/myproject/folder/commonFile2.ts: *new* {} -/user/username/projects/myproject/folder/jsconfig.json: - {} -/user/username/projects/myproject/folder/tsconfig.json: - {} - -Projects:: -/dev/null/inferredProject1* (Inferred) - projectStateVersion: 1 - projectProgramVersion: 1 -/user/username/projects/myproject/folder/jsconfig.json (Configured) *changed* - projectStateVersion: 1 - projectProgramVersion: 1 - noOpenRef: true *changed* -/user/username/projects/myproject/folder/tsconfig.json (Configured) *changed* - projectStateVersion: 2 - projectProgramVersion: 1 - noOpenRef: true *changed* ScriptInfos:: /a/lib/lib.d.ts version: Text-1 - containingProjects: 3 - /user/username/projects/myproject/folder/tsconfig.json - /user/username/projects/myproject/folder/jsconfig.json - /dev/null/inferredProject1* + containingProjects: 1 + /dev/null/inferredProject2* /random/random.ts (Open) version: SVC-1-0 containingProjects: 1 - /dev/null/inferredProject1* *default* -/user/username/projects/myproject/folder/commonFile1.ts - version: Text-1 - containingProjects: 1 - /user/username/projects/myproject/folder/tsconfig.json + /dev/null/inferredProject2* *default* /user/username/projects/myproject/folder/commonFile2.ts *changed* open: false *changed* version: SVC-1-0 - containingProjects: 1 - /user/username/projects/myproject/folder/jsconfig.json + containingProjects: 0 Before request @@ -703,15 +861,7 @@ Info seq [hh:mm:ss:mss] request: "seq": 4, "type": "request" } -Info seq [hh:mm:ss:mss] Project '/user/username/projects/myproject/folder/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (2) - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/user/username/projects/myproject/folder/jsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (2) - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject2*' (Inferred) Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- @@ -727,40 +877,25 @@ Info seq [hh:mm:ss:mss] response: After request Projects:: -/dev/null/inferredProject1* (Inferred) *changed* +/dev/null/inferredProject2* (Inferred) *changed* projectStateVersion: 2 *changed* projectProgramVersion: 1 dirty: true *changed* isOrphan: true *changed* -/user/username/projects/myproject/folder/jsconfig.json (Configured) - projectStateVersion: 1 - projectProgramVersion: 1 - noOpenRef: true -/user/username/projects/myproject/folder/tsconfig.json (Configured) - projectStateVersion: 2 - projectProgramVersion: 1 - noOpenRef: true ScriptInfos:: /a/lib/lib.d.ts version: Text-1 - containingProjects: 3 - /user/username/projects/myproject/folder/tsconfig.json - /user/username/projects/myproject/folder/jsconfig.json - /dev/null/inferredProject1* + containingProjects: 1 + /dev/null/inferredProject2* /random/random.ts *deleted* open: false *changed* version: SVC-1-0 containingProjects: 0 *changed* - /dev/null/inferredProject1* *deleted* -/user/username/projects/myproject/folder/commonFile1.ts - version: Text-1 - containingProjects: 1 - /user/username/projects/myproject/folder/tsconfig.json + /dev/null/inferredProject2* *deleted* /user/username/projects/myproject/folder/commonFile2.ts version: SVC-1-0 - containingProjects: 1 - /user/username/projects/myproject/folder/jsconfig.json + containingProjects: 0 Before request @@ -775,9 +910,9 @@ Info seq [hh:mm:ss:mss] request: "type": "request" } Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /random/random.ts ProjectRootPath: undefined:: Result: undefined -Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* -Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* projectStateVersion: 2 projectProgramVersion: 1 structureChanged: false structureIsReused:: Completely Elapsed:: *ms -Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject2* +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject2* projectStateVersion: 2 projectProgramVersion: 1 structureChanged: false structureIsReused:: Completely Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject2*' (Inferred) Info seq [hh:mm:ss:mss] Files (2) /a/lib/lib.d.ts Text-1 "/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }" /random/random.ts SVC-2-0 "export const y = 10;" @@ -789,55 +924,14 @@ Info seq [hh:mm:ss:mss] Files (2) Root file specified for compilation Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] `remove Project:: -Info seq [hh:mm:ss:mss] Project '/user/username/projects/myproject/folder/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (2) - /a/lib/lib.d.ts - /user/username/projects/myproject/folder/commonFile1.ts - - - ../../../../../a/lib/lib.d.ts - Default library for target 'es5' - commonFile1.ts - Part of 'files' list in tsconfig.json - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /user/username/projects/myproject/folder/tsconfig.json 2000 undefined Project: /user/username/projects/myproject/folder/tsconfig.json WatchType: Config file -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/myproject/folder/node_modules/@types 1 undefined Project: /user/username/projects/myproject/folder/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/myproject/folder/node_modules/@types 1 undefined Project: /user/username/projects/myproject/folder/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Project: /user/username/projects/myproject/folder/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Project: /user/username/projects/myproject/folder/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/node_modules/@types 1 undefined Project: /user/username/projects/myproject/folder/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/node_modules/@types 1 undefined Project: /user/username/projects/myproject/folder/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] `remove Project:: -Info seq [hh:mm:ss:mss] Project '/user/username/projects/myproject/folder/jsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (2) - /a/lib/lib.d.ts - /user/username/projects/myproject/folder/commonFile2.ts - - - ../../../../../a/lib/lib.d.ts - Default library for target 'es5' - commonFile2.ts - Part of 'files' list in tsconfig.json - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /user/username/projects/myproject/folder/jsconfig.json 2000 undefined Project: /user/username/projects/myproject/folder/jsconfig.json WatchType: Config file -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/myproject/folder/node_modules/@types 1 undefined Project: /user/username/projects/myproject/folder/jsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/myproject/folder/node_modules/@types 1 undefined Project: /user/username/projects/myproject/folder/jsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Project: /user/username/projects/myproject/folder/jsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Project: /user/username/projects/myproject/folder/jsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/node_modules/@types 1 undefined Project: /user/username/projects/myproject/folder/jsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/node_modules/@types 1 undefined Project: /user/username/projects/myproject/folder/jsconfig.json WatchType: Type roots Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /user/username/projects/myproject/folder/commonFile2.ts 500 undefined WatchType: Closed Script info -Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /user/username/projects/myproject/folder/commonFile1.ts 500 undefined WatchType: Closed Script info -Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject2*' (Inferred) Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: Info seq [hh:mm:ss:mss] FileName: /random/random.ts ProjectRootPath: undefined -Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject2* Info seq [hh:mm:ss:mss] response: { "seq": 0, @@ -851,64 +945,33 @@ Info seq [hh:mm:ss:mss] response: } After request -PolledWatches *deleted*:: -/user/username/projects/myproject/folder/node_modules/@types: - {"pollingInterval":500} -/user/username/projects/myproject/node_modules/@types: - {"pollingInterval":500} -/user/username/projects/node_modules/@types: - {"pollingInterval":500} - FsWatches:: /a/lib/lib.d.ts: {} FsWatches *deleted*:: -/user/username/projects/myproject/folder/commonFile1.ts: - {} /user/username/projects/myproject/folder/commonFile2.ts: {} -/user/username/projects/myproject/folder/jsconfig.json: - {} -/user/username/projects/myproject/folder/tsconfig.json: - {} Projects:: -/dev/null/inferredProject1* (Inferred) *changed* +/dev/null/inferredProject2* (Inferred) *changed* projectStateVersion: 2 projectProgramVersion: 1 dirty: false *changed* isOrphan: false *changed* -/user/username/projects/myproject/folder/jsconfig.json (Configured) *deleted* - projectStateVersion: 1 - projectProgramVersion: 1 - isClosed: true *changed* - noOpenRef: true -/user/username/projects/myproject/folder/tsconfig.json (Configured) *deleted* - projectStateVersion: 2 - projectProgramVersion: 1 - isClosed: true *changed* - noOpenRef: true ScriptInfos:: -/a/lib/lib.d.ts *changed* +/a/lib/lib.d.ts version: Text-1 - containingProjects: 1 *changed* - /dev/null/inferredProject1* - /user/username/projects/myproject/folder/tsconfig.json *deleted* - /user/username/projects/myproject/folder/jsconfig.json *deleted* + containingProjects: 1 + /dev/null/inferredProject2* /random/random.ts (Open) *new* version: SVC-2-0 containingProjects: 1 - /dev/null/inferredProject1* *default* -/user/username/projects/myproject/folder/commonFile1.ts *deleted* - version: Text-1 - containingProjects: 0 *changed* - /user/username/projects/myproject/folder/tsconfig.json *deleted* + /dev/null/inferredProject2* *default* /user/username/projects/myproject/folder/commonFile2.ts *deleted* version: SVC-1-0 - containingProjects: 0 *changed* - /user/username/projects/myproject/folder/jsconfig.json *deleted* + containingProjects: 0 Before request @@ -921,7 +984,7 @@ Info seq [hh:mm:ss:mss] request: "seq": 6, "type": "request" } -Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject2*' (Inferred) Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- @@ -937,7 +1000,7 @@ Info seq [hh:mm:ss:mss] response: After request Projects:: -/dev/null/inferredProject1* (Inferred) *changed* +/dev/null/inferredProject2* (Inferred) *changed* projectStateVersion: 3 *changed* projectProgramVersion: 1 dirty: true *changed* @@ -947,12 +1010,12 @@ ScriptInfos:: /a/lib/lib.d.ts version: Text-1 containingProjects: 1 - /dev/null/inferredProject1* + /dev/null/inferredProject2* /random/random.ts *deleted* open: false *changed* version: SVC-2-0 containingProjects: 0 *changed* - /dev/null/inferredProject1* *deleted* + /dev/null/inferredProject2* *deleted* Before request @@ -1027,41 +1090,18 @@ Info seq [hh:mm:ss:mss] event: "diagnostics": [] } } -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /user/username/projects/myproject/folder/tsconfig.json ProjectRootPath: undefined:: Result: /user/username/projects/myproject/folder/jsconfig.json -Info seq [hh:mm:ss:mss] Creating configuration project /user/username/projects/myproject/folder/jsconfig.json -Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/folder/jsconfig.json 2000 undefined Project: /user/username/projects/myproject/folder/jsconfig.json WatchType: Config file -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "projectLoadingStart", - "body": { - "projectName": "/user/username/projects/myproject/folder/jsconfig.json", - "reason": "Creating possible configured project for /user/username/projects/myproject/folder/commonFile2.ts to open" - } - } -Info seq [hh:mm:ss:mss] Config: /user/username/projects/myproject/folder/jsconfig.json : { - "rootNames": [ - "/user/username/projects/myproject/folder/commonFile2.ts" - ], - "options": { - "allowJs": true, - "maxNodeModuleJsDepth": 2, - "allowSyntheticDefaultImports": true, - "skipLibCheck": true, - "noEmit": true, - "configFilePath": "/user/username/projects/myproject/folder/jsconfig.json" - } -} -Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /user/username/projects/myproject/folder/jsconfig.json -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/folder/node_modules/@types 1 undefined Project: /user/username/projects/myproject/folder/jsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/folder/node_modules/@types 1 undefined Project: /user/username/projects/myproject/folder/jsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Project: /user/username/projects/myproject/folder/jsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Project: /user/username/projects/myproject/folder/jsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/node_modules/@types 1 undefined Project: /user/username/projects/myproject/folder/jsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/node_modules/@types 1 undefined Project: /user/username/projects/myproject/folder/jsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /user/username/projects/myproject/folder/jsconfig.json projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms -Info seq [hh:mm:ss:mss] Project '/user/username/projects/myproject/folder/jsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/folder/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/tsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject3* +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/folder/node_modules/@types 1 undefined Project: /dev/null/inferredProject3* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/folder/node_modules/@types 1 undefined Project: /dev/null/inferredProject3* WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Project: /dev/null/inferredProject3* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Project: /dev/null/inferredProject3* WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/node_modules/@types 1 undefined Project: /dev/null/inferredProject3* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/node_modules/@types 1 undefined Project: /dev/null/inferredProject3* WatchType: Type roots +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject3* projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject3*' (Inferred) Info seq [hh:mm:ss:mss] Files (2) /a/lib/lib.d.ts Text-1 "/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }" /user/username/projects/myproject/folder/commonFile2.ts SVC-2-0 "let y = 1" @@ -1070,31 +1110,11 @@ Info seq [hh:mm:ss:mss] Files (2) ../../../../../a/lib/lib.d.ts Default library for target 'es5' commonFile2.ts - Part of 'files' list in tsconfig.json + Root file specified for compilation Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "projectLoadingFinish", - "body": { - "projectName": "/user/username/projects/myproject/folder/jsconfig.json" - } - } -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "configFileDiag", - "body": { - "triggerFile": "/user/username/projects/myproject/folder/commonFile2.ts", - "configFile": "/user/username/projects/myproject/folder/jsconfig.json", - "diagnostics": [] - } - } Info seq [hh:mm:ss:mss] `remove Project:: -Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject2*' (Inferred) Info seq [hh:mm:ss:mss] Files (2) /a/lib/lib.d.ts /random/random.ts @@ -1110,13 +1130,13 @@ Info seq [hh:mm:ss:mss] Project '/user/username/projects/myproject/folder/tscon Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/user/username/projects/myproject/folder/jsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject3*' (Inferred) Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: Info seq [hh:mm:ss:mss] FileName: /user/username/projects/myproject/folder/commonFile2.ts ProjectRootPath: undefined -Info seq [hh:mm:ss:mss] Projects: /user/username/projects/myproject/folder/jsconfig.json +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject3* Info seq [hh:mm:ss:mss] response: { "seq": 0, @@ -1133,8 +1153,12 @@ After request PolledWatches:: /user/username/projects/myproject/folder/node_modules/@types: *new* {"pollingInterval":500} +/user/username/projects/myproject/jsconfig.json: *new* + {"pollingInterval":2000} /user/username/projects/myproject/node_modules/@types: *new* {"pollingInterval":500} +/user/username/projects/myproject/tsconfig.json: *new* + {"pollingInterval":2000} /user/username/projects/node_modules/@types: *new* {"pollingInterval":500} @@ -1149,26 +1173,27 @@ FsWatches:: {} Projects:: -/dev/null/inferredProject1* (Inferred) *deleted* +/dev/null/inferredProject2* (Inferred) *deleted* projectStateVersion: 3 projectProgramVersion: 1 dirty: true isClosed: true *changed* isOrphan: true -/user/username/projects/myproject/folder/jsconfig.json (Configured) *new* +/dev/null/inferredProject3* (Inferred) *new* projectStateVersion: 1 projectProgramVersion: 1 /user/username/projects/myproject/folder/tsconfig.json (Configured) *new* projectStateVersion: 1 projectProgramVersion: 1 + noOpenRef: true ScriptInfos:: /a/lib/lib.d.ts *changed* version: Text-1 containingProjects: 2 *changed* /user/username/projects/myproject/folder/tsconfig.json *new* - /user/username/projects/myproject/folder/jsconfig.json *new* - /dev/null/inferredProject1* *deleted* + /dev/null/inferredProject3* *new* + /dev/null/inferredProject2* *deleted* /user/username/projects/myproject/folder/commonFile1.ts *new* version: Text-2 containingProjects: 1 @@ -1176,27 +1201,35 @@ ScriptInfos:: /user/username/projects/myproject/folder/commonFile2.ts (Open) *new* version: SVC-2-0 containingProjects: 1 - /user/username/projects/myproject/folder/jsconfig.json *default* + /dev/null/inferredProject3* *default* 2: Check when file is closed when config file is deleted Info seq [hh:mm:ss:mss] FileWatcher:: Triggered with /user/username/projects/myproject/folder/tsconfig.json 2:: WatchInfo: /user/username/projects/myproject/folder/tsconfig.json 2000 undefined Project: /user/username/projects/myproject/folder/tsconfig.json WatchType: Config file Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /user/username/projects/myproject/folder/commonFile2.ts ProjectRootPath: undefined:: Result: /user/username/projects/myproject/folder/jsconfig.json +Info seq [hh:mm:ss:mss] Creating configuration project /user/username/projects/myproject/folder/jsconfig.json +Info seq [hh:mm:ss:mss] Scheduled: /user/username/projects/myproject/folder/jsconfig.json Info seq [hh:mm:ss:mss] Scheduled: *ensureProjectForOpenFiles* Info seq [hh:mm:ss:mss] Elapsed:: *ms FileWatcher:: Triggered with /user/username/projects/myproject/folder/tsconfig.json 2:: WatchInfo: /user/username/projects/myproject/folder/tsconfig.json 2000 undefined Project: /user/username/projects/myproject/folder/tsconfig.json WatchType: Config file Before request //// [/user/username/projects/myproject/folder/tsconfig.json] deleted -Timeout callback:: count: 1 -4: *ensureProjectForOpenFiles* *new* +Timeout callback:: count: 2 +5: /user/username/projects/myproject/folder/jsconfig.json *new* +6: *ensureProjectForOpenFiles* *new* Projects:: -/user/username/projects/myproject/folder/jsconfig.json (Configured) +/dev/null/inferredProject3* (Inferred) projectStateVersion: 1 projectProgramVersion: 1 +/user/username/projects/myproject/folder/jsconfig.json (Configured) *new* + projectStateVersion: 1 + projectProgramVersion: 0 + dirty: true /user/username/projects/myproject/folder/tsconfig.json (Configured) *changed* projectStateVersion: 1 projectProgramVersion: 1 isOrphan: true *changed* + noOpenRef: false *changed* deferredClose: true *changed* Info seq [hh:mm:ss:mss] request: @@ -1208,12 +1241,18 @@ Info seq [hh:mm:ss:mss] request: "seq": 8, "type": "request" } +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /user/username/projects/myproject/tsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /user/username/projects/myproject/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/folder/commonFile2.ts 500 undefined WatchType: Closed Script info Info seq [hh:mm:ss:mss] Project '/user/username/projects/myproject/folder/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Project '/user/username/projects/myproject/folder/jsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (0) InitialLoadPending + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject3*' (Inferred) Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- @@ -1236,6 +1275,12 @@ PolledWatches:: /user/username/projects/node_modules/@types: {"pollingInterval":500} +PolledWatches *deleted*:: +/user/username/projects/myproject/jsconfig.json: + {"pollingInterval":2000} +/user/username/projects/myproject/tsconfig.json: + {"pollingInterval":2000} + FsWatches:: /a/lib/lib.d.ts: {} @@ -1249,9 +1294,15 @@ FsWatches:: {} Projects:: +/dev/null/inferredProject3* (Inferred) *changed* + projectStateVersion: 2 *changed* + projectProgramVersion: 1 + dirty: true *changed* + isOrphan: true *changed* /user/username/projects/myproject/folder/jsconfig.json (Configured) *changed* projectStateVersion: 1 - projectProgramVersion: 1 + projectProgramVersion: 0 + dirty: true noOpenRef: true *changed* /user/username/projects/myproject/folder/tsconfig.json (Configured) *changed* projectStateVersion: 1 @@ -1265,7 +1316,7 @@ ScriptInfos:: version: Text-1 containingProjects: 2 /user/username/projects/myproject/folder/tsconfig.json - /user/username/projects/myproject/folder/jsconfig.json + /dev/null/inferredProject3* /user/username/projects/myproject/folder/commonFile1.ts version: Text-2 containingProjects: 1 @@ -1273,8 +1324,8 @@ ScriptInfos:: /user/username/projects/myproject/folder/commonFile2.ts *changed* open: false *changed* version: SVC-2-0 - containingProjects: 1 - /user/username/projects/myproject/folder/jsconfig.json + containingProjects: 0 *changed* + /dev/null/inferredProject3* *deleted* Before request @@ -1289,9 +1340,9 @@ Info seq [hh:mm:ss:mss] request: "type": "request" } Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /random/random.ts ProjectRootPath: undefined:: Result: undefined -Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject2* -Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject2* projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms -Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject2*' (Inferred) +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject4* +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject4* projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject4*' (Inferred) Info seq [hh:mm:ss:mss] Files (2) /a/lib/lib.d.ts Text-1 "/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }" /random/random.ts SVC-3-0 "export const y = 10;" @@ -1325,6 +1376,12 @@ Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /user/username/pr Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/node_modules/@types 1 undefined Project: /user/username/projects/myproject/folder/tsconfig.json WatchType: Type roots Info seq [hh:mm:ss:mss] `remove Project:: Info seq [hh:mm:ss:mss] Project '/user/username/projects/myproject/folder/jsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (0) InitialLoadPending + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /user/username/projects/myproject/folder/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] `remove Project:: +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject3*' (Inferred) Info seq [hh:mm:ss:mss] Files (2) /a/lib/lib.d.ts /user/username/projects/myproject/folder/commonFile2.ts @@ -1333,25 +1390,24 @@ Info seq [hh:mm:ss:mss] Files (2) ../../../../../a/lib/lib.d.ts Default library for target 'es5' commonFile2.ts - Part of 'files' list in tsconfig.json + Root file specified for compilation Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /user/username/projects/myproject/folder/jsconfig.json 2000 undefined Project: /user/username/projects/myproject/folder/jsconfig.json WatchType: Config file -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/myproject/folder/node_modules/@types 1 undefined Project: /user/username/projects/myproject/folder/jsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/myproject/folder/node_modules/@types 1 undefined Project: /user/username/projects/myproject/folder/jsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Project: /user/username/projects/myproject/folder/jsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Project: /user/username/projects/myproject/folder/jsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/node_modules/@types 1 undefined Project: /user/username/projects/myproject/folder/jsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/node_modules/@types 1 undefined Project: /user/username/projects/myproject/folder/jsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/myproject/folder/node_modules/@types 1 undefined Project: /dev/null/inferredProject3* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/myproject/folder/node_modules/@types 1 undefined Project: /dev/null/inferredProject3* WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Project: /dev/null/inferredProject3* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Project: /dev/null/inferredProject3* WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/node_modules/@types 1 undefined Project: /dev/null/inferredProject3* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/node_modules/@types 1 undefined Project: /dev/null/inferredProject3* WatchType: Type roots Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /user/username/projects/myproject/folder/commonFile2.ts 500 undefined WatchType: Closed Script info Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /user/username/projects/myproject/folder/commonFile1.ts 500 undefined WatchType: Closed Script info -Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject2*' (Inferred) +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject4*' (Inferred) Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: Info seq [hh:mm:ss:mss] FileName: /random/random.ts ProjectRootPath: undefined -Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject2* +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject4* Info seq [hh:mm:ss:mss] response: { "seq": 0, @@ -1388,12 +1444,19 @@ FsWatches *deleted*:: {} Projects:: -/dev/null/inferredProject2* (Inferred) *new* +/dev/null/inferredProject3* (Inferred) *deleted* + projectStateVersion: 2 + projectProgramVersion: 1 + dirty: true + isClosed: true *changed* + isOrphan: true +/dev/null/inferredProject4* (Inferred) *new* projectStateVersion: 1 projectProgramVersion: 1 /user/username/projects/myproject/folder/jsconfig.json (Configured) *deleted* projectStateVersion: 1 - projectProgramVersion: 1 + projectProgramVersion: 0 + dirty: true isClosed: true *changed* noOpenRef: true /user/username/projects/myproject/folder/tsconfig.json (Configured) *deleted* @@ -1408,18 +1471,17 @@ ScriptInfos:: /a/lib/lib.d.ts *changed* version: Text-1 containingProjects: 1 *changed* - /dev/null/inferredProject2* *new* + /dev/null/inferredProject4* *new* /user/username/projects/myproject/folder/tsconfig.json *deleted* - /user/username/projects/myproject/folder/jsconfig.json *deleted* + /dev/null/inferredProject3* *deleted* /random/random.ts (Open) *new* version: SVC-3-0 containingProjects: 1 - /dev/null/inferredProject2* *default* + /dev/null/inferredProject4* *default* /user/username/projects/myproject/folder/commonFile1.ts *deleted* version: Text-2 containingProjects: 0 *changed* /user/username/projects/myproject/folder/tsconfig.json *deleted* /user/username/projects/myproject/folder/commonFile2.ts *deleted* version: SVC-2-0 - containingProjects: 0 *changed* - /user/username/projects/myproject/folder/jsconfig.json *deleted* + containingProjects: 0 diff --git a/tests/baselines/reference/tsserver/configuredProjects/add-and-then-remove-a-config-file-with-sibling-jsconfig-file.js b/tests/baselines/reference/tsserver/configuredProjects/add-and-then-remove-a-config-file-with-sibling-jsconfig-file.js index ea7a44f2cfe89..3a1622d2eda4d 100644 --- a/tests/baselines/reference/tsserver/configuredProjects/add-and-then-remove-a-config-file-with-sibling-jsconfig-file.js +++ b/tests/baselines/reference/tsserver/configuredProjects/add-and-then-remove-a-config-file-with-sibling-jsconfig-file.js @@ -506,7 +506,6 @@ Info seq [hh:mm:ss:mss] FileName: /user/username/projects/myproject/folder/com Info seq [hh:mm:ss:mss] Projects: /user/username/projects/myproject/folder/tsconfig.json Info seq [hh:mm:ss:mss] FileName: /user/username/projects/myproject/folder/commonFile2.ts ProjectRootPath: undefined Info seq [hh:mm:ss:mss] Projects: /user/username/projects/myproject/folder/jsconfig.json -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /user/username/projects/myproject/folder/tsconfig.json ProjectRootPath: undefined:: Result: /user/username/projects/myproject/folder/jsconfig.json Info seq [hh:mm:ss:mss] After ensureProjectForOpenFiles: Info seq [hh:mm:ss:mss] Project '/user/username/projects/myproject/folder/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (2) @@ -537,9 +536,10 @@ Info seq [hh:mm:ss:mss] event: After running Timeout callback:: count: 0 Projects:: -/user/username/projects/myproject/folder/jsconfig.json (Configured) +/user/username/projects/myproject/folder/jsconfig.json (Configured) *changed* projectStateVersion: 1 projectProgramVersion: 1 + noOpenRef: true *changed* /user/username/projects/myproject/folder/tsconfig.json (Configured) *changed* projectStateVersion: 2 projectProgramVersion: 1 @@ -572,11 +572,27 @@ Info seq [hh:mm:ss:mss] Files (2) Root file specified for compilation Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/user/username/projects/myproject/folder/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] `remove Project:: +Info seq [hh:mm:ss:mss] Project '/user/username/projects/myproject/folder/jsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (2) + /a/lib/lib.d.ts + /user/username/projects/myproject/folder/commonFile2.ts + + + ../../../../../a/lib/lib.d.ts + Default library for target 'es5' + commonFile2.ts + Part of 'files' list in tsconfig.json Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/user/username/projects/myproject/folder/jsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /user/username/projects/myproject/folder/jsconfig.json 2000 undefined Project: /user/username/projects/myproject/folder/jsconfig.json WatchType: Config file +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/myproject/folder/node_modules/@types 1 undefined Project: /user/username/projects/myproject/folder/jsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/myproject/folder/node_modules/@types 1 undefined Project: /user/username/projects/myproject/folder/jsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Project: /user/username/projects/myproject/folder/jsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Project: /user/username/projects/myproject/folder/jsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/node_modules/@types 1 undefined Project: /user/username/projects/myproject/folder/jsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/node_modules/@types 1 undefined Project: /user/username/projects/myproject/folder/jsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] Project '/user/username/projects/myproject/folder/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- @@ -588,7 +604,7 @@ Info seq [hh:mm:ss:mss] Open files: Info seq [hh:mm:ss:mss] FileName: /user/username/projects/myproject/folder/commonFile1.ts ProjectRootPath: undefined Info seq [hh:mm:ss:mss] Projects: /user/username/projects/myproject/folder/tsconfig.json Info seq [hh:mm:ss:mss] FileName: /user/username/projects/myproject/folder/commonFile2.ts ProjectRootPath: undefined -Info seq [hh:mm:ss:mss] Projects: /user/username/projects/myproject/folder/jsconfig.json +Info seq [hh:mm:ss:mss] Projects: Info seq [hh:mm:ss:mss] FileName: /random/random.ts ProjectRootPath: undefined Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* Info seq [hh:mm:ss:mss] response: @@ -604,13 +620,33 @@ Info seq [hh:mm:ss:mss] response: } After request +PolledWatches:: +/user/username/projects/myproject/folder/node_modules/@types: + {"pollingInterval":500} +/user/username/projects/myproject/node_modules/@types: + {"pollingInterval":500} +/user/username/projects/node_modules/@types: + {"pollingInterval":500} + +FsWatches:: +/a/lib/lib.d.ts: + {} +/user/username/projects/myproject/folder/tsconfig.json: + {} + +FsWatches *deleted*:: +/user/username/projects/myproject/folder/jsconfig.json: + {} + Projects:: /dev/null/inferredProject1* (Inferred) *new* projectStateVersion: 1 projectProgramVersion: 1 -/user/username/projects/myproject/folder/jsconfig.json (Configured) +/user/username/projects/myproject/folder/jsconfig.json (Configured) *deleted* projectStateVersion: 1 projectProgramVersion: 1 + isClosed: true *changed* + noOpenRef: true /user/username/projects/myproject/folder/tsconfig.json (Configured) projectStateVersion: 2 projectProgramVersion: 1 @@ -618,10 +654,10 @@ Projects:: ScriptInfos:: /a/lib/lib.d.ts *changed* version: Text-1 - containingProjects: 3 *changed* + containingProjects: 2 *changed* /user/username/projects/myproject/folder/tsconfig.json - /user/username/projects/myproject/folder/jsconfig.json /dev/null/inferredProject1* *new* + /user/username/projects/myproject/folder/jsconfig.json *deleted* /random/random.ts (Open) *new* version: SVC-1-0 containingProjects: 1 @@ -630,10 +666,10 @@ ScriptInfos:: version: SVC-1-0 containingProjects: 1 /user/username/projects/myproject/folder/tsconfig.json *default* -/user/username/projects/myproject/folder/commonFile2.ts (Open) +/user/username/projects/myproject/folder/commonFile2.ts (Open) *changed* version: SVC-1-0 - containingProjects: 1 - /user/username/projects/myproject/folder/jsconfig.json *default* + containingProjects: 0 *changed* + /user/username/projects/myproject/folder/jsconfig.json *deleted* Before request @@ -650,10 +686,6 @@ Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /user/username/project Info seq [hh:mm:ss:mss] Project '/user/username/projects/myproject/folder/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (2) -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/user/username/projects/myproject/folder/jsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (2) - Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) Info seq [hh:mm:ss:mss] Files (2) @@ -661,7 +693,7 @@ Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: Info seq [hh:mm:ss:mss] FileName: /user/username/projects/myproject/folder/commonFile2.ts ProjectRootPath: undefined -Info seq [hh:mm:ss:mss] Projects: /user/username/projects/myproject/folder/jsconfig.json +Info seq [hh:mm:ss:mss] Projects: Info seq [hh:mm:ss:mss] FileName: /random/random.ts ProjectRootPath: undefined Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* Info seq [hh:mm:ss:mss] response: @@ -687,17 +719,23 @@ FsWatches:: {} /user/username/projects/myproject/folder/commonFile1.ts: *new* {} -/user/username/projects/myproject/folder/jsconfig.json: - {} /user/username/projects/myproject/folder/tsconfig.json: {} +Projects:: +/dev/null/inferredProject1* (Inferred) + projectStateVersion: 1 + projectProgramVersion: 1 +/user/username/projects/myproject/folder/tsconfig.json (Configured) *changed* + projectStateVersion: 2 + projectProgramVersion: 1 + noOpenRef: true *changed* + ScriptInfos:: /a/lib/lib.d.ts version: Text-1 - containingProjects: 3 + containingProjects: 2 /user/username/projects/myproject/folder/tsconfig.json - /user/username/projects/myproject/folder/jsconfig.json /dev/null/inferredProject1* /random/random.ts (Open) version: SVC-1-0 @@ -710,8 +748,7 @@ ScriptInfos:: /user/username/projects/myproject/folder/tsconfig.json /user/username/projects/myproject/folder/commonFile2.ts (Open) version: SVC-1-0 - containingProjects: 1 - /user/username/projects/myproject/folder/jsconfig.json *default* + containingProjects: 0 Before request @@ -728,10 +765,6 @@ Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /user/username/project Info seq [hh:mm:ss:mss] Project '/user/username/projects/myproject/folder/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (2) -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/user/username/projects/myproject/folder/jsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (2) - Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) Info seq [hh:mm:ss:mss] Files (2) @@ -765,30 +798,14 @@ FsWatches:: {} /user/username/projects/myproject/folder/commonFile2.ts: *new* {} -/user/username/projects/myproject/folder/jsconfig.json: - {} /user/username/projects/myproject/folder/tsconfig.json: {} -Projects:: -/dev/null/inferredProject1* (Inferred) - projectStateVersion: 1 - projectProgramVersion: 1 -/user/username/projects/myproject/folder/jsconfig.json (Configured) *changed* - projectStateVersion: 1 - projectProgramVersion: 1 - noOpenRef: true *changed* -/user/username/projects/myproject/folder/tsconfig.json (Configured) *changed* - projectStateVersion: 2 - projectProgramVersion: 1 - noOpenRef: true *changed* - ScriptInfos:: /a/lib/lib.d.ts version: Text-1 - containingProjects: 3 + containingProjects: 2 /user/username/projects/myproject/folder/tsconfig.json - /user/username/projects/myproject/folder/jsconfig.json /dev/null/inferredProject1* /random/random.ts (Open) version: SVC-1-0 @@ -801,8 +818,7 @@ ScriptInfos:: /user/username/projects/myproject/folder/commonFile2.ts *changed* open: false *changed* version: SVC-1-0 - containingProjects: 1 - /user/username/projects/myproject/folder/jsconfig.json + containingProjects: 0 Before request @@ -818,10 +834,6 @@ Info seq [hh:mm:ss:mss] request: Info seq [hh:mm:ss:mss] Project '/user/username/projects/myproject/folder/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (2) -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/user/username/projects/myproject/folder/jsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (2) - Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) Info seq [hh:mm:ss:mss] Files (2) @@ -844,10 +856,6 @@ Projects:: projectProgramVersion: 1 dirty: true *changed* isOrphan: true *changed* -/user/username/projects/myproject/folder/jsconfig.json (Configured) - projectStateVersion: 1 - projectProgramVersion: 1 - noOpenRef: true /user/username/projects/myproject/folder/tsconfig.json (Configured) projectStateVersion: 2 projectProgramVersion: 1 @@ -856,9 +864,8 @@ Projects:: ScriptInfos:: /a/lib/lib.d.ts version: Text-1 - containingProjects: 3 + containingProjects: 2 /user/username/projects/myproject/folder/tsconfig.json - /user/username/projects/myproject/folder/jsconfig.json /dev/null/inferredProject1* /random/random.ts *deleted* open: false *changed* @@ -871,8 +878,7 @@ ScriptInfos:: /user/username/projects/myproject/folder/tsconfig.json /user/username/projects/myproject/folder/commonFile2.ts version: SVC-1-0 - containingProjects: 1 - /user/username/projects/myproject/folder/jsconfig.json + containingProjects: 0 Before request @@ -921,26 +927,6 @@ Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /user/username/pr Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Project: /user/username/projects/myproject/folder/tsconfig.json WatchType: Type roots Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/node_modules/@types 1 undefined Project: /user/username/projects/myproject/folder/tsconfig.json WatchType: Type roots Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/node_modules/@types 1 undefined Project: /user/username/projects/myproject/folder/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] `remove Project:: -Info seq [hh:mm:ss:mss] Project '/user/username/projects/myproject/folder/jsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (2) - /a/lib/lib.d.ts - /user/username/projects/myproject/folder/commonFile2.ts - - - ../../../../../a/lib/lib.d.ts - Default library for target 'es5' - commonFile2.ts - Part of 'files' list in tsconfig.json - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /user/username/projects/myproject/folder/jsconfig.json 2000 undefined Project: /user/username/projects/myproject/folder/jsconfig.json WatchType: Config file -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/myproject/folder/node_modules/@types 1 undefined Project: /user/username/projects/myproject/folder/jsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/myproject/folder/node_modules/@types 1 undefined Project: /user/username/projects/myproject/folder/jsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Project: /user/username/projects/myproject/folder/jsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Project: /user/username/projects/myproject/folder/jsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/node_modules/@types 1 undefined Project: /user/username/projects/myproject/folder/jsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/node_modules/@types 1 undefined Project: /user/username/projects/myproject/folder/jsconfig.json WatchType: Type roots Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /user/username/projects/myproject/folder/commonFile1.ts 500 undefined WatchType: Closed Script info Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /user/username/projects/myproject/folder/commonFile2.ts 500 undefined WatchType: Closed Script info Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) @@ -980,8 +966,6 @@ FsWatches *deleted*:: {} /user/username/projects/myproject/folder/commonFile2.ts: {} -/user/username/projects/myproject/folder/jsconfig.json: - {} /user/username/projects/myproject/folder/tsconfig.json: {} @@ -991,11 +975,6 @@ Projects:: projectProgramVersion: 1 dirty: false *changed* isOrphan: false *changed* -/user/username/projects/myproject/folder/jsconfig.json (Configured) *deleted* - projectStateVersion: 1 - projectProgramVersion: 1 - isClosed: true *changed* - noOpenRef: true /user/username/projects/myproject/folder/tsconfig.json (Configured) *deleted* projectStateVersion: 2 projectProgramVersion: 1 @@ -1008,7 +987,6 @@ ScriptInfos:: containingProjects: 1 *changed* /dev/null/inferredProject1* /user/username/projects/myproject/folder/tsconfig.json *deleted* - /user/username/projects/myproject/folder/jsconfig.json *deleted* /random/random.ts (Open) *new* version: SVC-2-0 containingProjects: 1 @@ -1019,8 +997,7 @@ ScriptInfos:: /user/username/projects/myproject/folder/tsconfig.json *deleted* /user/username/projects/myproject/folder/commonFile2.ts *deleted* version: SVC-1-0 - containingProjects: 0 *changed* - /user/username/projects/myproject/folder/jsconfig.json *deleted* + containingProjects: 0 Before request @@ -1219,41 +1196,29 @@ Info seq [hh:mm:ss:mss] request: "type": "request" } Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /user/username/projects/myproject/folder/commonFile2.ts ProjectRootPath: undefined:: Result: /user/username/projects/myproject/folder/tsconfig.json -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /user/username/projects/myproject/folder/tsconfig.json ProjectRootPath: undefined:: Result: /user/username/projects/myproject/folder/jsconfig.json -Info seq [hh:mm:ss:mss] Creating configuration project /user/username/projects/myproject/folder/jsconfig.json -Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/folder/jsconfig.json 2000 undefined Project: /user/username/projects/myproject/folder/jsconfig.json WatchType: Config file Info seq [hh:mm:ss:mss] event: { "seq": 0, "type": "event", - "event": "projectLoadingStart", + "event": "configFileDiag", "body": { - "projectName": "/user/username/projects/myproject/folder/jsconfig.json", - "reason": "Creating possible configured project for /user/username/projects/myproject/folder/commonFile2.ts to open" + "triggerFile": "/user/username/projects/myproject/folder/commonFile2.ts", + "configFile": "/user/username/projects/myproject/folder/tsconfig.json", + "diagnostics": [] } } -Info seq [hh:mm:ss:mss] Config: /user/username/projects/myproject/folder/jsconfig.json : { - "rootNames": [ - "/user/username/projects/myproject/folder/commonFile2.ts" - ], - "options": { - "allowJs": true, - "maxNodeModuleJsDepth": 2, - "allowSyntheticDefaultImports": true, - "skipLibCheck": true, - "noEmit": true, - "configFilePath": "/user/username/projects/myproject/folder/jsconfig.json" - } -} -Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /user/username/projects/myproject/folder/jsconfig.json -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/folder/node_modules/@types 1 undefined Project: /user/username/projects/myproject/folder/jsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/folder/node_modules/@types 1 undefined Project: /user/username/projects/myproject/folder/jsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Project: /user/username/projects/myproject/folder/jsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Project: /user/username/projects/myproject/folder/jsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/node_modules/@types 1 undefined Project: /user/username/projects/myproject/folder/jsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/node_modules/@types 1 undefined Project: /user/username/projects/myproject/folder/jsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /user/username/projects/myproject/folder/jsconfig.json projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms -Info seq [hh:mm:ss:mss] Project '/user/username/projects/myproject/folder/jsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/folder/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/tsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject2* +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/folder/node_modules/@types 1 undefined Project: /dev/null/inferredProject2* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/folder/node_modules/@types 1 undefined Project: /dev/null/inferredProject2* WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Project: /dev/null/inferredProject2* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Project: /dev/null/inferredProject2* WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/node_modules/@types 1 undefined Project: /dev/null/inferredProject2* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/node_modules/@types 1 undefined Project: /dev/null/inferredProject2* WatchType: Type roots +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject2* projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject2*' (Inferred) Info seq [hh:mm:ss:mss] Files (2) /a/lib/lib.d.ts Text-1 "/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }" /user/username/projects/myproject/folder/commonFile2.ts SVC-2-0 "let y = 1" @@ -1262,34 +1227,14 @@ Info seq [hh:mm:ss:mss] Files (2) ../../../../../a/lib/lib.d.ts Default library for target 'es5' commonFile2.ts - Part of 'files' list in tsconfig.json + Root file specified for compilation Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "projectLoadingFinish", - "body": { - "projectName": "/user/username/projects/myproject/folder/jsconfig.json" - } - } -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "configFileDiag", - "body": { - "triggerFile": "/user/username/projects/myproject/folder/commonFile2.ts", - "configFile": "/user/username/projects/myproject/folder/jsconfig.json", - "diagnostics": [] - } - } Info seq [hh:mm:ss:mss] Project '/user/username/projects/myproject/folder/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/user/username/projects/myproject/folder/jsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject2*' (Inferred) Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- @@ -1297,7 +1242,7 @@ Info seq [hh:mm:ss:mss] Open files: Info seq [hh:mm:ss:mss] FileName: /user/username/projects/myproject/folder/commonFile1.ts ProjectRootPath: undefined Info seq [hh:mm:ss:mss] Projects: /user/username/projects/myproject/folder/tsconfig.json Info seq [hh:mm:ss:mss] FileName: /user/username/projects/myproject/folder/commonFile2.ts ProjectRootPath: undefined -Info seq [hh:mm:ss:mss] Projects: /user/username/projects/myproject/folder/jsconfig.json +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject2* Info seq [hh:mm:ss:mss] response: { "seq": 0, @@ -1314,8 +1259,12 @@ After request PolledWatches:: /user/username/projects/myproject/folder/node_modules/@types: {"pollingInterval":500} +/user/username/projects/myproject/jsconfig.json: *new* + {"pollingInterval":2000} /user/username/projects/myproject/node_modules/@types: {"pollingInterval":500} +/user/username/projects/myproject/tsconfig.json: *new* + {"pollingInterval":2000} /user/username/projects/node_modules/@types: {"pollingInterval":500} @@ -1328,7 +1277,7 @@ FsWatches:: {} Projects:: -/user/username/projects/myproject/folder/jsconfig.json (Configured) *new* +/dev/null/inferredProject2* (Inferred) *new* projectStateVersion: 1 projectProgramVersion: 1 /user/username/projects/myproject/folder/tsconfig.json (Configured) @@ -1340,7 +1289,7 @@ ScriptInfos:: version: Text-1 containingProjects: 2 *changed* /user/username/projects/myproject/folder/tsconfig.json - /user/username/projects/myproject/folder/jsconfig.json *new* + /dev/null/inferredProject2* *new* /user/username/projects/myproject/folder/commonFile1.ts (Open) version: SVC-2-0 containingProjects: 1 @@ -1348,32 +1297,105 @@ ScriptInfos:: /user/username/projects/myproject/folder/commonFile2.ts (Open) *new* version: SVC-2-0 containingProjects: 1 - /user/username/projects/myproject/folder/jsconfig.json *default* + /dev/null/inferredProject2* *default* 2: When both files are open and config file is deleted Info seq [hh:mm:ss:mss] FileWatcher:: Triggered with /user/username/projects/myproject/folder/tsconfig.json 2:: WatchInfo: /user/username/projects/myproject/folder/tsconfig.json 2000 undefined Project: /user/username/projects/myproject/folder/tsconfig.json WatchType: Config file Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /user/username/projects/myproject/folder/commonFile1.ts ProjectRootPath: undefined:: Result: /user/username/projects/myproject/folder/jsconfig.json +Info seq [hh:mm:ss:mss] Creating configuration project /user/username/projects/myproject/folder/jsconfig.json +Info seq [hh:mm:ss:mss] Scheduled: /user/username/projects/myproject/folder/jsconfig.json Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /user/username/projects/myproject/folder/commonFile2.ts ProjectRootPath: undefined:: Result: /user/username/projects/myproject/folder/jsconfig.json Info seq [hh:mm:ss:mss] Scheduled: *ensureProjectForOpenFiles* Info seq [hh:mm:ss:mss] Elapsed:: *ms FileWatcher:: Triggered with /user/username/projects/myproject/folder/tsconfig.json 2:: WatchInfo: /user/username/projects/myproject/folder/tsconfig.json 2000 undefined Project: /user/username/projects/myproject/folder/tsconfig.json WatchType: Config file -Before running Timeout callback:: count: 1 -5: *ensureProjectForOpenFiles* +Before running Timeout callback:: count: 2 +5: /user/username/projects/myproject/folder/jsconfig.json +6: *ensureProjectForOpenFiles* //// [/user/username/projects/myproject/folder/tsconfig.json] deleted -Timeout callback:: count: 1 -5: *ensureProjectForOpenFiles* *new* +Timeout callback:: count: 2 +5: /user/username/projects/myproject/folder/jsconfig.json *new* +6: *ensureProjectForOpenFiles* *new* Projects:: -/user/username/projects/myproject/folder/jsconfig.json (Configured) +/dev/null/inferredProject2* (Inferred) projectStateVersion: 1 projectProgramVersion: 1 +/user/username/projects/myproject/folder/jsconfig.json (Configured) *new* + projectStateVersion: 1 + projectProgramVersion: 0 + dirty: true /user/username/projects/myproject/folder/tsconfig.json (Configured) *changed* projectStateVersion: 1 projectProgramVersion: 1 isOrphan: true *changed* deferredClose: true *changed* -Host is moving to new time +Info seq [hh:mm:ss:mss] Running: /user/username/projects/myproject/folder/jsconfig.json +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingStart", + "body": { + "projectName": "/user/username/projects/myproject/folder/jsconfig.json", + "reason": "Change in config file /user/username/projects/myproject/folder/tsconfig.json detected, Creating possible configured project for /user/username/projects/myproject/folder/commonFile1.ts to open" + } + } +Info seq [hh:mm:ss:mss] Config: /user/username/projects/myproject/folder/jsconfig.json : { + "rootNames": [ + "/user/username/projects/myproject/folder/commonFile2.ts" + ], + "options": { + "allowJs": true, + "maxNodeModuleJsDepth": 2, + "allowSyntheticDefaultImports": true, + "skipLibCheck": true, + "noEmit": true, + "configFilePath": "/user/username/projects/myproject/folder/jsconfig.json" + } +} +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /user/username/projects/myproject/tsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /user/username/projects/myproject/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /user/username/projects/myproject/folder/jsconfig.json +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/folder/node_modules/@types 1 undefined Project: /user/username/projects/myproject/folder/jsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/folder/node_modules/@types 1 undefined Project: /user/username/projects/myproject/folder/jsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Project: /user/username/projects/myproject/folder/jsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Project: /user/username/projects/myproject/folder/jsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/node_modules/@types 1 undefined Project: /user/username/projects/myproject/folder/jsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/node_modules/@types 1 undefined Project: /user/username/projects/myproject/folder/jsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /user/username/projects/myproject/folder/jsconfig.json projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/user/username/projects/myproject/folder/jsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (2) + /a/lib/lib.d.ts Text-1 "/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }" + /user/username/projects/myproject/folder/commonFile2.ts SVC-2-0 "let y = 1" + + + ../../../../../a/lib/lib.d.ts + Default library for target 'es5' + commonFile2.ts + Part of 'files' list in tsconfig.json + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "projectLoadingFinish", + "body": { + "projectName": "/user/username/projects/myproject/folder/jsconfig.json" + } + } +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "configFileDiag", + "body": { + "triggerFile": "/user/username/projects/myproject/folder/jsconfig.json", + "configFile": "/user/username/projects/myproject/folder/jsconfig.json", + "diagnostics": [] + } + } Info seq [hh:mm:ss:mss] Running: *ensureProjectForOpenFiles* Info seq [hh:mm:ss:mss] Before ensureProjectForOpenFiles: Info seq [hh:mm:ss:mss] Project '/user/username/projects/myproject/folder/tsconfig.json' (Configured) @@ -1383,23 +1405,20 @@ Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Project '/user/username/projects/myproject/folder/jsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (2) +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject2*' (Inferred) +Info seq [hh:mm:ss:mss] Files (2) + Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: Info seq [hh:mm:ss:mss] FileName: /user/username/projects/myproject/folder/commonFile1.ts ProjectRootPath: undefined Info seq [hh:mm:ss:mss] Projects: /user/username/projects/myproject/folder/tsconfig.json Info seq [hh:mm:ss:mss] FileName: /user/username/projects/myproject/folder/commonFile2.ts ProjectRootPath: undefined Info seq [hh:mm:ss:mss] Projects: /user/username/projects/myproject/folder/jsconfig.json -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /user/username/projects/myproject/folder/jsconfig.json ProjectRootPath: undefined:: Result: undefined Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/tsconfig.json 2000 undefined WatchType: Config file for the inferred project root Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject2* -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/folder/node_modules/@types 1 undefined Project: /dev/null/inferredProject2* WatchType: Type roots -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/folder/node_modules/@types 1 undefined Project: /dev/null/inferredProject2* WatchType: Type roots -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Project: /dev/null/inferredProject2* WatchType: Type roots -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Project: /dev/null/inferredProject2* WatchType: Type roots -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/node_modules/@types 1 undefined Project: /dev/null/inferredProject2* WatchType: Type roots -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/node_modules/@types 1 undefined Project: /dev/null/inferredProject2* WatchType: Type roots -Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject2* projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject2* projectStateVersion: 2 projectProgramVersion: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject2*' (Inferred) Info seq [hh:mm:ss:mss] Files (2) /a/lib/lib.d.ts Text-1 "/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }" @@ -1448,15 +1467,21 @@ After running Timeout callback:: count: 0 PolledWatches:: /user/username/projects/myproject/folder/node_modules/@types: {"pollingInterval":500} -/user/username/projects/myproject/jsconfig.json: *new* - {"pollingInterval":2000} +/user/username/projects/myproject/jsconfig.json: + {"pollingInterval":2000} *new* /user/username/projects/myproject/node_modules/@types: {"pollingInterval":500} -/user/username/projects/myproject/tsconfig.json: *new* - {"pollingInterval":2000} +/user/username/projects/myproject/tsconfig.json: + {"pollingInterval":2000} *new* /user/username/projects/node_modules/@types: {"pollingInterval":500} +PolledWatches *deleted*:: +/user/username/projects/myproject/jsconfig.json: + {"pollingInterval":2000} +/user/username/projects/myproject/tsconfig.json: + {"pollingInterval":2000} + FsWatches:: /a/lib/lib.d.ts: {} @@ -1466,12 +1491,13 @@ FsWatches:: {} Projects:: -/dev/null/inferredProject2* (Inferred) *new* - projectStateVersion: 1 - projectProgramVersion: 1 -/user/username/projects/myproject/folder/jsconfig.json (Configured) +/dev/null/inferredProject2* (Inferred) *changed* + projectStateVersion: 2 *changed* + projectProgramVersion: 2 *changed* +/user/username/projects/myproject/folder/jsconfig.json (Configured) *changed* projectStateVersion: 1 - projectProgramVersion: 1 + projectProgramVersion: 1 *changed* + dirty: false *changed* /user/username/projects/myproject/folder/tsconfig.json (Configured) projectStateVersion: 1 projectProgramVersion: 1 @@ -1483,17 +1509,18 @@ ScriptInfos:: version: Text-1 containingProjects: 3 *changed* /user/username/projects/myproject/folder/tsconfig.json - /user/username/projects/myproject/folder/jsconfig.json - /dev/null/inferredProject2* *new* + /dev/null/inferredProject2* + /user/username/projects/myproject/folder/jsconfig.json *new* /user/username/projects/myproject/folder/commonFile1.ts (Open) *changed* version: SVC-2-0 containingProjects: 2 *changed* /dev/null/inferredProject2* *default* *new* /user/username/projects/myproject/folder/tsconfig.json -/user/username/projects/myproject/folder/commonFile2.ts (Open) +/user/username/projects/myproject/folder/commonFile2.ts (Open) *changed* version: SVC-2-0 - containingProjects: 1 - /user/username/projects/myproject/folder/jsconfig.json *default* + containingProjects: 1 *changed* + /user/username/projects/myproject/folder/jsconfig.json *default* *new* + /dev/null/inferredProject2* *deleted* Info seq [hh:mm:ss:mss] FileWatcher:: Triggered with /user/username/projects/myproject/folder/tsconfig.json 0:: WatchInfo: /user/username/projects/myproject/folder/tsconfig.json 2000 undefined Project: /user/username/projects/myproject/folder/tsconfig.json WatchType: Config file Info seq [hh:mm:ss:mss] Scheduled: /user/username/projects/myproject/folder/tsconfig.json @@ -1502,8 +1529,8 @@ Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /user/username/project Info seq [hh:mm:ss:mss] Scheduled: *ensureProjectForOpenFiles* Info seq [hh:mm:ss:mss] Elapsed:: *ms FileWatcher:: Triggered with /user/username/projects/myproject/folder/tsconfig.json 0:: WatchInfo: /user/username/projects/myproject/folder/tsconfig.json 2000 undefined Project: /user/username/projects/myproject/folder/tsconfig.json WatchType: Config file Before running Timeout callback:: count: 2 -6: /user/username/projects/myproject/folder/tsconfig.json -7: *ensureProjectForOpenFiles* +7: /user/username/projects/myproject/folder/tsconfig.json +8: *ensureProjectForOpenFiles* //// [/user/username/projects/myproject/folder/tsconfig.json] { "files": [ @@ -1513,13 +1540,13 @@ Before running Timeout callback:: count: 2 Timeout callback:: count: 2 -6: /user/username/projects/myproject/folder/tsconfig.json *new* -7: *ensureProjectForOpenFiles* *new* +7: /user/username/projects/myproject/folder/tsconfig.json *new* +8: *ensureProjectForOpenFiles* *new* Projects:: /dev/null/inferredProject2* (Inferred) - projectStateVersion: 1 - projectProgramVersion: 1 + projectStateVersion: 2 + projectProgramVersion: 2 /user/username/projects/myproject/folder/jsconfig.json (Configured) projectStateVersion: 1 projectProgramVersion: 1 @@ -1591,11 +1618,10 @@ Info seq [hh:mm:ss:mss] FileName: /user/username/projects/myproject/folder/com Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject2*,/user/username/projects/myproject/folder/tsconfig.json Info seq [hh:mm:ss:mss] FileName: /user/username/projects/myproject/folder/commonFile2.ts ProjectRootPath: undefined Info seq [hh:mm:ss:mss] Projects: /user/username/projects/myproject/folder/jsconfig.json -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /user/username/projects/myproject/folder/tsconfig.json ProjectRootPath: undefined:: Result: /user/username/projects/myproject/folder/jsconfig.json Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /user/username/projects/myproject/tsconfig.json 2000 undefined WatchType: Config file for the inferred project root Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /user/username/projects/myproject/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject2* -Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject2* projectStateVersion: 2 projectProgramVersion: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject2* projectStateVersion: 3 projectProgramVersion: 2 structureChanged: true structureIsReused:: Not Elapsed:: *ms Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject2*' (Inferred) Info seq [hh:mm:ss:mss] Files (0) @@ -1659,12 +1685,13 @@ FsWatches:: Projects:: /dev/null/inferredProject2* (Inferred) *changed* - projectStateVersion: 2 *changed* - projectProgramVersion: 2 *changed* + projectStateVersion: 3 *changed* + projectProgramVersion: 3 *changed* isOrphan: true *changed* -/user/username/projects/myproject/folder/jsconfig.json (Configured) +/user/username/projects/myproject/folder/jsconfig.json (Configured) *changed* projectStateVersion: 1 projectProgramVersion: 1 + noOpenRef: true *changed* /user/username/projects/myproject/folder/tsconfig.json (Configured) *changed* projectStateVersion: 2 projectProgramVersion: 1 @@ -1715,6 +1742,26 @@ Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] `remove Project:: +Info seq [hh:mm:ss:mss] Project '/user/username/projects/myproject/folder/jsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (2) + /a/lib/lib.d.ts + /user/username/projects/myproject/folder/commonFile2.ts + + + ../../../../../a/lib/lib.d.ts + Default library for target 'es5' + commonFile2.ts + Part of 'files' list in tsconfig.json + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /user/username/projects/myproject/folder/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/myproject/folder/node_modules/@types 1 undefined Project: /user/username/projects/myproject/folder/jsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/myproject/folder/node_modules/@types 1 undefined Project: /user/username/projects/myproject/folder/jsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Project: /user/username/projects/myproject/folder/jsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Project: /user/username/projects/myproject/folder/jsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/node_modules/@types 1 undefined Project: /user/username/projects/myproject/folder/jsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/node_modules/@types 1 undefined Project: /user/username/projects/myproject/folder/jsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] `remove Project:: Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject2*' (Inferred) Info seq [hh:mm:ss:mss] Files (0) @@ -1730,10 +1777,6 @@ Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /us Info seq [hh:mm:ss:mss] Project '/user/username/projects/myproject/folder/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (2) -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/user/username/projects/myproject/folder/jsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (2) - Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject3*' (Inferred) Info seq [hh:mm:ss:mss] Files (2) @@ -1743,7 +1786,7 @@ Info seq [hh:mm:ss:mss] Open files: Info seq [hh:mm:ss:mss] FileName: /user/username/projects/myproject/folder/commonFile1.ts ProjectRootPath: undefined Info seq [hh:mm:ss:mss] Projects: /user/username/projects/myproject/folder/tsconfig.json Info seq [hh:mm:ss:mss] FileName: /user/username/projects/myproject/folder/commonFile2.ts ProjectRootPath: undefined -Info seq [hh:mm:ss:mss] Projects: /user/username/projects/myproject/folder/jsconfig.json +Info seq [hh:mm:ss:mss] Projects: Info seq [hh:mm:ss:mss] FileName: /random/random.ts ProjectRootPath: undefined Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject3* Info seq [hh:mm:ss:mss] response: @@ -1759,18 +1802,38 @@ Info seq [hh:mm:ss:mss] response: } After request +PolledWatches:: +/user/username/projects/myproject/folder/node_modules/@types: + {"pollingInterval":500} +/user/username/projects/myproject/node_modules/@types: + {"pollingInterval":500} +/user/username/projects/node_modules/@types: + {"pollingInterval":500} + +FsWatches:: +/a/lib/lib.d.ts: + {} +/user/username/projects/myproject/folder/tsconfig.json: + {} + +FsWatches *deleted*:: +/user/username/projects/myproject/folder/jsconfig.json: + {} + Projects:: /dev/null/inferredProject2* (Inferred) *deleted* - projectStateVersion: 2 - projectProgramVersion: 2 + projectStateVersion: 3 + projectProgramVersion: 3 isClosed: true *changed* isOrphan: true /dev/null/inferredProject3* (Inferred) *new* projectStateVersion: 1 projectProgramVersion: 1 -/user/username/projects/myproject/folder/jsconfig.json (Configured) +/user/username/projects/myproject/folder/jsconfig.json (Configured) *deleted* projectStateVersion: 1 projectProgramVersion: 1 + isClosed: true *changed* + noOpenRef: true /user/username/projects/myproject/folder/tsconfig.json (Configured) projectStateVersion: 2 projectProgramVersion: 1 @@ -1778,10 +1841,10 @@ Projects:: ScriptInfos:: /a/lib/lib.d.ts *changed* version: Text-1 - containingProjects: 3 *changed* + containingProjects: 2 *changed* /user/username/projects/myproject/folder/tsconfig.json - /user/username/projects/myproject/folder/jsconfig.json /dev/null/inferredProject3* *new* + /user/username/projects/myproject/folder/jsconfig.json *deleted* /random/random.ts (Open) *new* version: SVC-3-0 containingProjects: 1 @@ -1790,10 +1853,10 @@ ScriptInfos:: version: SVC-2-0 containingProjects: 1 /user/username/projects/myproject/folder/tsconfig.json *default* -/user/username/projects/myproject/folder/commonFile2.ts (Open) +/user/username/projects/myproject/folder/commonFile2.ts (Open) *changed* version: SVC-2-0 - containingProjects: 1 - /user/username/projects/myproject/folder/jsconfig.json *default* + containingProjects: 0 *changed* + /user/username/projects/myproject/folder/jsconfig.json *deleted* Before request @@ -1810,10 +1873,6 @@ Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /user/username/project Info seq [hh:mm:ss:mss] Project '/user/username/projects/myproject/folder/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (2) -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/user/username/projects/myproject/folder/jsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (2) - Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject3*' (Inferred) Info seq [hh:mm:ss:mss] Files (2) @@ -1821,7 +1880,7 @@ Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: Info seq [hh:mm:ss:mss] FileName: /user/username/projects/myproject/folder/commonFile2.ts ProjectRootPath: undefined -Info seq [hh:mm:ss:mss] Projects: /user/username/projects/myproject/folder/jsconfig.json +Info seq [hh:mm:ss:mss] Projects: Info seq [hh:mm:ss:mss] FileName: /random/random.ts ProjectRootPath: undefined Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject3* Info seq [hh:mm:ss:mss] response: @@ -1847,17 +1906,23 @@ FsWatches:: {} /user/username/projects/myproject/folder/commonFile1.ts: *new* {} -/user/username/projects/myproject/folder/jsconfig.json: - {} /user/username/projects/myproject/folder/tsconfig.json: {} +Projects:: +/dev/null/inferredProject3* (Inferred) + projectStateVersion: 1 + projectProgramVersion: 1 +/user/username/projects/myproject/folder/tsconfig.json (Configured) *changed* + projectStateVersion: 2 + projectProgramVersion: 1 + noOpenRef: true *changed* + ScriptInfos:: /a/lib/lib.d.ts version: Text-1 - containingProjects: 3 + containingProjects: 2 /user/username/projects/myproject/folder/tsconfig.json - /user/username/projects/myproject/folder/jsconfig.json /dev/null/inferredProject3* /random/random.ts (Open) version: SVC-3-0 @@ -1870,8 +1935,7 @@ ScriptInfos:: /user/username/projects/myproject/folder/tsconfig.json /user/username/projects/myproject/folder/commonFile2.ts (Open) version: SVC-2-0 - containingProjects: 1 - /user/username/projects/myproject/folder/jsconfig.json *default* + containingProjects: 0 Before request @@ -1888,10 +1952,6 @@ Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /user/username/project Info seq [hh:mm:ss:mss] Project '/user/username/projects/myproject/folder/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (2) -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/user/username/projects/myproject/folder/jsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (2) - Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject3*' (Inferred) Info seq [hh:mm:ss:mss] Files (2) @@ -1925,30 +1985,14 @@ FsWatches:: {} /user/username/projects/myproject/folder/commonFile2.ts: *new* {} -/user/username/projects/myproject/folder/jsconfig.json: - {} /user/username/projects/myproject/folder/tsconfig.json: {} -Projects:: -/dev/null/inferredProject3* (Inferred) - projectStateVersion: 1 - projectProgramVersion: 1 -/user/username/projects/myproject/folder/jsconfig.json (Configured) *changed* - projectStateVersion: 1 - projectProgramVersion: 1 - noOpenRef: true *changed* -/user/username/projects/myproject/folder/tsconfig.json (Configured) *changed* - projectStateVersion: 2 - projectProgramVersion: 1 - noOpenRef: true *changed* - ScriptInfos:: /a/lib/lib.d.ts version: Text-1 - containingProjects: 3 + containingProjects: 2 /user/username/projects/myproject/folder/tsconfig.json - /user/username/projects/myproject/folder/jsconfig.json /dev/null/inferredProject3* /random/random.ts (Open) version: SVC-3-0 @@ -1961,8 +2005,7 @@ ScriptInfos:: /user/username/projects/myproject/folder/commonFile2.ts *changed* open: false *changed* version: SVC-2-0 - containingProjects: 1 - /user/username/projects/myproject/folder/jsconfig.json + containingProjects: 0 Before request @@ -1978,10 +2021,6 @@ Info seq [hh:mm:ss:mss] request: Info seq [hh:mm:ss:mss] Project '/user/username/projects/myproject/folder/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (2) -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/user/username/projects/myproject/folder/jsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (2) - Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject3*' (Inferred) Info seq [hh:mm:ss:mss] Files (2) @@ -2004,10 +2043,6 @@ Projects:: projectProgramVersion: 1 dirty: true *changed* isOrphan: true *changed* -/user/username/projects/myproject/folder/jsconfig.json (Configured) - projectStateVersion: 1 - projectProgramVersion: 1 - noOpenRef: true /user/username/projects/myproject/folder/tsconfig.json (Configured) projectStateVersion: 2 projectProgramVersion: 1 @@ -2016,9 +2051,8 @@ Projects:: ScriptInfos:: /a/lib/lib.d.ts version: Text-1 - containingProjects: 3 + containingProjects: 2 /user/username/projects/myproject/folder/tsconfig.json - /user/username/projects/myproject/folder/jsconfig.json /dev/null/inferredProject3* /random/random.ts *deleted* open: false *changed* @@ -2031,8 +2065,7 @@ ScriptInfos:: /user/username/projects/myproject/folder/tsconfig.json /user/username/projects/myproject/folder/commonFile2.ts version: SVC-2-0 - containingProjects: 1 - /user/username/projects/myproject/folder/jsconfig.json + containingProjects: 0 Before request @@ -2081,26 +2114,6 @@ Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /user/username/pr Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Project: /user/username/projects/myproject/folder/tsconfig.json WatchType: Type roots Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/node_modules/@types 1 undefined Project: /user/username/projects/myproject/folder/tsconfig.json WatchType: Type roots Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/node_modules/@types 1 undefined Project: /user/username/projects/myproject/folder/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] `remove Project:: -Info seq [hh:mm:ss:mss] Project '/user/username/projects/myproject/folder/jsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (2) - /a/lib/lib.d.ts - /user/username/projects/myproject/folder/commonFile2.ts - - - ../../../../../a/lib/lib.d.ts - Default library for target 'es5' - commonFile2.ts - Part of 'files' list in tsconfig.json - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /user/username/projects/myproject/folder/jsconfig.json 2000 undefined Project: /user/username/projects/myproject/folder/jsconfig.json WatchType: Config file -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/myproject/folder/node_modules/@types 1 undefined Project: /user/username/projects/myproject/folder/jsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/myproject/folder/node_modules/@types 1 undefined Project: /user/username/projects/myproject/folder/jsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Project: /user/username/projects/myproject/folder/jsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Project: /user/username/projects/myproject/folder/jsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/node_modules/@types 1 undefined Project: /user/username/projects/myproject/folder/jsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/node_modules/@types 1 undefined Project: /user/username/projects/myproject/folder/jsconfig.json WatchType: Type roots Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /user/username/projects/myproject/folder/commonFile1.ts 500 undefined WatchType: Closed Script info Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /user/username/projects/myproject/folder/commonFile2.ts 500 undefined WatchType: Closed Script info Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject3*' (Inferred) @@ -2140,8 +2153,6 @@ FsWatches *deleted*:: {} /user/username/projects/myproject/folder/commonFile2.ts: {} -/user/username/projects/myproject/folder/jsconfig.json: - {} /user/username/projects/myproject/folder/tsconfig.json: {} @@ -2151,11 +2162,6 @@ Projects:: projectProgramVersion: 1 dirty: false *changed* isOrphan: false *changed* -/user/username/projects/myproject/folder/jsconfig.json (Configured) *deleted* - projectStateVersion: 1 - projectProgramVersion: 1 - isClosed: true *changed* - noOpenRef: true /user/username/projects/myproject/folder/tsconfig.json (Configured) *deleted* projectStateVersion: 2 projectProgramVersion: 1 @@ -2168,7 +2174,6 @@ ScriptInfos:: containingProjects: 1 *changed* /dev/null/inferredProject3* /user/username/projects/myproject/folder/tsconfig.json *deleted* - /user/username/projects/myproject/folder/jsconfig.json *deleted* /random/random.ts (Open) *new* version: SVC-4-0 containingProjects: 1 @@ -2179,8 +2184,7 @@ ScriptInfos:: /user/username/projects/myproject/folder/tsconfig.json *deleted* /user/username/projects/myproject/folder/commonFile2.ts *deleted* version: SVC-2-0 - containingProjects: 0 *changed* - /user/username/projects/myproject/folder/jsconfig.json *deleted* + containingProjects: 0 Before request @@ -2395,8 +2399,8 @@ FsWatches:: {} Timeout callback:: count: 2 -8: /user/username/projects/myproject/folder/jsconfig.json *new* -9: *ensureProjectForOpenFiles* *new* +9: /user/username/projects/myproject/folder/jsconfig.json *new* +10: *ensureProjectForOpenFiles* *new* Projects:: /user/username/projects/myproject/folder/jsconfig.json (Configured) *new* @@ -3048,10 +3052,10 @@ FsWatches:: {} Timeout callback:: count: 2 -8: /user/username/projects/myproject/folder/jsconfig.json *deleted* -9: *ensureProjectForOpenFiles* *deleted* -10: /user/username/projects/myproject/folder/jsconfig.json *new* -11: *ensureProjectForOpenFiles* *new* +9: /user/username/projects/myproject/folder/jsconfig.json *deleted* +10: *ensureProjectForOpenFiles* *deleted* +11: /user/username/projects/myproject/folder/jsconfig.json *new* +12: *ensureProjectForOpenFiles* *new* Projects:: /user/username/projects/myproject/folder/jsconfig.json (Configured) *new* @@ -3885,10 +3889,10 @@ FsWatches:: {} Timeout callback:: count: 2 -10: /user/username/projects/myproject/folder/jsconfig.json *deleted* -11: *ensureProjectForOpenFiles* *deleted* -12: /user/username/projects/myproject/folder/jsconfig.json *new* -13: *ensureProjectForOpenFiles* *new* +11: /user/username/projects/myproject/folder/jsconfig.json *deleted* +12: *ensureProjectForOpenFiles* *deleted* +13: /user/username/projects/myproject/folder/jsconfig.json *new* +14: *ensureProjectForOpenFiles* *new* Projects:: /user/username/projects/myproject/folder/jsconfig.json (Configured) *new* @@ -4703,41 +4707,29 @@ Info seq [hh:mm:ss:mss] request: "type": "request" } Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /user/username/projects/myproject/folder/commonFile2.ts ProjectRootPath: undefined:: Result: /user/username/projects/myproject/folder/tsconfig.json -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /user/username/projects/myproject/folder/tsconfig.json ProjectRootPath: undefined:: Result: /user/username/projects/myproject/folder/jsconfig.json -Info seq [hh:mm:ss:mss] Creating configuration project /user/username/projects/myproject/folder/jsconfig.json -Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/folder/jsconfig.json 2000 undefined Project: /user/username/projects/myproject/folder/jsconfig.json WatchType: Config file Info seq [hh:mm:ss:mss] event: { "seq": 0, "type": "event", - "event": "projectLoadingStart", + "event": "configFileDiag", "body": { - "projectName": "/user/username/projects/myproject/folder/jsconfig.json", - "reason": "Creating possible configured project for /user/username/projects/myproject/folder/commonFile2.ts to open" + "triggerFile": "/user/username/projects/myproject/folder/commonFile2.ts", + "configFile": "/user/username/projects/myproject/folder/tsconfig.json", + "diagnostics": [] } } -Info seq [hh:mm:ss:mss] Config: /user/username/projects/myproject/folder/jsconfig.json : { - "rootNames": [ - "/user/username/projects/myproject/folder/commonFile2.ts" - ], - "options": { - "allowJs": true, - "maxNodeModuleJsDepth": 2, - "allowSyntheticDefaultImports": true, - "skipLibCheck": true, - "noEmit": true, - "configFilePath": "/user/username/projects/myproject/folder/jsconfig.json" - } -} -Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /user/username/projects/myproject/folder/jsconfig.json -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/folder/node_modules/@types 1 undefined Project: /user/username/projects/myproject/folder/jsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/folder/node_modules/@types 1 undefined Project: /user/username/projects/myproject/folder/jsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Project: /user/username/projects/myproject/folder/jsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Project: /user/username/projects/myproject/folder/jsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/node_modules/@types 1 undefined Project: /user/username/projects/myproject/folder/jsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/node_modules/@types 1 undefined Project: /user/username/projects/myproject/folder/jsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /user/username/projects/myproject/folder/jsconfig.json projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms -Info seq [hh:mm:ss:mss] Project '/user/username/projects/myproject/folder/jsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/folder/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/tsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject7* +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/folder/node_modules/@types 1 undefined Project: /dev/null/inferredProject7* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/folder/node_modules/@types 1 undefined Project: /dev/null/inferredProject7* WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Project: /dev/null/inferredProject7* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Project: /dev/null/inferredProject7* WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/node_modules/@types 1 undefined Project: /dev/null/inferredProject7* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/node_modules/@types 1 undefined Project: /dev/null/inferredProject7* WatchType: Type roots +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject7* projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject7*' (Inferred) Info seq [hh:mm:ss:mss] Files (2) /a/lib/lib.d.ts Text-1 "/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }" /user/username/projects/myproject/folder/commonFile2.ts SVC-6-0 "let y = 1" @@ -4746,34 +4738,14 @@ Info seq [hh:mm:ss:mss] Files (2) ../../../../../a/lib/lib.d.ts Default library for target 'es5' commonFile2.ts - Part of 'files' list in tsconfig.json + Root file specified for compilation Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "projectLoadingFinish", - "body": { - "projectName": "/user/username/projects/myproject/folder/jsconfig.json" - } - } -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "configFileDiag", - "body": { - "triggerFile": "/user/username/projects/myproject/folder/commonFile2.ts", - "configFile": "/user/username/projects/myproject/folder/jsconfig.json", - "diagnostics": [] - } - } Info seq [hh:mm:ss:mss] Project '/user/username/projects/myproject/folder/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/user/username/projects/myproject/folder/jsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject7*' (Inferred) Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- @@ -4781,7 +4753,7 @@ Info seq [hh:mm:ss:mss] Open files: Info seq [hh:mm:ss:mss] FileName: /user/username/projects/myproject/folder/commonFile1.ts ProjectRootPath: undefined Info seq [hh:mm:ss:mss] Projects: /user/username/projects/myproject/folder/tsconfig.json Info seq [hh:mm:ss:mss] FileName: /user/username/projects/myproject/folder/commonFile2.ts ProjectRootPath: undefined -Info seq [hh:mm:ss:mss] Projects: /user/username/projects/myproject/folder/jsconfig.json +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject7* Info seq [hh:mm:ss:mss] response: { "seq": 0, @@ -4798,8 +4770,12 @@ After request PolledWatches:: /user/username/projects/myproject/folder/node_modules/@types: {"pollingInterval":500} +/user/username/projects/myproject/jsconfig.json: *new* + {"pollingInterval":2000} /user/username/projects/myproject/node_modules/@types: {"pollingInterval":500} +/user/username/projects/myproject/tsconfig.json: *new* + {"pollingInterval":2000} /user/username/projects/node_modules/@types: {"pollingInterval":500} @@ -4812,7 +4788,7 @@ FsWatches:: {} Projects:: -/user/username/projects/myproject/folder/jsconfig.json (Configured) *new* +/dev/null/inferredProject7* (Inferred) *new* projectStateVersion: 1 projectProgramVersion: 1 /user/username/projects/myproject/folder/tsconfig.json (Configured) @@ -4824,7 +4800,7 @@ ScriptInfos:: version: Text-1 containingProjects: 2 *changed* /user/username/projects/myproject/folder/tsconfig.json - /user/username/projects/myproject/folder/jsconfig.json *new* + /dev/null/inferredProject7* *new* /user/username/projects/myproject/folder/commonFile1.ts (Open) version: SVC-6-0 containingProjects: 1 @@ -4832,7 +4808,7 @@ ScriptInfos:: /user/username/projects/myproject/folder/commonFile2.ts (Open) *new* version: SVC-6-0 containingProjects: 1 - /user/username/projects/myproject/folder/jsconfig.json *default* + /dev/null/inferredProject7* *default* Before request @@ -4845,12 +4821,15 @@ Info seq [hh:mm:ss:mss] request: "seq": 41, "type": "request" } +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /user/username/projects/myproject/folder/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /user/username/projects/myproject/tsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /user/username/projects/myproject/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/folder/commonFile2.ts 500 undefined WatchType: Closed Script info Info seq [hh:mm:ss:mss] Project '/user/username/projects/myproject/folder/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/user/username/projects/myproject/folder/jsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject7*' (Inferred) Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- @@ -4875,21 +4854,30 @@ PolledWatches:: /user/username/projects/node_modules/@types: {"pollingInterval":500} +PolledWatches *deleted*:: +/user/username/projects/myproject/jsconfig.json: + {"pollingInterval":2000} +/user/username/projects/myproject/tsconfig.json: + {"pollingInterval":2000} + FsWatches:: /a/lib/lib.d.ts: {} /user/username/projects/myproject/folder/commonFile2.ts: *new* {} -/user/username/projects/myproject/folder/jsconfig.json: - {} /user/username/projects/myproject/folder/tsconfig.json: {} +FsWatches *deleted*:: +/user/username/projects/myproject/folder/jsconfig.json: + {} + Projects:: -/user/username/projects/myproject/folder/jsconfig.json (Configured) *changed* - projectStateVersion: 1 +/dev/null/inferredProject7* (Inferred) *changed* + projectStateVersion: 2 *changed* projectProgramVersion: 1 - noOpenRef: true *changed* + dirty: true *changed* + isOrphan: true *changed* /user/username/projects/myproject/folder/tsconfig.json (Configured) projectStateVersion: 1 projectProgramVersion: 1 @@ -4899,7 +4887,7 @@ ScriptInfos:: version: Text-1 containingProjects: 2 /user/username/projects/myproject/folder/tsconfig.json - /user/username/projects/myproject/folder/jsconfig.json + /dev/null/inferredProject7* /user/username/projects/myproject/folder/commonFile1.ts (Open) version: SVC-6-0 containingProjects: 1 @@ -4907,8 +4895,8 @@ ScriptInfos:: /user/username/projects/myproject/folder/commonFile2.ts *changed* open: false *changed* version: SVC-6-0 - containingProjects: 1 - /user/username/projects/myproject/folder/jsconfig.json + containingProjects: 0 *changed* + /dev/null/inferredProject7* *deleted* Before request @@ -4923,9 +4911,9 @@ Info seq [hh:mm:ss:mss] request: "type": "request" } Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /random/random.ts ProjectRootPath: undefined:: Result: undefined -Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject7* -Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject7* projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms -Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject7*' (Inferred) +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject8* +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject8* projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject8*' (Inferred) Info seq [hh:mm:ss:mss] Files (2) /a/lib/lib.d.ts Text-1 "/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }" /random/random.ts SVC-10-0 "export const y = 10;" @@ -4938,7 +4926,7 @@ Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] `remove Project:: -Info seq [hh:mm:ss:mss] Project '/user/username/projects/myproject/folder/jsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject7*' (Inferred) Info seq [hh:mm:ss:mss] Files (2) /a/lib/lib.d.ts /user/username/projects/myproject/folder/commonFile2.ts @@ -4947,22 +4935,21 @@ Info seq [hh:mm:ss:mss] Files (2) ../../../../../a/lib/lib.d.ts Default library for target 'es5' commonFile2.ts - Part of 'files' list in tsconfig.json + Root file specified for compilation Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /user/username/projects/myproject/folder/jsconfig.json 2000 undefined Project: /user/username/projects/myproject/folder/jsconfig.json WatchType: Config file -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/myproject/folder/node_modules/@types 1 undefined Project: /user/username/projects/myproject/folder/jsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/myproject/folder/node_modules/@types 1 undefined Project: /user/username/projects/myproject/folder/jsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Project: /user/username/projects/myproject/folder/jsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Project: /user/username/projects/myproject/folder/jsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/node_modules/@types 1 undefined Project: /user/username/projects/myproject/folder/jsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/node_modules/@types 1 undefined Project: /user/username/projects/myproject/folder/jsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/myproject/folder/node_modules/@types 1 undefined Project: /dev/null/inferredProject7* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/myproject/folder/node_modules/@types 1 undefined Project: /dev/null/inferredProject7* WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Project: /dev/null/inferredProject7* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Project: /dev/null/inferredProject7* WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/node_modules/@types 1 undefined Project: /dev/null/inferredProject7* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/node_modules/@types 1 undefined Project: /dev/null/inferredProject7* WatchType: Type roots Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /user/username/projects/myproject/folder/commonFile2.ts 500 undefined WatchType: Closed Script info Info seq [hh:mm:ss:mss] Project '/user/username/projects/myproject/folder/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject7*' (Inferred) +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject8*' (Inferred) Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- @@ -4970,7 +4957,7 @@ Info seq [hh:mm:ss:mss] Open files: Info seq [hh:mm:ss:mss] FileName: /user/username/projects/myproject/folder/commonFile1.ts ProjectRootPath: undefined Info seq [hh:mm:ss:mss] Projects: /user/username/projects/myproject/folder/tsconfig.json Info seq [hh:mm:ss:mss] FileName: /random/random.ts ProjectRootPath: undefined -Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject7* +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject8* Info seq [hh:mm:ss:mss] response: { "seq": 0, @@ -5001,18 +4988,17 @@ FsWatches:: FsWatches *deleted*:: /user/username/projects/myproject/folder/commonFile2.ts: {} -/user/username/projects/myproject/folder/jsconfig.json: - {} Projects:: -/dev/null/inferredProject7* (Inferred) *new* - projectStateVersion: 1 +/dev/null/inferredProject7* (Inferred) *deleted* + projectStateVersion: 2 projectProgramVersion: 1 -/user/username/projects/myproject/folder/jsconfig.json (Configured) *deleted* + dirty: true + isClosed: true *changed* + isOrphan: true +/dev/null/inferredProject8* (Inferred) *new* projectStateVersion: 1 projectProgramVersion: 1 - isClosed: true *changed* - noOpenRef: true /user/username/projects/myproject/folder/tsconfig.json (Configured) projectStateVersion: 1 projectProgramVersion: 1 @@ -5022,17 +5008,16 @@ ScriptInfos:: version: Text-1 containingProjects: 2 *changed* /user/username/projects/myproject/folder/tsconfig.json - /dev/null/inferredProject7* *new* - /user/username/projects/myproject/folder/jsconfig.json *deleted* + /dev/null/inferredProject8* *new* + /dev/null/inferredProject7* *deleted* /random/random.ts (Open) *new* version: SVC-10-0 containingProjects: 1 - /dev/null/inferredProject7* *default* + /dev/null/inferredProject8* *default* /user/username/projects/myproject/folder/commonFile1.ts (Open) version: SVC-6-0 containingProjects: 1 /user/username/projects/myproject/folder/tsconfig.json *default* /user/username/projects/myproject/folder/commonFile2.ts *deleted* version: SVC-6-0 - containingProjects: 0 *changed* - /user/username/projects/myproject/folder/jsconfig.json *deleted* + containingProjects: 0 diff --git a/tests/baselines/reference/tsserver/configuredProjects/creating-new-file-and-then-open-it-after-watcher-is-invoked,-ask-errors-on-it-after-old-one-without-file-being-in-config.js b/tests/baselines/reference/tsserver/configuredProjects/creating-new-file-and-then-open-it-after-watcher-is-invoked,-ask-errors-on-it-after-old-one-without-file-being-in-config.js index 88eecfb40ee8e..e2a04fb58a240 100644 --- a/tests/baselines/reference/tsserver/configuredProjects/creating-new-file-and-then-open-it-after-watcher-is-invoked,-ask-errors-on-it-after-old-one-without-file-being-in-config.js +++ b/tests/baselines/reference/tsserver/configuredProjects/creating-new-file-and-then-open-it-after-watcher-is-invoked,-ask-errors-on-it-after-old-one-without-file-being-in-config.js @@ -229,7 +229,6 @@ Info seq [hh:mm:ss:mss] request: Info seq [hh:mm:ss:mss] Invoking /user/username/projects/myproject/tsconfig.json:: wildcard for open scriptInfo:: /user/username/projects/myproject/src/sub/fooBar.ts Info seq [hh:mm:ss:mss] Project: /user/username/projects/myproject/tsconfig.json Detected excluded file: /user/username/projects/myproject/src/sub/fooBar.ts Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /user/username/projects/myproject/src/sub/fooBar.ts ProjectRootPath: /user/username/projects/myproject:: Result: /user/username/projects/myproject/tsconfig.json -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /user/username/projects/myproject/tsconfig.json ProjectRootPath: /user/username/projects/myproject:: Result: undefined Info seq [hh:mm:ss:mss] event: { "seq": 0, diff --git a/tests/baselines/reference/tsserver/configuredProjects/creating-new-file-and-then-open-it-after-watcher-is-invoked,-ask-errors-on-it-before-old-one-without-file-being-in-config.js b/tests/baselines/reference/tsserver/configuredProjects/creating-new-file-and-then-open-it-after-watcher-is-invoked,-ask-errors-on-it-before-old-one-without-file-being-in-config.js index 1cee7b4530645..c5bd3905e4152 100644 --- a/tests/baselines/reference/tsserver/configuredProjects/creating-new-file-and-then-open-it-after-watcher-is-invoked,-ask-errors-on-it-before-old-one-without-file-being-in-config.js +++ b/tests/baselines/reference/tsserver/configuredProjects/creating-new-file-and-then-open-it-after-watcher-is-invoked,-ask-errors-on-it-before-old-one-without-file-being-in-config.js @@ -229,7 +229,6 @@ Info seq [hh:mm:ss:mss] request: Info seq [hh:mm:ss:mss] Invoking /user/username/projects/myproject/tsconfig.json:: wildcard for open scriptInfo:: /user/username/projects/myproject/src/sub/fooBar.ts Info seq [hh:mm:ss:mss] Project: /user/username/projects/myproject/tsconfig.json Detected excluded file: /user/username/projects/myproject/src/sub/fooBar.ts Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /user/username/projects/myproject/src/sub/fooBar.ts ProjectRootPath: /user/username/projects/myproject:: Result: /user/username/projects/myproject/tsconfig.json -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /user/username/projects/myproject/tsconfig.json ProjectRootPath: /user/username/projects/myproject:: Result: undefined Info seq [hh:mm:ss:mss] event: { "seq": 0, diff --git a/tests/baselines/reference/tsserver/configuredProjects/creating-new-file-and-then-open-it-before-watcher-is-invoked,-ask-errors-on-it-after-old-one-without-file-being-in-config.js b/tests/baselines/reference/tsserver/configuredProjects/creating-new-file-and-then-open-it-before-watcher-is-invoked,-ask-errors-on-it-after-old-one-without-file-being-in-config.js index e6aa7b1d150b1..073a7b8e4b175 100644 --- a/tests/baselines/reference/tsserver/configuredProjects/creating-new-file-and-then-open-it-before-watcher-is-invoked,-ask-errors-on-it-after-old-one-without-file-being-in-config.js +++ b/tests/baselines/reference/tsserver/configuredProjects/creating-new-file-and-then-open-it-before-watcher-is-invoked,-ask-errors-on-it-after-old-one-without-file-being-in-config.js @@ -223,7 +223,6 @@ Info seq [hh:mm:ss:mss] request: Info seq [hh:mm:ss:mss] Invoking /user/username/projects/myproject/tsconfig.json:: wildcard for open scriptInfo:: /user/username/projects/myproject/src/sub/fooBar.ts Info seq [hh:mm:ss:mss] Project: /user/username/projects/myproject/tsconfig.json Detected excluded file: /user/username/projects/myproject/src/sub/fooBar.ts Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /user/username/projects/myproject/src/sub/fooBar.ts ProjectRootPath: /user/username/projects/myproject:: Result: /user/username/projects/myproject/tsconfig.json -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /user/username/projects/myproject/tsconfig.json ProjectRootPath: /user/username/projects/myproject:: Result: undefined Info seq [hh:mm:ss:mss] event: { "seq": 0, diff --git a/tests/baselines/reference/tsserver/configuredProjects/creating-new-file-and-then-open-it-before-watcher-is-invoked,-ask-errors-on-it-after-old-one.js b/tests/baselines/reference/tsserver/configuredProjects/creating-new-file-and-then-open-it-before-watcher-is-invoked,-ask-errors-on-it-after-old-one.js index 71189a22c6ec8..501210b95d475 100644 --- a/tests/baselines/reference/tsserver/configuredProjects/creating-new-file-and-then-open-it-before-watcher-is-invoked,-ask-errors-on-it-after-old-one.js +++ b/tests/baselines/reference/tsserver/configuredProjects/creating-new-file-and-then-open-it-before-watcher-is-invoked,-ask-errors-on-it-after-old-one.js @@ -224,7 +224,6 @@ Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /user/username/project Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /user/username/projects/myproject/tsconfig.json Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /user/username/projects/myproject/tsconfig.json projectStateVersion: 2 projectProgramVersion: 1 structureChanged: false structureIsReused:: Not Elapsed:: *ms Info seq [hh:mm:ss:mss] Same program as before -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /user/username/projects/myproject/tsconfig.json ProjectRootPath: /user/username/projects/myproject:: Result: undefined Info seq [hh:mm:ss:mss] event: { "seq": 0, diff --git a/tests/baselines/reference/tsserver/configuredProjects/creating-new-file-and-then-open-it-before-watcher-is-invoked,-ask-errors-on-it-before-old-one-without-file-being-in-config.js b/tests/baselines/reference/tsserver/configuredProjects/creating-new-file-and-then-open-it-before-watcher-is-invoked,-ask-errors-on-it-before-old-one-without-file-being-in-config.js index 145e40027e22f..a6600ea05055d 100644 --- a/tests/baselines/reference/tsserver/configuredProjects/creating-new-file-and-then-open-it-before-watcher-is-invoked,-ask-errors-on-it-before-old-one-without-file-being-in-config.js +++ b/tests/baselines/reference/tsserver/configuredProjects/creating-new-file-and-then-open-it-before-watcher-is-invoked,-ask-errors-on-it-before-old-one-without-file-being-in-config.js @@ -223,7 +223,6 @@ Info seq [hh:mm:ss:mss] request: Info seq [hh:mm:ss:mss] Invoking /user/username/projects/myproject/tsconfig.json:: wildcard for open scriptInfo:: /user/username/projects/myproject/src/sub/fooBar.ts Info seq [hh:mm:ss:mss] Project: /user/username/projects/myproject/tsconfig.json Detected excluded file: /user/username/projects/myproject/src/sub/fooBar.ts Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /user/username/projects/myproject/src/sub/fooBar.ts ProjectRootPath: /user/username/projects/myproject:: Result: /user/username/projects/myproject/tsconfig.json -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /user/username/projects/myproject/tsconfig.json ProjectRootPath: /user/username/projects/myproject:: Result: undefined Info seq [hh:mm:ss:mss] event: { "seq": 0, diff --git a/tests/baselines/reference/tsserver/configuredProjects/creating-new-file-and-then-open-it-before-watcher-is-invoked,-ask-errors-on-it-before-old-one.js b/tests/baselines/reference/tsserver/configuredProjects/creating-new-file-and-then-open-it-before-watcher-is-invoked,-ask-errors-on-it-before-old-one.js index 6c4b757161760..44e521cb471fb 100644 --- a/tests/baselines/reference/tsserver/configuredProjects/creating-new-file-and-then-open-it-before-watcher-is-invoked,-ask-errors-on-it-before-old-one.js +++ b/tests/baselines/reference/tsserver/configuredProjects/creating-new-file-and-then-open-it-before-watcher-is-invoked,-ask-errors-on-it-before-old-one.js @@ -224,7 +224,6 @@ Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /user/username/project Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /user/username/projects/myproject/tsconfig.json Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /user/username/projects/myproject/tsconfig.json projectStateVersion: 2 projectProgramVersion: 1 structureChanged: false structureIsReused:: Not Elapsed:: *ms Info seq [hh:mm:ss:mss] Same program as before -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /user/username/projects/myproject/tsconfig.json ProjectRootPath: /user/username/projects/myproject:: Result: undefined Info seq [hh:mm:ss:mss] event: { "seq": 0, diff --git a/tests/baselines/reference/tsserver/configuredProjects/should-be-able-to-handle-@types-if-input-file-list-is-empty.js b/tests/baselines/reference/tsserver/configuredProjects/should-be-able-to-handle-@types-if-input-file-list-is-empty.js index 6c8e085f94aca..f91375e276208 100644 --- a/tests/baselines/reference/tsserver/configuredProjects/should-be-able-to-handle-@types-if-input-file-list-is-empty.js +++ b/tests/baselines/reference/tsserver/configuredProjects/should-be-able-to-handle-@types-if-input-file-list-is-empty.js @@ -127,7 +127,6 @@ Info seq [hh:mm:ss:mss] event: ] } } -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /a/tsconfig.json ProjectRootPath: undefined:: Result: undefined Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /a/node_modules 1 undefined WatchType: node_modules for closed script infos and package.jsons affecting module specifier cache Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /a/node_modules 1 undefined WatchType: node_modules for closed script infos and package.jsons affecting module specifier cache diff --git a/tests/baselines/reference/tsserver/configuredProjects/should-be-tolerated-without-crashing-the-server.js b/tests/baselines/reference/tsserver/configuredProjects/should-be-tolerated-without-crashing-the-server.js index 6d57cad9c0c8a..734b681ce5712 100644 --- a/tests/baselines/reference/tsserver/configuredProjects/should-be-tolerated-without-crashing-the-server.js +++ b/tests/baselines/reference/tsserver/configuredProjects/should-be-tolerated-without-crashing-the-server.js @@ -118,7 +118,6 @@ Info seq [hh:mm:ss:mss] event: ] } } -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /a/b/tsconfig.json ProjectRootPath: undefined:: Result: undefined Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /a/lib/lib.d.ts 500 undefined Project: /dev/null/inferredProject1* WatchType: Missing file Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms diff --git a/tests/baselines/reference/tsserver/configuredProjects/should-ignore-non-existing-files-specified-in-the-config-file.js b/tests/baselines/reference/tsserver/configuredProjects/should-ignore-non-existing-files-specified-in-the-config-file.js index 24a40c21a5f83..aba3abde3b1db 100644 --- a/tests/baselines/reference/tsserver/configuredProjects/should-ignore-non-existing-files-specified-in-the-config-file.js +++ b/tests/baselines/reference/tsserver/configuredProjects/should-ignore-non-existing-files-specified-in-the-config-file.js @@ -244,7 +244,6 @@ Info seq [hh:mm:ss:mss] request: "type": "request" } Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /a/b/commonFile2.ts ProjectRootPath: undefined:: Result: /a/b/tsconfig.json -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /a/b/tsconfig.json ProjectRootPath: undefined:: Result: undefined Info seq [hh:mm:ss:mss] event: { "seq": 0, diff --git a/tests/baselines/reference/tsserver/configuredProjects/should-tolerate-invalid-include-files-that-start-in-subDirectory.js b/tests/baselines/reference/tsserver/configuredProjects/should-tolerate-invalid-include-files-that-start-in-subDirectory.js index e8095fdfeff5f..fb7dd656e3feb 100644 --- a/tests/baselines/reference/tsserver/configuredProjects/should-tolerate-invalid-include-files-that-start-in-subDirectory.js +++ b/tests/baselines/reference/tsserver/configuredProjects/should-tolerate-invalid-include-files-that-start-in-subDirectory.js @@ -140,7 +140,6 @@ Info seq [hh:mm:ss:mss] event: ] } } -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /user/username/projects/myproject/src/server/tsconfig.json ProjectRootPath: undefined:: Result: undefined Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/src/server/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/src/tsconfig.json 2000 undefined WatchType: Config file for the inferred project root Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/src/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root diff --git a/tests/baselines/reference/tsserver/configuredProjects/when-default-configured-project-does-not-contain-the-file.js b/tests/baselines/reference/tsserver/configuredProjects/when-default-configured-project-does-not-contain-the-file.js index 1095b3034fc61..4abc064ce0c66 100644 --- a/tests/baselines/reference/tsserver/configuredProjects/when-default-configured-project-does-not-contain-the-file.js +++ b/tests/baselines/reference/tsserver/configuredProjects/when-default-configured-project-does-not-contain-the-file.js @@ -905,7 +905,6 @@ Info seq [hh:mm:ss:mss] request: } Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /user/username/projects/myproject/foo/lib/index.d.ts 500 undefined WatchType: Closed Script info Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /user/username/projects/myproject/foo/lib/index.d.ts ProjectRootPath: undefined:: Result: /user/username/projects/myproject/foo/tsconfig.json -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /user/username/projects/myproject/foo/tsconfig.json ProjectRootPath: undefined:: Result: undefined Info seq [hh:mm:ss:mss] Project '/user/username/projects/myproject/bar/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (3) diff --git a/tests/baselines/reference/tsserver/externalProjects/can-handle-tsconfig-file-name-with-difference-casing-with-lazyConfiguredProjectsFromExternalProject.js b/tests/baselines/reference/tsserver/externalProjects/can-handle-tsconfig-file-name-with-difference-casing-with-lazyConfiguredProjectsFromExternalProject.js index 80f5ffcc43d93..b3892e5022424 100644 --- a/tests/baselines/reference/tsserver/externalProjects/can-handle-tsconfig-file-name-with-difference-casing-with-lazyConfiguredProjectsFromExternalProject.js +++ b/tests/baselines/reference/tsserver/externalProjects/can-handle-tsconfig-file-name-with-difference-casing-with-lazyConfiguredProjectsFromExternalProject.js @@ -176,7 +176,6 @@ Info seq [hh:mm:ss:mss] event: ] } } -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /A/B/tsconfig.json ProjectRootPath: undefined:: Result: undefined Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /a/lib/lib.d.ts 500 undefined Project: /dev/null/inferredProject1* WatchType: Missing file Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms diff --git a/tests/baselines/reference/tsserver/externalProjects/can-handle-tsconfig-file-name-with-difference-casing.js b/tests/baselines/reference/tsserver/externalProjects/can-handle-tsconfig-file-name-with-difference-casing.js index 892d1b5b303fd..6de1f07bebe1e 100644 --- a/tests/baselines/reference/tsserver/externalProjects/can-handle-tsconfig-file-name-with-difference-casing.js +++ b/tests/baselines/reference/tsserver/externalProjects/can-handle-tsconfig-file-name-with-difference-casing.js @@ -178,7 +178,6 @@ Info seq [hh:mm:ss:mss] request: "type": "request" } Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /a/b/app.ts ProjectRootPath: undefined:: Result: /a/b/tsconfig.json -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /A/B/tsconfig.json ProjectRootPath: undefined:: Result: undefined Info seq [hh:mm:ss:mss] event: { "seq": 0, diff --git a/tests/baselines/reference/tsserver/externalProjects/handles-creation-of-external-project-with-jsconfig-before-jsconfig-creation-watcher-is-invoked.js b/tests/baselines/reference/tsserver/externalProjects/handles-creation-of-external-project-with-jsconfig-before-jsconfig-creation-watcher-is-invoked.js index ddee7806df84a..7e9c6d07acffa 100644 --- a/tests/baselines/reference/tsserver/externalProjects/handles-creation-of-external-project-with-jsconfig-before-jsconfig-creation-watcher-is-invoked.js +++ b/tests/baselines/reference/tsserver/externalProjects/handles-creation-of-external-project-with-jsconfig-before-jsconfig-creation-watcher-is-invoked.js @@ -234,7 +234,6 @@ Info seq [hh:mm:ss:mss] request: Info seq [hh:mm:ss:mss] Invoking /user/username/projects/myproject/tsconfig.json:: wildcard for open scriptInfo:: /user/username/projects/myproject/javascript.js Info seq [hh:mm:ss:mss] Project: /user/username/projects/myproject/tsconfig.json Detected file add/remove of non supported extension: /user/username/projects/myproject/javascript.js Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /user/username/projects/myproject/javascript.js ProjectRootPath: undefined:: Result: /user/username/projects/myproject/tsconfig.json -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /user/username/projects/myproject/tsconfig.json ProjectRootPath: undefined:: Result: undefined Info seq [hh:mm:ss:mss] event: { "seq": 0, diff --git a/tests/baselines/reference/tsserver/fourslashServer/autoImportCrossProject_baseUrl_toDist.js b/tests/baselines/reference/tsserver/fourslashServer/autoImportCrossProject_baseUrl_toDist.js index f7a1f70f149a0..f35004be5e67f 100644 --- a/tests/baselines/reference/tsserver/fourslashServer/autoImportCrossProject_baseUrl_toDist.js +++ b/tests/baselines/reference/tsserver/fourslashServer/autoImportCrossProject_baseUrl_toDist.js @@ -124,7 +124,6 @@ Info seq [hh:mm:ss:mss] event: "diagnostics": [] } } -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /common/tsconfig.json ProjectRootPath: undefined:: Result: undefined Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) diff --git a/tests/baselines/reference/tsserver/fourslashServer/autoImportCrossProject_paths_stripSrc.js b/tests/baselines/reference/tsserver/fourslashServer/autoImportCrossProject_paths_stripSrc.js index d84a83c9b3a76..077044c130bbd 100644 --- a/tests/baselines/reference/tsserver/fourslashServer/autoImportCrossProject_paths_stripSrc.js +++ b/tests/baselines/reference/tsserver/fourslashServer/autoImportCrossProject_paths_stripSrc.js @@ -268,7 +268,6 @@ Info seq [hh:mm:ss:mss] event: "diagnostics": [] } } -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /packages/app/tsconfig.json ProjectRootPath: undefined:: Result: undefined Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) diff --git a/tests/baselines/reference/tsserver/fourslashServer/autoImportCrossProject_paths_toDist.js b/tests/baselines/reference/tsserver/fourslashServer/autoImportCrossProject_paths_toDist.js index ebf3de0f85b6a..6d936d685b088 100644 --- a/tests/baselines/reference/tsserver/fourslashServer/autoImportCrossProject_paths_toDist.js +++ b/tests/baselines/reference/tsserver/fourslashServer/autoImportCrossProject_paths_toDist.js @@ -268,7 +268,6 @@ Info seq [hh:mm:ss:mss] event: "diagnostics": [] } } -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /packages/app/tsconfig.json ProjectRootPath: undefined:: Result: undefined Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) diff --git a/tests/baselines/reference/tsserver/fourslashServer/autoImportCrossProject_paths_toDist2.js b/tests/baselines/reference/tsserver/fourslashServer/autoImportCrossProject_paths_toDist2.js index fb450598ddb25..30a22b44052c1 100644 --- a/tests/baselines/reference/tsserver/fourslashServer/autoImportCrossProject_paths_toDist2.js +++ b/tests/baselines/reference/tsserver/fourslashServer/autoImportCrossProject_paths_toDist2.js @@ -126,7 +126,6 @@ Info seq [hh:mm:ss:mss] event: "diagnostics": [] } } -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /common/tsconfig.json ProjectRootPath: undefined:: Result: undefined Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) diff --git a/tests/baselines/reference/tsserver/fourslashServer/autoImportCrossProject_paths_toSrc.js b/tests/baselines/reference/tsserver/fourslashServer/autoImportCrossProject_paths_toSrc.js index 64824840cf14d..fdc835d114033 100644 --- a/tests/baselines/reference/tsserver/fourslashServer/autoImportCrossProject_paths_toSrc.js +++ b/tests/baselines/reference/tsserver/fourslashServer/autoImportCrossProject_paths_toSrc.js @@ -268,7 +268,6 @@ Info seq [hh:mm:ss:mss] event: "diagnostics": [] } } -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /packages/app/tsconfig.json ProjectRootPath: undefined:: Result: undefined Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) diff --git a/tests/baselines/reference/tsserver/fourslashServer/autoImportCrossProject_symlinks_stripSrc.js b/tests/baselines/reference/tsserver/fourslashServer/autoImportCrossProject_symlinks_stripSrc.js index 5ce32a0217203..90597c55a7fe5 100644 --- a/tests/baselines/reference/tsserver/fourslashServer/autoImportCrossProject_symlinks_stripSrc.js +++ b/tests/baselines/reference/tsserver/fourslashServer/autoImportCrossProject_symlinks_stripSrc.js @@ -240,7 +240,6 @@ Info seq [hh:mm:ss:mss] event: "diagnostics": [] } } -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /packages/app/tsconfig.json ProjectRootPath: undefined:: Result: undefined Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) diff --git a/tests/baselines/reference/tsserver/fourslashServer/autoImportCrossProject_symlinks_toDist.js b/tests/baselines/reference/tsserver/fourslashServer/autoImportCrossProject_symlinks_toDist.js index 66bc166c838da..5ca2e451ff0c7 100644 --- a/tests/baselines/reference/tsserver/fourslashServer/autoImportCrossProject_symlinks_toDist.js +++ b/tests/baselines/reference/tsserver/fourslashServer/autoImportCrossProject_symlinks_toDist.js @@ -240,7 +240,6 @@ Info seq [hh:mm:ss:mss] event: "diagnostics": [] } } -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /packages/app/tsconfig.json ProjectRootPath: undefined:: Result: undefined Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) diff --git a/tests/baselines/reference/tsserver/fourslashServer/autoImportCrossProject_symlinks_toSrc.js b/tests/baselines/reference/tsserver/fourslashServer/autoImportCrossProject_symlinks_toSrc.js index 4e538ae364aec..c03e1ef902137 100644 --- a/tests/baselines/reference/tsserver/fourslashServer/autoImportCrossProject_symlinks_toSrc.js +++ b/tests/baselines/reference/tsserver/fourslashServer/autoImportCrossProject_symlinks_toSrc.js @@ -231,7 +231,6 @@ Info seq [hh:mm:ss:mss] event: "diagnostics": [] } } -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /packages/app/tsconfig.json ProjectRootPath: undefined:: Result: undefined Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) diff --git a/tests/baselines/reference/tsserver/fourslashServer/autoImportProvider4.js b/tests/baselines/reference/tsserver/fourslashServer/autoImportProvider4.js index 5a0b20c22a6e2..997100ff0cca2 100644 --- a/tests/baselines/reference/tsserver/fourslashServer/autoImportProvider4.js +++ b/tests/baselines/reference/tsserver/fourslashServer/autoImportProvider4.js @@ -234,7 +234,6 @@ Info seq [hh:mm:ss:mss] event: "diagnostics": [] } } -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /a/tsconfig.json ProjectRootPath: undefined:: Result: undefined Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) diff --git a/tests/baselines/reference/tsserver/fourslashServer/autoImportProvider6.js b/tests/baselines/reference/tsserver/fourslashServer/autoImportProvider6.js index f6ac6f3329994..95e6a36467e53 100644 --- a/tests/baselines/reference/tsserver/fourslashServer/autoImportProvider6.js +++ b/tests/baselines/reference/tsserver/fourslashServer/autoImportProvider6.js @@ -422,7 +422,6 @@ Info seq [hh:mm:ss:mss] event: "diagnostics": [] } } -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /tsconfig.json ProjectRootPath: undefined:: Result: undefined Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /node_modules/@types/react/package.json 2000 undefined Project: /dev/null/inferredProject1* WatchType: File location affecting resolution Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms diff --git a/tests/baselines/reference/tsserver/fourslashServer/autoImportProvider7.js b/tests/baselines/reference/tsserver/fourslashServer/autoImportProvider7.js index 096330fdbda5e..cd1b8421287eb 100644 --- a/tests/baselines/reference/tsserver/fourslashServer/autoImportProvider7.js +++ b/tests/baselines/reference/tsserver/fourslashServer/autoImportProvider7.js @@ -145,7 +145,6 @@ Info seq [hh:mm:ss:mss] event: "diagnostics": [] } } -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /tsconfig.json ProjectRootPath: undefined:: Result: undefined Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) diff --git a/tests/baselines/reference/tsserver/fourslashServer/autoImportProvider8.js b/tests/baselines/reference/tsserver/fourslashServer/autoImportProvider8.js index 94a735cb64ec5..e1a1d105cf8a3 100644 --- a/tests/baselines/reference/tsserver/fourslashServer/autoImportProvider8.js +++ b/tests/baselines/reference/tsserver/fourslashServer/autoImportProvider8.js @@ -145,7 +145,6 @@ Info seq [hh:mm:ss:mss] event: "diagnostics": [] } } -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /tsconfig.json ProjectRootPath: undefined:: Result: undefined Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) diff --git a/tests/baselines/reference/tsserver/fourslashServer/autoImportProvider_exportMap1.js b/tests/baselines/reference/tsserver/fourslashServer/autoImportProvider_exportMap1.js index 23930a456eb1f..2f0f434a39611 100644 --- a/tests/baselines/reference/tsserver/fourslashServer/autoImportProvider_exportMap1.js +++ b/tests/baselines/reference/tsserver/fourslashServer/autoImportProvider_exportMap1.js @@ -132,7 +132,6 @@ Info seq [hh:mm:ss:mss] event: "diagnostics": [] } } -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /tsconfig.json ProjectRootPath: undefined:: Result: undefined Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) diff --git a/tests/baselines/reference/tsserver/fourslashServer/autoImportProvider_exportMap2.js b/tests/baselines/reference/tsserver/fourslashServer/autoImportProvider_exportMap2.js index 19cea47f257d8..d4a142d6ade0c 100644 --- a/tests/baselines/reference/tsserver/fourslashServer/autoImportProvider_exportMap2.js +++ b/tests/baselines/reference/tsserver/fourslashServer/autoImportProvider_exportMap2.js @@ -132,7 +132,6 @@ Info seq [hh:mm:ss:mss] event: "diagnostics": [] } } -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /tsconfig.json ProjectRootPath: undefined:: Result: undefined Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) diff --git a/tests/baselines/reference/tsserver/fourslashServer/autoImportProvider_exportMap3.js b/tests/baselines/reference/tsserver/fourslashServer/autoImportProvider_exportMap3.js index cbbe8ad6fbed6..87afbf905c586 100644 --- a/tests/baselines/reference/tsserver/fourslashServer/autoImportProvider_exportMap3.js +++ b/tests/baselines/reference/tsserver/fourslashServer/autoImportProvider_exportMap3.js @@ -125,7 +125,6 @@ Info seq [hh:mm:ss:mss] event: "diagnostics": [] } } -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /tsconfig.json ProjectRootPath: undefined:: Result: undefined Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) diff --git a/tests/baselines/reference/tsserver/fourslashServer/autoImportProvider_exportMap4.js b/tests/baselines/reference/tsserver/fourslashServer/autoImportProvider_exportMap4.js index fa7adc4ef75b4..3fee391634a57 100644 --- a/tests/baselines/reference/tsserver/fourslashServer/autoImportProvider_exportMap4.js +++ b/tests/baselines/reference/tsserver/fourslashServer/autoImportProvider_exportMap4.js @@ -128,7 +128,6 @@ Info seq [hh:mm:ss:mss] event: "diagnostics": [] } } -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /tsconfig.json ProjectRootPath: undefined:: Result: undefined Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) diff --git a/tests/baselines/reference/tsserver/fourslashServer/autoImportProvider_exportMap5.js b/tests/baselines/reference/tsserver/fourslashServer/autoImportProvider_exportMap5.js index c98c5216e220c..20df3646425f0 100644 --- a/tests/baselines/reference/tsserver/fourslashServer/autoImportProvider_exportMap5.js +++ b/tests/baselines/reference/tsserver/fourslashServer/autoImportProvider_exportMap5.js @@ -152,7 +152,6 @@ Info seq [hh:mm:ss:mss] event: "diagnostics": [] } } -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /tsconfig.json ProjectRootPath: undefined:: Result: undefined Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /node_modules/@types/dependency/package.json 2000 undefined Project: /dev/null/inferredProject1* WatchType: File location affecting resolution Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms diff --git a/tests/baselines/reference/tsserver/fourslashServer/autoImportProvider_exportMap6.js b/tests/baselines/reference/tsserver/fourslashServer/autoImportProvider_exportMap6.js index 51e72004668ea..9a337eed8109a 100644 --- a/tests/baselines/reference/tsserver/fourslashServer/autoImportProvider_exportMap6.js +++ b/tests/baselines/reference/tsserver/fourslashServer/autoImportProvider_exportMap6.js @@ -161,7 +161,6 @@ Info seq [hh:mm:ss:mss] event: "diagnostics": [] } } -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /tsconfig.json ProjectRootPath: undefined:: Result: undefined Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /node_modules/@types/dependency/package.json 2000 undefined Project: /dev/null/inferredProject1* WatchType: File location affecting resolution Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms diff --git a/tests/baselines/reference/tsserver/fourslashServer/autoImportProvider_exportMap7.js b/tests/baselines/reference/tsserver/fourslashServer/autoImportProvider_exportMap7.js index 65bc82cbe3961..0f3be23f9e694 100644 --- a/tests/baselines/reference/tsserver/fourslashServer/autoImportProvider_exportMap7.js +++ b/tests/baselines/reference/tsserver/fourslashServer/autoImportProvider_exportMap7.js @@ -147,7 +147,6 @@ Info seq [hh:mm:ss:mss] event: "diagnostics": [] } } -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /tsconfig.json ProjectRootPath: undefined:: Result: undefined Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) diff --git a/tests/baselines/reference/tsserver/fourslashServer/autoImportProvider_exportMap8.js b/tests/baselines/reference/tsserver/fourslashServer/autoImportProvider_exportMap8.js index a9719baf147b6..e953ab0ecfdf6 100644 --- a/tests/baselines/reference/tsserver/fourslashServer/autoImportProvider_exportMap8.js +++ b/tests/baselines/reference/tsserver/fourslashServer/autoImportProvider_exportMap8.js @@ -146,7 +146,6 @@ Info seq [hh:mm:ss:mss] event: "diagnostics": [] } } -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /tsconfig.json ProjectRootPath: undefined:: Result: undefined Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) diff --git a/tests/baselines/reference/tsserver/fourslashServer/autoImportProvider_exportMap9.js b/tests/baselines/reference/tsserver/fourslashServer/autoImportProvider_exportMap9.js index 705a96b86ed99..fe3b7b00eb85b 100644 --- a/tests/baselines/reference/tsserver/fourslashServer/autoImportProvider_exportMap9.js +++ b/tests/baselines/reference/tsserver/fourslashServer/autoImportProvider_exportMap9.js @@ -136,7 +136,6 @@ Info seq [hh:mm:ss:mss] event: "diagnostics": [] } } -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /tsconfig.json ProjectRootPath: undefined:: Result: undefined Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) diff --git a/tests/baselines/reference/tsserver/fourslashServer/autoImportProvider_importsMap1.js b/tests/baselines/reference/tsserver/fourslashServer/autoImportProvider_importsMap1.js index 7a90e4c4c954c..4909321788149 100644 --- a/tests/baselines/reference/tsserver/fourslashServer/autoImportProvider_importsMap1.js +++ b/tests/baselines/reference/tsserver/fourslashServer/autoImportProvider_importsMap1.js @@ -136,7 +136,6 @@ Info seq [hh:mm:ss:mss] event: "diagnostics": [] } } -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /tsconfig.json ProjectRootPath: undefined:: Result: undefined Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) diff --git a/tests/baselines/reference/tsserver/fourslashServer/autoImportProvider_importsMap2.js b/tests/baselines/reference/tsserver/fourslashServer/autoImportProvider_importsMap2.js index 1a022712a4db5..29669e8a4b3a0 100644 --- a/tests/baselines/reference/tsserver/fourslashServer/autoImportProvider_importsMap2.js +++ b/tests/baselines/reference/tsserver/fourslashServer/autoImportProvider_importsMap2.js @@ -124,7 +124,6 @@ Info seq [hh:mm:ss:mss] event: "diagnostics": [] } } -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /tsconfig.json ProjectRootPath: undefined:: Result: undefined Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) diff --git a/tests/baselines/reference/tsserver/fourslashServer/autoImportProvider_importsMap3.js b/tests/baselines/reference/tsserver/fourslashServer/autoImportProvider_importsMap3.js index 13b17b6682bc8..c7018a94f6bf1 100644 --- a/tests/baselines/reference/tsserver/fourslashServer/autoImportProvider_importsMap3.js +++ b/tests/baselines/reference/tsserver/fourslashServer/autoImportProvider_importsMap3.js @@ -124,7 +124,6 @@ Info seq [hh:mm:ss:mss] event: "diagnostics": [] } } -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /tsconfig.json ProjectRootPath: undefined:: Result: undefined Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) diff --git a/tests/baselines/reference/tsserver/fourslashServer/autoImportProvider_importsMap4.js b/tests/baselines/reference/tsserver/fourslashServer/autoImportProvider_importsMap4.js index 2ffac7c8db6d0..335c1022b4fcb 100644 --- a/tests/baselines/reference/tsserver/fourslashServer/autoImportProvider_importsMap4.js +++ b/tests/baselines/reference/tsserver/fourslashServer/autoImportProvider_importsMap4.js @@ -127,7 +127,6 @@ Info seq [hh:mm:ss:mss] event: "diagnostics": [] } } -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /tsconfig.json ProjectRootPath: undefined:: Result: undefined Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) diff --git a/tests/baselines/reference/tsserver/fourslashServer/autoImportProvider_importsMap5.js b/tests/baselines/reference/tsserver/fourslashServer/autoImportProvider_importsMap5.js index 23befedc223b4..1009e7acbb374 100644 --- a/tests/baselines/reference/tsserver/fourslashServer/autoImportProvider_importsMap5.js +++ b/tests/baselines/reference/tsserver/fourslashServer/autoImportProvider_importsMap5.js @@ -144,7 +144,6 @@ Info seq [hh:mm:ss:mss] event: ] } } -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /tsconfig.json ProjectRootPath: undefined:: Result: undefined Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) diff --git a/tests/baselines/reference/tsserver/fourslashServer/autoImportProvider_pnpm.js b/tests/baselines/reference/tsserver/fourslashServer/autoImportProvider_pnpm.js index 8ae6d39cf5061..cbcc1c137bcfb 100644 --- a/tests/baselines/reference/tsserver/fourslashServer/autoImportProvider_pnpm.js +++ b/tests/baselines/reference/tsserver/fourslashServer/autoImportProvider_pnpm.js @@ -108,7 +108,6 @@ Info seq [hh:mm:ss:mss] event: "diagnostics": [] } } -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /tsconfig.json ProjectRootPath: undefined:: Result: undefined Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) diff --git a/tests/baselines/reference/tsserver/fourslashServer/autoImportProvider_referencesCrash.js b/tests/baselines/reference/tsserver/fourslashServer/autoImportProvider_referencesCrash.js index d450527844d9a..3673e20e3bdce 100644 --- a/tests/baselines/reference/tsserver/fourslashServer/autoImportProvider_referencesCrash.js +++ b/tests/baselines/reference/tsserver/fourslashServer/autoImportProvider_referencesCrash.js @@ -123,7 +123,6 @@ Info seq [hh:mm:ss:mss] event: "diagnostics": [] } } -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /a/tsconfig.json ProjectRootPath: undefined:: Result: undefined Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) diff --git a/tests/baselines/reference/tsserver/fourslashServer/autoImportReExportFromAmbientModule.js b/tests/baselines/reference/tsserver/fourslashServer/autoImportReExportFromAmbientModule.js index 3d62824418ed0..a008d168b4629 100644 --- a/tests/baselines/reference/tsserver/fourslashServer/autoImportReExportFromAmbientModule.js +++ b/tests/baselines/reference/tsserver/fourslashServer/autoImportReExportFromAmbientModule.js @@ -120,7 +120,6 @@ Info seq [hh:mm:ss:mss] event: "diagnostics": [] } } -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /tsconfig.json ProjectRootPath: undefined:: Result: undefined Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /node_modules/@types/fs-extra/package.json 2000 undefined Project: /dev/null/inferredProject1* WatchType: File location affecting resolution Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /node_modules/@types/node/package.json 2000 undefined Project: /dev/null/inferredProject1* WatchType: File location affecting resolution diff --git a/tests/baselines/reference/tsserver/fourslashServer/autoImportRelativePathToMonorepoPackage.js b/tests/baselines/reference/tsserver/fourslashServer/autoImportRelativePathToMonorepoPackage.js index cbe3e5e6343d0..5303b2d3b4259 100644 --- a/tests/baselines/reference/tsserver/fourslashServer/autoImportRelativePathToMonorepoPackage.js +++ b/tests/baselines/reference/tsserver/fourslashServer/autoImportRelativePathToMonorepoPackage.js @@ -133,7 +133,6 @@ Info seq [hh:mm:ss:mss] event: "diagnostics": [] } } -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /tsconfig.json ProjectRootPath: undefined:: Result: undefined Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) diff --git a/tests/baselines/reference/tsserver/fourslashServer/completionsImport_addToNamedWithDifferentCacheValue.js b/tests/baselines/reference/tsserver/fourslashServer/completionsImport_addToNamedWithDifferentCacheValue.js index 5de871b5aa44b..222f353826af2 100644 --- a/tests/baselines/reference/tsserver/fourslashServer/completionsImport_addToNamedWithDifferentCacheValue.js +++ b/tests/baselines/reference/tsserver/fourslashServer/completionsImport_addToNamedWithDifferentCacheValue.js @@ -142,7 +142,6 @@ Info seq [hh:mm:ss:mss] event: "diagnostics": [] } } -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /tsconfig.json ProjectRootPath: undefined:: Result: undefined Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) diff --git a/tests/baselines/reference/tsserver/fourslashServer/completionsImport_computedSymbolName.js b/tests/baselines/reference/tsserver/fourslashServer/completionsImport_computedSymbolName.js index 7ae432a29bb9b..f419b03f17372 100644 --- a/tests/baselines/reference/tsserver/fourslashServer/completionsImport_computedSymbolName.js +++ b/tests/baselines/reference/tsserver/fourslashServer/completionsImport_computedSymbolName.js @@ -132,7 +132,6 @@ Info seq [hh:mm:ss:mss] event: "diagnostics": [] } } -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /tsconfig.json ProjectRootPath: undefined:: Result: undefined Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /node_modules/@types/node/package.json 2000 undefined Project: /dev/null/inferredProject1* WatchType: File location affecting resolution Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /node_modules/@types/ts-node/package.json 2000 undefined Project: /dev/null/inferredProject1* WatchType: File location affecting resolution diff --git a/tests/baselines/reference/tsserver/fourslashServer/completionsImport_defaultAndNamedConflict_server.js b/tests/baselines/reference/tsserver/fourslashServer/completionsImport_defaultAndNamedConflict_server.js index 0b0dfd17ec6df..98ec284338fbc 100644 --- a/tests/baselines/reference/tsserver/fourslashServer/completionsImport_defaultAndNamedConflict_server.js +++ b/tests/baselines/reference/tsserver/fourslashServer/completionsImport_defaultAndNamedConflict_server.js @@ -122,7 +122,6 @@ Info seq [hh:mm:ss:mss] event: ] } } -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /tsconfig.json ProjectRootPath: undefined:: Result: undefined Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined Project: /dev/null/inferredProject1* WatchType: Missing file Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms diff --git a/tests/baselines/reference/tsserver/fourslashServer/completionsImport_jsModuleExportsAssignment.js b/tests/baselines/reference/tsserver/fourslashServer/completionsImport_jsModuleExportsAssignment.js index b8422d79e5b20..da08ad59580be 100644 --- a/tests/baselines/reference/tsserver/fourslashServer/completionsImport_jsModuleExportsAssignment.js +++ b/tests/baselines/reference/tsserver/fourslashServer/completionsImport_jsModuleExportsAssignment.js @@ -127,7 +127,6 @@ Info seq [hh:mm:ss:mss] event: ] } } -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /tsconfig.json ProjectRootPath: undefined:: Result: undefined Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) diff --git a/tests/baselines/reference/tsserver/fourslashServer/completionsImport_mergedReExport.js b/tests/baselines/reference/tsserver/fourslashServer/completionsImport_mergedReExport.js index 7b6c42054d4cc..392aff2eef8a8 100644 --- a/tests/baselines/reference/tsserver/fourslashServer/completionsImport_mergedReExport.js +++ b/tests/baselines/reference/tsserver/fourslashServer/completionsImport_mergedReExport.js @@ -123,7 +123,6 @@ Info seq [hh:mm:ss:mss] event: "diagnostics": [] } } -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /tsconfig.json ProjectRootPath: undefined:: Result: undefined Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) diff --git a/tests/baselines/reference/tsserver/fourslashServer/completionsImport_sortingModuleSpecifiers.js b/tests/baselines/reference/tsserver/fourslashServer/completionsImport_sortingModuleSpecifiers.js index 47a4af1eac5b7..641e53b808c92 100644 --- a/tests/baselines/reference/tsserver/fourslashServer/completionsImport_sortingModuleSpecifiers.js +++ b/tests/baselines/reference/tsserver/fourslashServer/completionsImport_sortingModuleSpecifiers.js @@ -117,7 +117,6 @@ Info seq [hh:mm:ss:mss] event: "diagnostics": [] } } -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /tests/cases/fourslash/server/tsconfig.json ProjectRootPath: undefined:: Result: undefined Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations diff --git a/tests/baselines/reference/tsserver/fourslashServer/completionsOverridingMethodCrash2.js b/tests/baselines/reference/tsserver/fourslashServer/completionsOverridingMethodCrash2.js index 910b66c3723eb..117b5f6b06f2e 100644 --- a/tests/baselines/reference/tsserver/fourslashServer/completionsOverridingMethodCrash2.js +++ b/tests/baselines/reference/tsserver/fourslashServer/completionsOverridingMethodCrash2.js @@ -123,7 +123,6 @@ Info seq [hh:mm:ss:mss] event: "diagnostics": [] } } -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /tsconfig.json ProjectRootPath: undefined:: Result: undefined Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) diff --git a/tests/baselines/reference/tsserver/fourslashServer/configurePlugin.js b/tests/baselines/reference/tsserver/fourslashServer/configurePlugin.js index 8be78f867d90f..336751b1978ef 100644 --- a/tests/baselines/reference/tsserver/fourslashServer/configurePlugin.js +++ b/tests/baselines/reference/tsserver/fourslashServer/configurePlugin.js @@ -116,7 +116,6 @@ Info seq [hh:mm:ss:mss] event: "diagnostics": [] } } -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /tests/cases/fourslash/server/tsconfig.json ProjectRootPath: undefined:: Result: undefined Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations diff --git a/tests/baselines/reference/tsserver/fourslashServer/declarationMapsEnableMapping_NoInline.js b/tests/baselines/reference/tsserver/fourslashServer/declarationMapsEnableMapping_NoInline.js index ef26d4f97b122..2099bde1dba76 100644 --- a/tests/baselines/reference/tsserver/fourslashServer/declarationMapsEnableMapping_NoInline.js +++ b/tests/baselines/reference/tsserver/fourslashServer/declarationMapsEnableMapping_NoInline.js @@ -161,7 +161,6 @@ Info seq [hh:mm:ss:mss] event: "diagnostics": [] } } -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /tsconfig.json ProjectRootPath: undefined:: Result: undefined Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) @@ -381,7 +380,6 @@ Info seq [hh:mm:ss:mss] request: "command": "open" } Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /mymodule.ts ProjectRootPath: undefined:: Result: /tsconfig.json -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /tsconfig.json ProjectRootPath: undefined:: Result: undefined Info seq [hh:mm:ss:mss] event: { "seq": 0, diff --git a/tests/baselines/reference/tsserver/fourslashServer/declarationMapsEnableMapping_NoInlineSources.js b/tests/baselines/reference/tsserver/fourslashServer/declarationMapsEnableMapping_NoInlineSources.js index 69848a7685bd1..f0412731ba954 100644 --- a/tests/baselines/reference/tsserver/fourslashServer/declarationMapsEnableMapping_NoInlineSources.js +++ b/tests/baselines/reference/tsserver/fourslashServer/declarationMapsEnableMapping_NoInlineSources.js @@ -163,7 +163,6 @@ Info seq [hh:mm:ss:mss] event: "diagnostics": [] } } -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /tsconfig.json ProjectRootPath: undefined:: Result: undefined Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) @@ -383,7 +382,6 @@ Info seq [hh:mm:ss:mss] request: "command": "open" } Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /mymodule.ts ProjectRootPath: undefined:: Result: /tsconfig.json -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /tsconfig.json ProjectRootPath: undefined:: Result: undefined Info seq [hh:mm:ss:mss] event: { "seq": 0, diff --git a/tests/baselines/reference/tsserver/fourslashServer/declarationMapsGeneratedMapsEnableMapping.js b/tests/baselines/reference/tsserver/fourslashServer/declarationMapsGeneratedMapsEnableMapping.js index 64c4ea44f364f..66aba0223826e 100644 --- a/tests/baselines/reference/tsserver/fourslashServer/declarationMapsGeneratedMapsEnableMapping.js +++ b/tests/baselines/reference/tsserver/fourslashServer/declarationMapsGeneratedMapsEnableMapping.js @@ -159,7 +159,6 @@ Info seq [hh:mm:ss:mss] event: "diagnostics": [] } } -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /tsconfig.json ProjectRootPath: undefined:: Result: undefined Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) @@ -379,7 +378,6 @@ Info seq [hh:mm:ss:mss] request: "command": "open" } Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /mymodule.ts ProjectRootPath: undefined:: Result: /tsconfig.json -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /tsconfig.json ProjectRootPath: undefined:: Result: undefined Info seq [hh:mm:ss:mss] event: { "seq": 0, diff --git a/tests/baselines/reference/tsserver/fourslashServer/declarationMapsGeneratedMapsEnableMapping2.js b/tests/baselines/reference/tsserver/fourslashServer/declarationMapsGeneratedMapsEnableMapping2.js index 4ef839c4773dc..8ed6a916f71b6 100644 --- a/tests/baselines/reference/tsserver/fourslashServer/declarationMapsGeneratedMapsEnableMapping2.js +++ b/tests/baselines/reference/tsserver/fourslashServer/declarationMapsGeneratedMapsEnableMapping2.js @@ -166,7 +166,6 @@ Info seq [hh:mm:ss:mss] event: "diagnostics": [] } } -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /tsconfig.json ProjectRootPath: undefined:: Result: undefined Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) @@ -391,7 +390,6 @@ Info seq [hh:mm:ss:mss] request: "command": "open" } Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /mymodule.ts ProjectRootPath: undefined:: Result: /tsconfig.json -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /tsconfig.json ProjectRootPath: undefined:: Result: undefined Info seq [hh:mm:ss:mss] event: { "seq": 0, diff --git a/tests/baselines/reference/tsserver/fourslashServer/declarationMapsGeneratedMapsEnableMapping3.js b/tests/baselines/reference/tsserver/fourslashServer/declarationMapsGeneratedMapsEnableMapping3.js index 7312ebd7adcb5..9d7284d1ff576 100644 --- a/tests/baselines/reference/tsserver/fourslashServer/declarationMapsGeneratedMapsEnableMapping3.js +++ b/tests/baselines/reference/tsserver/fourslashServer/declarationMapsGeneratedMapsEnableMapping3.js @@ -176,7 +176,6 @@ Info seq [hh:mm:ss:mss] event: ] } } -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /tsconfig.json ProjectRootPath: undefined:: Result: undefined Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) @@ -396,7 +395,6 @@ Info seq [hh:mm:ss:mss] request: "command": "open" } Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /mymodule.ts ProjectRootPath: undefined:: Result: /tsconfig.json -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /tsconfig.json ProjectRootPath: undefined:: Result: undefined Info seq [hh:mm:ss:mss] event: { "seq": 0, diff --git a/tests/baselines/reference/tsserver/fourslashServer/getFileReferences_deduplicate.js b/tests/baselines/reference/tsserver/fourslashServer/getFileReferences_deduplicate.js index 549faec089fe0..a08538741bc86 100644 --- a/tests/baselines/reference/tsserver/fourslashServer/getFileReferences_deduplicate.js +++ b/tests/baselines/reference/tsserver/fourslashServer/getFileReferences_deduplicate.js @@ -306,7 +306,6 @@ Info seq [hh:mm:ss:mss] event: ] } } -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /tsconfig.json ProjectRootPath: undefined:: Result: undefined Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) diff --git a/tests/baselines/reference/tsserver/fourslashServer/getFileReferences_server1.js b/tests/baselines/reference/tsserver/fourslashServer/getFileReferences_server1.js index 0e2949931f192..60d997753ee9a 100644 --- a/tests/baselines/reference/tsserver/fourslashServer/getFileReferences_server1.js +++ b/tests/baselines/reference/tsserver/fourslashServer/getFileReferences_server1.js @@ -121,7 +121,6 @@ Info seq [hh:mm:ss:mss] event: "diagnostics": [] } } -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /project/tsconfig.json ProjectRootPath: undefined:: Result: undefined Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) diff --git a/tests/baselines/reference/tsserver/fourslashServer/getFileReferences_server2.js b/tests/baselines/reference/tsserver/fourslashServer/getFileReferences_server2.js index e1c21ae58d427..fe4c169cdb6e1 100644 --- a/tests/baselines/reference/tsserver/fourslashServer/getFileReferences_server2.js +++ b/tests/baselines/reference/tsserver/fourslashServer/getFileReferences_server2.js @@ -337,7 +337,6 @@ Info seq [hh:mm:ss:mss] event: "diagnostics": [] } } -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /tsconfig.json ProjectRootPath: undefined:: Result: undefined Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) diff --git a/tests/baselines/reference/tsserver/fourslashServer/goToSource15_bundler.js b/tests/baselines/reference/tsserver/fourslashServer/goToSource15_bundler.js index c4f6c64bd6fab..78d1d976ce5e6 100644 --- a/tests/baselines/reference/tsserver/fourslashServer/goToSource15_bundler.js +++ b/tests/baselines/reference/tsserver/fourslashServer/goToSource15_bundler.js @@ -124,7 +124,6 @@ Info seq [hh:mm:ss:mss] event: "diagnostics": [] } } -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /tsconfig.json ProjectRootPath: undefined:: Result: undefined Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) diff --git a/tests/baselines/reference/tsserver/fourslashServer/impliedNodeFormat.js b/tests/baselines/reference/tsserver/fourslashServer/impliedNodeFormat.js index 11fc6ede5dc62..e0a3531674e6b 100644 --- a/tests/baselines/reference/tsserver/fourslashServer/impliedNodeFormat.js +++ b/tests/baselines/reference/tsserver/fourslashServer/impliedNodeFormat.js @@ -112,7 +112,6 @@ Info seq [hh:mm:ss:mss] event: "diagnostics": [] } } -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /tsconfig.json ProjectRootPath: undefined:: Result: undefined Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) diff --git a/tests/baselines/reference/tsserver/fourslashServer/importFixes_ambientCircularDefaultCrash.js b/tests/baselines/reference/tsserver/fourslashServer/importFixes_ambientCircularDefaultCrash.js index 01a73d2ee55bd..1ebbbb43de89c 100644 --- a/tests/baselines/reference/tsserver/fourslashServer/importFixes_ambientCircularDefaultCrash.js +++ b/tests/baselines/reference/tsserver/fourslashServer/importFixes_ambientCircularDefaultCrash.js @@ -113,7 +113,6 @@ Info seq [hh:mm:ss:mss] event: "diagnostics": [] } } -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /tsconfig.json ProjectRootPath: undefined:: Result: undefined Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) diff --git a/tests/baselines/reference/tsserver/fourslashServer/importNameCodeFix_externalNonRelateive2.js b/tests/baselines/reference/tsserver/fourslashServer/importNameCodeFix_externalNonRelateive2.js index d179e3a367e9a..a8bbe4593f0db 100644 --- a/tests/baselines/reference/tsserver/fourslashServer/importNameCodeFix_externalNonRelateive2.js +++ b/tests/baselines/reference/tsserver/fourslashServer/importNameCodeFix_externalNonRelateive2.js @@ -141,7 +141,6 @@ Info seq [hh:mm:ss:mss] event: "diagnostics": [] } } -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /apps/app1/tsconfig.json ProjectRootPath: undefined:: Result: undefined Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) diff --git a/tests/baselines/reference/tsserver/fourslashServer/importNameCodeFix_pnpm1.js b/tests/baselines/reference/tsserver/fourslashServer/importNameCodeFix_pnpm1.js index 9693d660af6d9..18dfb69aebd36 100644 --- a/tests/baselines/reference/tsserver/fourslashServer/importNameCodeFix_pnpm1.js +++ b/tests/baselines/reference/tsserver/fourslashServer/importNameCodeFix_pnpm1.js @@ -106,7 +106,6 @@ Info seq [hh:mm:ss:mss] event: "diagnostics": [] } } -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /project/tsconfig.json ProjectRootPath: undefined:: Result: undefined Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /project/node_modules/.pnpm/@types+react@17.0.7/node_modules/@types/react/package.json 2000 undefined Project: /dev/null/inferredProject1* WatchType: File location affecting resolution Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /project/node_modules/.pnpm/@types+react@17.0.7/node_modules/@types/package.json 2000 undefined Project: /dev/null/inferredProject1* WatchType: File location affecting resolution diff --git a/tests/baselines/reference/tsserver/fourslashServer/importStatementCompletions_pnpm1.js b/tests/baselines/reference/tsserver/fourslashServer/importStatementCompletions_pnpm1.js index 0a388404faf9f..5434281eacb3d 100644 --- a/tests/baselines/reference/tsserver/fourslashServer/importStatementCompletions_pnpm1.js +++ b/tests/baselines/reference/tsserver/fourslashServer/importStatementCompletions_pnpm1.js @@ -106,7 +106,6 @@ Info seq [hh:mm:ss:mss] event: "diagnostics": [] } } -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /project/tsconfig.json ProjectRootPath: undefined:: Result: undefined Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /project/node_modules/.pnpm/@types+react@17.0.7/node_modules/@types/react/package.json 2000 undefined Project: /dev/null/inferredProject1* WatchType: File location affecting resolution Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /project/node_modules/.pnpm/@types+react@17.0.7/node_modules/@types/package.json 2000 undefined Project: /dev/null/inferredProject1* WatchType: File location affecting resolution diff --git a/tests/baselines/reference/tsserver/fourslashServer/importStatementCompletions_pnpmTransitive.js b/tests/baselines/reference/tsserver/fourslashServer/importStatementCompletions_pnpmTransitive.js index c1f99beaf193f..e49b65b0c7ba3 100644 --- a/tests/baselines/reference/tsserver/fourslashServer/importStatementCompletions_pnpmTransitive.js +++ b/tests/baselines/reference/tsserver/fourslashServer/importStatementCompletions_pnpmTransitive.js @@ -118,7 +118,6 @@ Info seq [hh:mm:ss:mss] event: "diagnostics": [] } } -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /project/tsconfig.json ProjectRootPath: undefined:: Result: undefined Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /project/node_modules/.pnpm/csstype@3.0.8/node_modules/csstype/package.json 2000 undefined Project: /dev/null/inferredProject1* WatchType: File location affecting resolution Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /project/node_modules/.pnpm/csstype@3.0.8/node_modules/package.json 2000 undefined Project: /dev/null/inferredProject1* WatchType: File location affecting resolution diff --git a/tests/baselines/reference/tsserver/fourslashServer/importSuggestionsCache_ambient.js b/tests/baselines/reference/tsserver/fourslashServer/importSuggestionsCache_ambient.js index d6fbb1ea1a370..aafe8e99d1ddd 100644 --- a/tests/baselines/reference/tsserver/fourslashServer/importSuggestionsCache_ambient.js +++ b/tests/baselines/reference/tsserver/fourslashServer/importSuggestionsCache_ambient.js @@ -101,7 +101,6 @@ Info seq [hh:mm:ss:mss] event: "diagnostics": [] } } -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /tsconfig.json ProjectRootPath: undefined:: Result: undefined Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) diff --git a/tests/baselines/reference/tsserver/fourslashServer/importSuggestionsCache_coreNodeModules.js b/tests/baselines/reference/tsserver/fourslashServer/importSuggestionsCache_coreNodeModules.js index b22577f1c5256..6cda5b0aaa8c4 100644 --- a/tests/baselines/reference/tsserver/fourslashServer/importSuggestionsCache_coreNodeModules.js +++ b/tests/baselines/reference/tsserver/fourslashServer/importSuggestionsCache_coreNodeModules.js @@ -141,7 +141,6 @@ Info seq [hh:mm:ss:mss] event: ] } } -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /tsconfig.json ProjectRootPath: undefined:: Result: undefined Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /node_modules/@types/node/package.json 2000 undefined Project: /dev/null/inferredProject1* WatchType: File location affecting resolution Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms diff --git a/tests/baselines/reference/tsserver/fourslashServer/importSuggestionsCache_exportUndefined.js b/tests/baselines/reference/tsserver/fourslashServer/importSuggestionsCache_exportUndefined.js index e6ca00b5d71c7..1074b15df190b 100644 --- a/tests/baselines/reference/tsserver/fourslashServer/importSuggestionsCache_exportUndefined.js +++ b/tests/baselines/reference/tsserver/fourslashServer/importSuggestionsCache_exportUndefined.js @@ -115,7 +115,6 @@ Info seq [hh:mm:ss:mss] event: "diagnostics": [] } } -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /tsconfig.json ProjectRootPath: undefined:: Result: undefined Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) diff --git a/tests/baselines/reference/tsserver/fourslashServer/importSuggestionsCache_invalidPackageJson.js b/tests/baselines/reference/tsserver/fourslashServer/importSuggestionsCache_invalidPackageJson.js index cc255143c2268..70ab7c39ab6c0 100644 --- a/tests/baselines/reference/tsserver/fourslashServer/importSuggestionsCache_invalidPackageJson.js +++ b/tests/baselines/reference/tsserver/fourslashServer/importSuggestionsCache_invalidPackageJson.js @@ -124,7 +124,6 @@ Info seq [hh:mm:ss:mss] event: "diagnostics": [] } } -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /jsconfig.json ProjectRootPath: undefined:: Result: undefined Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /node_modules/@types/node/package.json 2000 undefined Project: /dev/null/inferredProject1* WatchType: File location affecting resolution Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms diff --git a/tests/baselines/reference/tsserver/fourslashServer/importSuggestionsCache_moduleAugmentation.js b/tests/baselines/reference/tsserver/fourslashServer/importSuggestionsCache_moduleAugmentation.js index 6fda92b60d527..673f4ddbb6d3f 100644 --- a/tests/baselines/reference/tsserver/fourslashServer/importSuggestionsCache_moduleAugmentation.js +++ b/tests/baselines/reference/tsserver/fourslashServer/importSuggestionsCache_moduleAugmentation.js @@ -112,7 +112,6 @@ Info seq [hh:mm:ss:mss] event: "diagnostics": [] } } -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /tsconfig.json ProjectRootPath: undefined:: Result: undefined Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /node_modules/@types/react/package.json 2000 undefined Project: /dev/null/inferredProject1* WatchType: File location affecting resolution Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms diff --git a/tests/baselines/reference/tsserver/fourslashServer/ngProxy1.js b/tests/baselines/reference/tsserver/fourslashServer/ngProxy1.js index 5023d8df35afc..b466d753b15d5 100644 --- a/tests/baselines/reference/tsserver/fourslashServer/ngProxy1.js +++ b/tests/baselines/reference/tsserver/fourslashServer/ngProxy1.js @@ -116,7 +116,6 @@ Info seq [hh:mm:ss:mss] event: "diagnostics": [] } } -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /tests/cases/fourslash/server/tsconfig.json ProjectRootPath: undefined:: Result: undefined Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations diff --git a/tests/baselines/reference/tsserver/fourslashServer/ngProxy2.js b/tests/baselines/reference/tsserver/fourslashServer/ngProxy2.js index 9263cfc2b2254..952656ca4815e 100644 --- a/tests/baselines/reference/tsserver/fourslashServer/ngProxy2.js +++ b/tests/baselines/reference/tsserver/fourslashServer/ngProxy2.js @@ -116,7 +116,6 @@ Info seq [hh:mm:ss:mss] event: "diagnostics": [] } } -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /tests/cases/fourslash/server/tsconfig.json ProjectRootPath: undefined:: Result: undefined Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations diff --git a/tests/baselines/reference/tsserver/fourslashServer/ngProxy3.js b/tests/baselines/reference/tsserver/fourslashServer/ngProxy3.js index 0015d0eb038d5..fa078e712831a 100644 --- a/tests/baselines/reference/tsserver/fourslashServer/ngProxy3.js +++ b/tests/baselines/reference/tsserver/fourslashServer/ngProxy3.js @@ -115,7 +115,6 @@ Info seq [hh:mm:ss:mss] event: "diagnostics": [] } } -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /tests/cases/fourslash/server/tsconfig.json ProjectRootPath: undefined:: Result: undefined Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations diff --git a/tests/baselines/reference/tsserver/fourslashServer/ngProxy4.js b/tests/baselines/reference/tsserver/fourslashServer/ngProxy4.js index cf6cf84a4a7ad..f838a472a4f3a 100644 --- a/tests/baselines/reference/tsserver/fourslashServer/ngProxy4.js +++ b/tests/baselines/reference/tsserver/fourslashServer/ngProxy4.js @@ -115,7 +115,6 @@ Info seq [hh:mm:ss:mss] event: "diagnostics": [] } } -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /tests/cases/fourslash/server/tsconfig.json ProjectRootPath: undefined:: Result: undefined Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations diff --git a/tests/baselines/reference/tsserver/fourslashServer/nodeNextModuleKindCaching1.js b/tests/baselines/reference/tsserver/fourslashServer/nodeNextModuleKindCaching1.js index b0011721774b9..68b5a0686c68a 100644 --- a/tests/baselines/reference/tsserver/fourslashServer/nodeNextModuleKindCaching1.js +++ b/tests/baselines/reference/tsserver/fourslashServer/nodeNextModuleKindCaching1.js @@ -180,7 +180,6 @@ Info seq [hh:mm:ss:mss] event: ] } } -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /tests/cases/fourslash/server/tsconfig.json ProjectRootPath: undefined:: Result: undefined Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info diff --git a/tests/baselines/reference/tsserver/fourslashServer/referencesInEmptyFileWithMultipleProjects.js b/tests/baselines/reference/tsserver/fourslashServer/referencesInEmptyFileWithMultipleProjects.js index 51a458b46e826..4f545cf852334 100644 --- a/tests/baselines/reference/tsserver/fourslashServer/referencesInEmptyFileWithMultipleProjects.js +++ b/tests/baselines/reference/tsserver/fourslashServer/referencesInEmptyFileWithMultipleProjects.js @@ -101,7 +101,6 @@ Info seq [hh:mm:ss:mss] event: "diagnostics": [] } } -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /a/tsconfig.json ProjectRootPath: undefined:: Result: undefined Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) diff --git a/tests/baselines/reference/tsserver/fourslashServer/referencesInStringLiteralValueWithMultipleProjects.js b/tests/baselines/reference/tsserver/fourslashServer/referencesInStringLiteralValueWithMultipleProjects.js index 8e403ca25c484..bd92af73a6c4c 100644 --- a/tests/baselines/reference/tsserver/fourslashServer/referencesInStringLiteralValueWithMultipleProjects.js +++ b/tests/baselines/reference/tsserver/fourslashServer/referencesInStringLiteralValueWithMultipleProjects.js @@ -101,7 +101,6 @@ Info seq [hh:mm:ss:mss] event: "diagnostics": [] } } -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /a/tsconfig.json ProjectRootPath: undefined:: Result: undefined Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) diff --git a/tests/baselines/reference/tsserver/fourslashServer/renameNamedImport.js b/tests/baselines/reference/tsserver/fourslashServer/renameNamedImport.js index 76b8b1494e4b7..a9c1735ca628d 100644 --- a/tests/baselines/reference/tsserver/fourslashServer/renameNamedImport.js +++ b/tests/baselines/reference/tsserver/fourslashServer/renameNamedImport.js @@ -103,92 +103,6 @@ Info seq [hh:mm:ss:mss] event: "diagnostics": [] } } -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /lib/tsconfig.json ProjectRootPath: undefined:: Result: /tsconfig.json -Info seq [hh:mm:ss:mss] Creating configuration project /tsconfig.json -Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tsconfig.json 2000 undefined Project: /tsconfig.json WatchType: Config file -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "projectLoadingStart", - "body": { - "projectName": "/tsconfig.json", - "reason": "Creating possible configured project for /lib/tsconfig.json to open" - } - } -Info seq [hh:mm:ss:mss] Config: /tsconfig.json : { - "rootNames": [ - "/lib.d.ts", - "/lib.decorators.d.ts", - "/lib.decorators.legacy.d.ts", - "/lib/index.ts", - "/src/index.ts" - ], - "options": { - "configFilePath": "/tsconfig.json" - } -} -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: 1 undefined Config: /tsconfig.json WatchType: Wild card directory -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: 1 undefined Config: /tsconfig.json WatchType: Wild card directory -Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /src/index.ts 500 undefined WatchType: Closed Script info -Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /tsconfig.json -Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /tsconfig.json projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms -Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (5) - /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text - /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text - /lib.d.ts Text-1 lib.d.ts-Text - /lib/index.ts Text-1 "const unrelatedLocalVariable = 123;\nexport const someExportedVariable = unrelatedLocalVariable;" - /src/index.ts Text-1 "import { someExportedVariable } from '../lib/index';\nsomeExportedVariable;" - - - lib.decorators.d.ts - Library referenced via 'decorators' from file 'lib.d.ts' - Matched by default include pattern '**/*' - lib.decorators.legacy.d.ts - Library referenced via 'decorators.legacy' from file 'lib.d.ts' - Matched by default include pattern '**/*' - lib.d.ts - Matched by default include pattern '**/*' - lib/index.ts - Matched by default include pattern '**/*' - Imported via '../lib/index' from file 'src/index.ts' - src/index.ts - Matched by default include pattern '**/*' - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "projectLoadingFinish", - "body": { - "projectName": "/tsconfig.json" - } - } -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "configFileDiag", - "body": { - "triggerFile": "/lib/tsconfig.json", - "configFile": "/tsconfig.json", - "diagnostics": [] - } - } -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /tsconfig.json ProjectRootPath: undefined:: Result: undefined -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "configFileDiag", - "body": { - "triggerFile": "/lib/tsconfig.json", - "configFile": "/tsconfig.json", - "diagnostics": [] - } - } Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) @@ -212,10 +126,6 @@ Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Project '/lib/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (4) -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (5) - Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) Info seq [hh:mm:ss:mss] Files (4) @@ -247,14 +157,8 @@ watchedFiles:: {"pollingInterval":500} /lib/tsconfig.json: *new* {"pollingInterval":2000} -/src/index.ts: *new* - {"pollingInterval":500} -/tsconfig.json: *new* - {"pollingInterval":2000} watchedDirectoriesRecursive:: -: *new* - {} /lib: *new* {} @@ -266,43 +170,31 @@ Projects:: projectStateVersion: 1 projectProgramVersion: 1 noOpenRef: true -/tsconfig.json (Configured) *new* - projectStateVersion: 1 - projectProgramVersion: 1 - noOpenRef: true ScriptInfos:: /lib.d.ts *new* version: Text-1 - containingProjects: 3 + containingProjects: 2 /lib/tsconfig.json - /tsconfig.json /dev/null/inferredProject1* /lib.decorators.d.ts *new* version: Text-1 - containingProjects: 3 + containingProjects: 2 /lib/tsconfig.json - /tsconfig.json /dev/null/inferredProject1* /lib.decorators.legacy.d.ts *new* version: Text-1 - containingProjects: 3 + containingProjects: 2 /lib/tsconfig.json - /tsconfig.json /dev/null/inferredProject1* /lib/index.ts *new* version: Text-1 - containingProjects: 2 + containingProjects: 1 /lib/tsconfig.json - /tsconfig.json /lib/tsconfig.json (Open) *new* version: SVC-1-0 containingProjects: 1 /dev/null/inferredProject1* *default* -/src/index.ts *new* - version: Text-1 - containingProjects: 1 - /tsconfig.json Info seq [hh:mm:ss:mss] request: { @@ -315,35 +207,6 @@ Info seq [hh:mm:ss:mss] request: } Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /lib/index.ts 500 undefined WatchType: Closed Script info Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /lib/index.ts ProjectRootPath: undefined:: Result: /lib/tsconfig.json -Info seq [hh:mm:ss:mss] `remove Project:: -Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (5) - /lib.decorators.d.ts - /lib.decorators.legacy.d.ts - /lib.d.ts - /lib/index.ts - /src/index.ts - - - lib.decorators.d.ts - Library referenced via 'decorators' from file 'lib.d.ts' - Matched by default include pattern '**/*' - lib.decorators.legacy.d.ts - Library referenced via 'decorators.legacy' from file 'lib.d.ts' - Matched by default include pattern '**/*' - lib.d.ts - Matched by default include pattern '**/*' - lib/index.ts - Matched by default include pattern '**/*' - Imported via '../lib/index' from file 'src/index.ts' - src/index.ts - Matched by default include pattern '**/*' - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: 1 undefined Config: /tsconfig.json WatchType: Wild card directory -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: 1 undefined Config: /tsconfig.json WatchType: Wild card directory -Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /tsconfig.json 2000 undefined Project: /tsconfig.json WatchType: Config file -Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /src/index.ts 500 undefined WatchType: Closed Script info Info seq [hh:mm:ss:mss] Project '/lib/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (4) @@ -379,19 +242,11 @@ watchedFiles:: watchedFiles *deleted*:: /lib/index.ts: {"pollingInterval":500} -/src/index.ts: - {"pollingInterval":500} -/tsconfig.json: - {"pollingInterval":2000} watchedDirectoriesRecursive:: /lib: {} -watchedDirectoriesRecursive *deleted*:: -: - {} - Projects:: /dev/null/inferredProject1* (Inferred) projectStateVersion: 1 @@ -400,45 +255,32 @@ Projects:: projectStateVersion: 1 projectProgramVersion: 1 noOpenRef: false *changed* -/tsconfig.json (Configured) *deleted* - projectStateVersion: 1 - projectProgramVersion: 1 - isClosed: true *changed* - noOpenRef: true ScriptInfos:: -/lib.d.ts *changed* +/lib.d.ts version: Text-1 - containingProjects: 2 *changed* + containingProjects: 2 /lib/tsconfig.json /dev/null/inferredProject1* - /tsconfig.json *deleted* -/lib.decorators.d.ts *changed* +/lib.decorators.d.ts version: Text-1 - containingProjects: 2 *changed* + containingProjects: 2 /lib/tsconfig.json /dev/null/inferredProject1* - /tsconfig.json *deleted* -/lib.decorators.legacy.d.ts *changed* +/lib.decorators.legacy.d.ts version: Text-1 - containingProjects: 2 *changed* + containingProjects: 2 /lib/tsconfig.json /dev/null/inferredProject1* - /tsconfig.json *deleted* /lib/index.ts (Open) *changed* open: true *changed* version: Text-1 - containingProjects: 1 *changed* + containingProjects: 1 /lib/tsconfig.json *default* - /tsconfig.json *deleted* /lib/tsconfig.json (Open) version: SVC-1-0 containingProjects: 1 /dev/null/inferredProject1* *default* -/src/index.ts *deleted* - version: Text-1 - containingProjects: 0 *changed* - /tsconfig.json *deleted* Info seq [hh:mm:ss:mss] request: { @@ -480,7 +322,7 @@ Info seq [hh:mm:ss:mss] Files (5) /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text /lib/index.ts Text-1 "const unrelatedLocalVariable = 123;\nexport const someExportedVariable = unrelatedLocalVariable;" - /src/index.ts SVC-2-0 "import { someExportedVariable } from '../lib/index';\nsomeExportedVariable;" + /src/index.ts SVC-1-0 "import { someExportedVariable } from '../lib/index';\nsomeExportedVariable;" ../lib.d.ts @@ -604,7 +446,7 @@ ScriptInfos:: containingProjects: 1 /dev/null/inferredProject1* *default* /src/index.ts (Open) *new* - version: SVC-2-0 + version: SVC-1-0 containingProjects: 1 /src/tsconfig.json *default* diff --git a/tests/baselines/reference/tsserver/fourslashServer/renameNamespaceImport.js b/tests/baselines/reference/tsserver/fourslashServer/renameNamespaceImport.js index 4ed42ecd46d6a..d7cb6b4a08ef1 100644 --- a/tests/baselines/reference/tsserver/fourslashServer/renameNamespaceImport.js +++ b/tests/baselines/reference/tsserver/fourslashServer/renameNamespaceImport.js @@ -103,92 +103,6 @@ Info seq [hh:mm:ss:mss] event: "diagnostics": [] } } -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /lib/tsconfig.json ProjectRootPath: undefined:: Result: /tsconfig.json -Info seq [hh:mm:ss:mss] Creating configuration project /tsconfig.json -Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tsconfig.json 2000 undefined Project: /tsconfig.json WatchType: Config file -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "projectLoadingStart", - "body": { - "projectName": "/tsconfig.json", - "reason": "Creating possible configured project for /lib/tsconfig.json to open" - } - } -Info seq [hh:mm:ss:mss] Config: /tsconfig.json : { - "rootNames": [ - "/lib.d.ts", - "/lib.decorators.d.ts", - "/lib.decorators.legacy.d.ts", - "/lib/index.ts", - "/src/index.ts" - ], - "options": { - "configFilePath": "/tsconfig.json" - } -} -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: 1 undefined Config: /tsconfig.json WatchType: Wild card directory -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: 1 undefined Config: /tsconfig.json WatchType: Wild card directory -Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /src/index.ts 500 undefined WatchType: Closed Script info -Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /tsconfig.json -Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /tsconfig.json projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms -Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (5) - /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text - /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text - /lib.d.ts Text-1 lib.d.ts-Text - /lib/index.ts Text-1 "const unrelatedLocalVariable = 123;\nexport const someExportedVariable = unrelatedLocalVariable;" - /src/index.ts Text-1 "import * as lib from '../lib/index';\nlib.someExportedVariable;" - - - lib.decorators.d.ts - Library referenced via 'decorators' from file 'lib.d.ts' - Matched by default include pattern '**/*' - lib.decorators.legacy.d.ts - Library referenced via 'decorators.legacy' from file 'lib.d.ts' - Matched by default include pattern '**/*' - lib.d.ts - Matched by default include pattern '**/*' - lib/index.ts - Matched by default include pattern '**/*' - Imported via '../lib/index' from file 'src/index.ts' - src/index.ts - Matched by default include pattern '**/*' - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "projectLoadingFinish", - "body": { - "projectName": "/tsconfig.json" - } - } -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "configFileDiag", - "body": { - "triggerFile": "/lib/tsconfig.json", - "configFile": "/tsconfig.json", - "diagnostics": [] - } - } -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /tsconfig.json ProjectRootPath: undefined:: Result: undefined -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "configFileDiag", - "body": { - "triggerFile": "/lib/tsconfig.json", - "configFile": "/tsconfig.json", - "diagnostics": [] - } - } Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) @@ -212,10 +126,6 @@ Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Project '/lib/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (4) -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (5) - Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) Info seq [hh:mm:ss:mss] Files (4) @@ -247,14 +157,8 @@ watchedFiles:: {"pollingInterval":500} /lib/tsconfig.json: *new* {"pollingInterval":2000} -/src/index.ts: *new* - {"pollingInterval":500} -/tsconfig.json: *new* - {"pollingInterval":2000} watchedDirectoriesRecursive:: -: *new* - {} /lib: *new* {} @@ -266,43 +170,31 @@ Projects:: projectStateVersion: 1 projectProgramVersion: 1 noOpenRef: true -/tsconfig.json (Configured) *new* - projectStateVersion: 1 - projectProgramVersion: 1 - noOpenRef: true ScriptInfos:: /lib.d.ts *new* version: Text-1 - containingProjects: 3 + containingProjects: 2 /lib/tsconfig.json - /tsconfig.json /dev/null/inferredProject1* /lib.decorators.d.ts *new* version: Text-1 - containingProjects: 3 + containingProjects: 2 /lib/tsconfig.json - /tsconfig.json /dev/null/inferredProject1* /lib.decorators.legacy.d.ts *new* version: Text-1 - containingProjects: 3 + containingProjects: 2 /lib/tsconfig.json - /tsconfig.json /dev/null/inferredProject1* /lib/index.ts *new* version: Text-1 - containingProjects: 2 + containingProjects: 1 /lib/tsconfig.json - /tsconfig.json /lib/tsconfig.json (Open) *new* version: SVC-1-0 containingProjects: 1 /dev/null/inferredProject1* *default* -/src/index.ts *new* - version: Text-1 - containingProjects: 1 - /tsconfig.json Info seq [hh:mm:ss:mss] request: { @@ -315,35 +207,6 @@ Info seq [hh:mm:ss:mss] request: } Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /lib/index.ts 500 undefined WatchType: Closed Script info Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /lib/index.ts ProjectRootPath: undefined:: Result: /lib/tsconfig.json -Info seq [hh:mm:ss:mss] `remove Project:: -Info seq [hh:mm:ss:mss] Project '/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (5) - /lib.decorators.d.ts - /lib.decorators.legacy.d.ts - /lib.d.ts - /lib/index.ts - /src/index.ts - - - lib.decorators.d.ts - Library referenced via 'decorators' from file 'lib.d.ts' - Matched by default include pattern '**/*' - lib.decorators.legacy.d.ts - Library referenced via 'decorators.legacy' from file 'lib.d.ts' - Matched by default include pattern '**/*' - lib.d.ts - Matched by default include pattern '**/*' - lib/index.ts - Matched by default include pattern '**/*' - Imported via '../lib/index' from file 'src/index.ts' - src/index.ts - Matched by default include pattern '**/*' - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: 1 undefined Config: /tsconfig.json WatchType: Wild card directory -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: 1 undefined Config: /tsconfig.json WatchType: Wild card directory -Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /tsconfig.json 2000 undefined Project: /tsconfig.json WatchType: Config file -Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /src/index.ts 500 undefined WatchType: Closed Script info Info seq [hh:mm:ss:mss] Project '/lib/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (4) @@ -379,19 +242,11 @@ watchedFiles:: watchedFiles *deleted*:: /lib/index.ts: {"pollingInterval":500} -/src/index.ts: - {"pollingInterval":500} -/tsconfig.json: - {"pollingInterval":2000} watchedDirectoriesRecursive:: /lib: {} -watchedDirectoriesRecursive *deleted*:: -: - {} - Projects:: /dev/null/inferredProject1* (Inferred) projectStateVersion: 1 @@ -400,45 +255,32 @@ Projects:: projectStateVersion: 1 projectProgramVersion: 1 noOpenRef: false *changed* -/tsconfig.json (Configured) *deleted* - projectStateVersion: 1 - projectProgramVersion: 1 - isClosed: true *changed* - noOpenRef: true ScriptInfos:: -/lib.d.ts *changed* +/lib.d.ts version: Text-1 - containingProjects: 2 *changed* + containingProjects: 2 /lib/tsconfig.json /dev/null/inferredProject1* - /tsconfig.json *deleted* -/lib.decorators.d.ts *changed* +/lib.decorators.d.ts version: Text-1 - containingProjects: 2 *changed* + containingProjects: 2 /lib/tsconfig.json /dev/null/inferredProject1* - /tsconfig.json *deleted* -/lib.decorators.legacy.d.ts *changed* +/lib.decorators.legacy.d.ts version: Text-1 - containingProjects: 2 *changed* + containingProjects: 2 /lib/tsconfig.json /dev/null/inferredProject1* - /tsconfig.json *deleted* /lib/index.ts (Open) *changed* open: true *changed* version: Text-1 - containingProjects: 1 *changed* + containingProjects: 1 /lib/tsconfig.json *default* - /tsconfig.json *deleted* /lib/tsconfig.json (Open) version: SVC-1-0 containingProjects: 1 /dev/null/inferredProject1* *default* -/src/index.ts *deleted* - version: Text-1 - containingProjects: 0 *changed* - /tsconfig.json *deleted* Info seq [hh:mm:ss:mss] request: { @@ -480,7 +322,7 @@ Info seq [hh:mm:ss:mss] Files (5) /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text /lib/index.ts Text-1 "const unrelatedLocalVariable = 123;\nexport const someExportedVariable = unrelatedLocalVariable;" - /src/index.ts SVC-2-0 "import * as lib from '../lib/index';\nlib.someExportedVariable;" + /src/index.ts SVC-1-0 "import * as lib from '../lib/index';\nlib.someExportedVariable;" ../lib.d.ts @@ -604,7 +446,7 @@ ScriptInfos:: containingProjects: 1 /dev/null/inferredProject1* *default* /src/index.ts (Open) *new* - version: SVC-2-0 + version: SVC-1-0 containingProjects: 1 /src/tsconfig.json *default* diff --git a/tests/baselines/reference/tsserver/fourslashServer/tripleSlashReferenceResolutionMode.js b/tests/baselines/reference/tsserver/fourslashServer/tripleSlashReferenceResolutionMode.js index 23596c76a370d..dbdd00931532c 100644 --- a/tests/baselines/reference/tsserver/fourslashServer/tripleSlashReferenceResolutionMode.js +++ b/tests/baselines/reference/tsserver/fourslashServer/tripleSlashReferenceResolutionMode.js @@ -163,7 +163,6 @@ Info seq [hh:mm:ss:mss] event: ] } } -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /tsconfig.json ProjectRootPath: undefined:: Result: undefined Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info diff --git a/tests/baselines/reference/tsserver/fourslashServer/tsconfigComputedPropertyError.js b/tests/baselines/reference/tsserver/fourslashServer/tsconfigComputedPropertyError.js index 3d23d9dec731d..c2897e5c51494 100644 --- a/tests/baselines/reference/tsserver/fourslashServer/tsconfigComputedPropertyError.js +++ b/tests/baselines/reference/tsserver/fourslashServer/tsconfigComputedPropertyError.js @@ -136,7 +136,6 @@ Info seq [hh:mm:ss:mss] event: ] } } -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /tests/cases/fourslash/server/tsconfig.json ProjectRootPath: undefined:: Result: undefined Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /tests/cases/fourslash/server/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations diff --git a/tests/baselines/reference/tsserver/getEditsForFileRename/works-with-file-moved-to-inferred-project.js b/tests/baselines/reference/tsserver/getEditsForFileRename/works-with-file-moved-to-inferred-project.js index 5b0144db58f55..adf0cf01b030f 100644 --- a/tests/baselines/reference/tsserver/getEditsForFileRename/works-with-file-moved-to-inferred-project.js +++ b/tests/baselines/reference/tsserver/getEditsForFileRename/works-with-file-moved-to-inferred-project.js @@ -243,7 +243,6 @@ Info seq [hh:mm:ss:mss] request: "type": "request" } Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /c.ts ProjectRootPath: undefined:: Result: /tsconfig.json -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /tsconfig.json ProjectRootPath: undefined:: Result: undefined Info seq [hh:mm:ss:mss] event: { "seq": 0, diff --git a/tests/baselines/reference/tsserver/importHelpers/import-helpers-successfully.js b/tests/baselines/reference/tsserver/importHelpers/import-helpers-successfully.js index d2a636da061b0..0ee38b81a7703 100644 --- a/tests/baselines/reference/tsserver/importHelpers/import-helpers-successfully.js +++ b/tests/baselines/reference/tsserver/importHelpers/import-helpers-successfully.js @@ -202,7 +202,6 @@ Info seq [hh:mm:ss:mss] event: ] } } -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /tsconfig.json ProjectRootPath: undefined:: Result: undefined Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /a/lib/lib.d.ts 500 undefined Project: /dev/null/inferredProject1* WatchType: Missing file Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms diff --git a/tests/baselines/reference/tsserver/inferredProjects/should-still-retain-configured-project-created-while-opening-the-file.js b/tests/baselines/reference/tsserver/inferredProjects/should-still-retain-configured-project-created-while-opening-the-file.js index 77174ec907f35..24edc8f7fcf7d 100644 --- a/tests/baselines/reference/tsserver/inferredProjects/should-still-retain-configured-project-created-while-opening-the-file.js +++ b/tests/baselines/reference/tsserver/inferredProjects/should-still-retain-configured-project-created-while-opening-the-file.js @@ -140,7 +140,6 @@ Info seq [hh:mm:ss:mss] event: "diagnostics": [] } } -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /user/username/projects/myproject/tsconfig.json ProjectRootPath: undefined:: Result: undefined Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots @@ -478,7 +477,6 @@ Info seq [hh:mm:ss:mss] request: Info seq [hh:mm:ss:mss] Invoking /user/username/projects/myproject/tsconfig.json:: wildcard for open scriptInfo:: /user/username/projects/myproject/jsFile2.js Info seq [hh:mm:ss:mss] Project: /user/username/projects/myproject/tsconfig.json Detected file add/remove of non supported extension: /user/username/projects/myproject/jsFile2.js Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /user/username/projects/myproject/jsFile2.js ProjectRootPath: undefined:: Result: /user/username/projects/myproject/tsconfig.json -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /user/username/projects/myproject/tsconfig.json ProjectRootPath: undefined:: Result: undefined Info seq [hh:mm:ss:mss] event: { "seq": 0, @@ -687,7 +685,6 @@ Info seq [hh:mm:ss:mss] request: Info seq [hh:mm:ss:mss] Invoking /user/username/projects/myproject/tsconfig.json:: wildcard for open scriptInfo:: /user/username/projects/myproject/jsFile1.js Info seq [hh:mm:ss:mss] Project: /user/username/projects/myproject/tsconfig.json Detected file add/remove of non supported extension: /user/username/projects/myproject/jsFile1.js Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /user/username/projects/myproject/jsFile1.js ProjectRootPath: undefined:: Result: /user/username/projects/myproject/tsconfig.json -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /user/username/projects/myproject/tsconfig.json ProjectRootPath: undefined:: Result: undefined Info seq [hh:mm:ss:mss] event: { "seq": 0, diff --git a/tests/baselines/reference/tsserver/packageJsonInfo/detects-new-package.json-files-that-are-added,-caches-them,-and-watches-them.js b/tests/baselines/reference/tsserver/packageJsonInfo/detects-new-package.json-files-that-are-added,-caches-them,-and-watches-them.js index dbf51b7610839..561c72aa92358 100644 --- a/tests/baselines/reference/tsserver/packageJsonInfo/detects-new-package.json-files-that-are-added,-caches-them,-and-watches-them.js +++ b/tests/baselines/reference/tsserver/packageJsonInfo/detects-new-package.json-files-that-are-added,-caches-them,-and-watches-them.js @@ -108,7 +108,6 @@ Info seq [hh:mm:ss:mss] event: ] } } -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /tsconfig.json ProjectRootPath: undefined:: Result: undefined Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /a/lib/lib.d.ts 500 undefined Project: /dev/null/inferredProject1* WatchType: Missing file Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms diff --git a/tests/baselines/reference/tsserver/packageJsonInfo/finds-multiple-package.json-files-when-present.js b/tests/baselines/reference/tsserver/packageJsonInfo/finds-multiple-package.json-files-when-present.js index d09421523ae16..c3f9073f3ff84 100644 --- a/tests/baselines/reference/tsserver/packageJsonInfo/finds-multiple-package.json-files-when-present.js +++ b/tests/baselines/reference/tsserver/packageJsonInfo/finds-multiple-package.json-files-when-present.js @@ -124,7 +124,6 @@ Info seq [hh:mm:ss:mss] event: ] } } -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /tsconfig.json ProjectRootPath: undefined:: Result: undefined Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /a/lib/lib.d.ts 500 undefined Project: /dev/null/inferredProject1* WatchType: Missing file Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms diff --git a/tests/baselines/reference/tsserver/packageJsonInfo/finds-package.json-on-demand,-watches-for-deletion,-and-removes-them-from-cache.js b/tests/baselines/reference/tsserver/packageJsonInfo/finds-package.json-on-demand,-watches-for-deletion,-and-removes-them-from-cache.js index 4c2bb79d44cba..8c5ce994d92bc 100644 --- a/tests/baselines/reference/tsserver/packageJsonInfo/finds-package.json-on-demand,-watches-for-deletion,-and-removes-them-from-cache.js +++ b/tests/baselines/reference/tsserver/packageJsonInfo/finds-package.json-on-demand,-watches-for-deletion,-and-removes-them-from-cache.js @@ -124,7 +124,6 @@ Info seq [hh:mm:ss:mss] event: ] } } -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /tsconfig.json ProjectRootPath: undefined:: Result: undefined Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /a/lib/lib.d.ts 500 undefined Project: /dev/null/inferredProject1* WatchType: Missing file Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms diff --git a/tests/baselines/reference/tsserver/packageJsonInfo/handles-empty-package.json.js b/tests/baselines/reference/tsserver/packageJsonInfo/handles-empty-package.json.js index 6cdf2e8e5ed93..d86e82430f285 100644 --- a/tests/baselines/reference/tsserver/packageJsonInfo/handles-empty-package.json.js +++ b/tests/baselines/reference/tsserver/packageJsonInfo/handles-empty-package.json.js @@ -111,7 +111,6 @@ Info seq [hh:mm:ss:mss] event: ] } } -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /tsconfig.json ProjectRootPath: undefined:: Result: undefined Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /a/lib/lib.d.ts 500 undefined Project: /dev/null/inferredProject1* WatchType: Missing file Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms diff --git a/tests/baselines/reference/tsserver/packageJsonInfo/handles-errors-in-json-parsing-of-package.json.js b/tests/baselines/reference/tsserver/packageJsonInfo/handles-errors-in-json-parsing-of-package.json.js index ce0dab0dd9dda..6d74b1ea46629 100644 --- a/tests/baselines/reference/tsserver/packageJsonInfo/handles-errors-in-json-parsing-of-package.json.js +++ b/tests/baselines/reference/tsserver/packageJsonInfo/handles-errors-in-json-parsing-of-package.json.js @@ -111,7 +111,6 @@ Info seq [hh:mm:ss:mss] event: ] } } -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /tsconfig.json ProjectRootPath: undefined:: Result: undefined Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /a/lib/lib.d.ts 500 undefined Project: /dev/null/inferredProject1* WatchType: Missing file Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms diff --git a/tests/baselines/reference/tsserver/projectErrors/configFileDiagnostic-events-are-not-generated-when-the-config-file-does-not-include-file-opened-and-config-file-has-errors.js b/tests/baselines/reference/tsserver/projectErrors/configFileDiagnostic-events-are-not-generated-when-the-config-file-does-not-include-file-opened-and-config-file-has-errors.js index acfd71eb7d6d2..c6d54eab29a3c 100644 --- a/tests/baselines/reference/tsserver/projectErrors/configFileDiagnostic-events-are-not-generated-when-the-config-file-does-not-include-file-opened-and-config-file-has-errors.js +++ b/tests/baselines/reference/tsserver/projectErrors/configFileDiagnostic-events-are-not-generated-when-the-config-file-does-not-include-file-opened-and-config-file-has-errors.js @@ -163,7 +163,6 @@ Info seq [hh:mm:ss:mss] event: ] } } -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /a/b/tsconfig.json ProjectRootPath: undefined:: Result: undefined Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) @@ -317,7 +316,6 @@ Info seq [hh:mm:ss:mss] request: "type": "request" } Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /a/b/test2.ts ProjectRootPath: undefined:: Result: /a/b/tsconfig.json -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /a/b/tsconfig.json ProjectRootPath: undefined:: Result: undefined Info seq [hh:mm:ss:mss] event: { "seq": 0, diff --git a/tests/baselines/reference/tsserver/projectErrors/configFileDiagnostic-events-are-not-generated-when-the-config-file-does-not-include-file-opened-and-doesnt-contain-any-errors.js b/tests/baselines/reference/tsserver/projectErrors/configFileDiagnostic-events-are-not-generated-when-the-config-file-does-not-include-file-opened-and-doesnt-contain-any-errors.js index 4639489d9fa38..1dd3dca5bc9c1 100644 --- a/tests/baselines/reference/tsserver/projectErrors/configFileDiagnostic-events-are-not-generated-when-the-config-file-does-not-include-file-opened-and-doesnt-contain-any-errors.js +++ b/tests/baselines/reference/tsserver/projectErrors/configFileDiagnostic-events-are-not-generated-when-the-config-file-does-not-include-file-opened-and-doesnt-contain-any-errors.js @@ -136,7 +136,6 @@ Info seq [hh:mm:ss:mss] event: "diagnostics": [] } } -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /a/b/tsconfig.json ProjectRootPath: undefined:: Result: undefined Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) @@ -290,7 +289,6 @@ Info seq [hh:mm:ss:mss] request: "type": "request" } Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /a/b/test2.ts ProjectRootPath: undefined:: Result: /a/b/tsconfig.json -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /a/b/tsconfig.json ProjectRootPath: undefined:: Result: undefined Info seq [hh:mm:ss:mss] event: { "seq": 0, diff --git a/tests/baselines/reference/tsserver/projectReferences/disables-looking-into-the-child-project-if-disableReferencedProjectLoad-is-set-in-indirect-project.js b/tests/baselines/reference/tsserver/projectReferences/disables-looking-into-the-child-project-if-disableReferencedProjectLoad-is-set-in-indirect-project.js index 7edd67b435f11..10f6019b10711 100644 --- a/tests/baselines/reference/tsserver/projectReferences/disables-looking-into-the-child-project-if-disableReferencedProjectLoad-is-set-in-indirect-project.js +++ b/tests/baselines/reference/tsserver/projectReferences/disables-looking-into-the-child-project-if-disableReferencedProjectLoad-is-set-in-indirect-project.js @@ -358,7 +358,6 @@ Info seq [hh:mm:ss:mss] event: "diagnostics": [] } } -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /user/username/projects/myproject/tsconfig.json ProjectRootPath: undefined:: Result: undefined Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /user/username/projects/myproject/tsconfig-indirect1.json ProjectRootPath: undefined:: Result: undefined Info seq [hh:mm:ss:mss] Project '/user/username/projects/myproject/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (0) @@ -1037,7 +1036,6 @@ Info seq [hh:mm:ss:mss] event: "diagnostics": [] } } -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /user/username/projects/myproject/tsconfig.json ProjectRootPath: undefined:: Result: undefined Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /user/username/projects/myproject/tsconfig-indirect1.json ProjectRootPath: undefined:: Result: undefined Info seq [hh:mm:ss:mss] Project '/user/username/projects/myproject/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (0) @@ -1289,7 +1287,6 @@ Info seq [hh:mm:ss:mss] event: "diagnostics": [] } } -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /user/username/projects/myproject/tsconfig.json ProjectRootPath: undefined:: Result: undefined Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /user/username/projects/myproject/tsconfig-indirect1.json ProjectRootPath: undefined:: Result: undefined Info seq [hh:mm:ss:mss] Before ensureProjectForOpenFiles: Info seq [hh:mm:ss:mss] Project '/user/username/projects/myproject/tsconfig.json' (Configured) diff --git a/tests/baselines/reference/tsserver/projectReferences/disables-looking-into-the-child-project-if-disableReferencedProjectLoad-is-set.js b/tests/baselines/reference/tsserver/projectReferences/disables-looking-into-the-child-project-if-disableReferencedProjectLoad-is-set.js index 4bd2ba24cf0c1..09855a69e0ed2 100644 --- a/tests/baselines/reference/tsserver/projectReferences/disables-looking-into-the-child-project-if-disableReferencedProjectLoad-is-set.js +++ b/tests/baselines/reference/tsserver/projectReferences/disables-looking-into-the-child-project-if-disableReferencedProjectLoad-is-set.js @@ -218,7 +218,6 @@ Info seq [hh:mm:ss:mss] event: "diagnostics": [] } } -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /user/username/projects/myproject/tsconfig.json ProjectRootPath: undefined:: Result: undefined Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/src/tsconfig.json 2000 undefined WatchType: Config file for the inferred project root Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/src/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root @@ -828,7 +827,6 @@ Info seq [hh:mm:ss:mss] event: "diagnostics": [] } } -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /user/username/projects/myproject/tsconfig.json ProjectRootPath: undefined:: Result: undefined Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/src/tsconfig.json 2000 undefined WatchType: Config file for the inferred project root Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/src/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root @@ -1030,7 +1028,6 @@ Info seq [hh:mm:ss:mss] event: "diagnostics": [] } } -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /user/username/projects/myproject/tsconfig.json ProjectRootPath: undefined:: Result: undefined Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/myproject/src/node_modules 1 undefined Project: /dev/null/inferredProject3* WatchType: Failed Lookup Locations Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/myproject/src/node_modules 1 undefined Project: /dev/null/inferredProject3* WatchType: Failed Lookup Locations Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/myproject/node_modules 1 undefined Project: /dev/null/inferredProject3* WatchType: Failed Lookup Locations diff --git a/tests/baselines/reference/tsserver/projectReferences/solution-with-its-own-files-and-disables-looking-into-the-child-project-if-disableReferencedProjectLoad-is-set-in-indirect-project.js b/tests/baselines/reference/tsserver/projectReferences/solution-with-its-own-files-and-disables-looking-into-the-child-project-if-disableReferencedProjectLoad-is-set-in-indirect-project.js index fec188ffe5d1a..c7fa59125b093 100644 --- a/tests/baselines/reference/tsserver/projectReferences/solution-with-its-own-files-and-disables-looking-into-the-child-project-if-disableReferencedProjectLoad-is-set-in-indirect-project.js +++ b/tests/baselines/reference/tsserver/projectReferences/solution-with-its-own-files-and-disables-looking-into-the-child-project-if-disableReferencedProjectLoad-is-set-in-indirect-project.js @@ -393,7 +393,6 @@ Info seq [hh:mm:ss:mss] event: "diagnostics": [] } } -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /user/username/projects/myproject/tsconfig.json ProjectRootPath: undefined:: Result: undefined Info seq [hh:mm:ss:mss] Project '/user/username/projects/myproject/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (5) @@ -1157,7 +1156,6 @@ Info seq [hh:mm:ss:mss] event: "diagnostics": [] } } -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /user/username/projects/myproject/tsconfig.json ProjectRootPath: undefined:: Result: undefined Info seq [hh:mm:ss:mss] Project '/user/username/projects/myproject/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (5) @@ -1444,7 +1442,6 @@ Info seq [hh:mm:ss:mss] event: "diagnostics": [] } } -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /user/username/projects/myproject/tsconfig.json ProjectRootPath: undefined:: Result: undefined Info seq [hh:mm:ss:mss] Before ensureProjectForOpenFiles: Info seq [hh:mm:ss:mss] Project '/user/username/projects/myproject/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (5) diff --git a/tests/baselines/reference/tsserver/projectReferences/solution-with-its-own-files-and-disables-looking-into-the-child-project-if-disableReferencedProjectLoad-is-set.js b/tests/baselines/reference/tsserver/projectReferences/solution-with-its-own-files-and-disables-looking-into-the-child-project-if-disableReferencedProjectLoad-is-set.js index b3e51ba30d0fc..56add6fbef821 100644 --- a/tests/baselines/reference/tsserver/projectReferences/solution-with-its-own-files-and-disables-looking-into-the-child-project-if-disableReferencedProjectLoad-is-set.js +++ b/tests/baselines/reference/tsserver/projectReferences/solution-with-its-own-files-and-disables-looking-into-the-child-project-if-disableReferencedProjectLoad-is-set.js @@ -250,7 +250,6 @@ Info seq [hh:mm:ss:mss] event: "diagnostics": [] } } -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /user/username/projects/myproject/tsconfig.json ProjectRootPath: undefined:: Result: undefined Info seq [hh:mm:ss:mss] Project '/user/username/projects/myproject/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (4) @@ -818,7 +817,6 @@ Info seq [hh:mm:ss:mss] event: "diagnostics": [] } } -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /user/username/projects/myproject/tsconfig.json ProjectRootPath: undefined:: Result: undefined Info seq [hh:mm:ss:mss] Project '/user/username/projects/myproject/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (4) @@ -1003,7 +1001,6 @@ Info seq [hh:mm:ss:mss] event: "diagnostics": [] } } -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /user/username/projects/myproject/tsconfig.json ProjectRootPath: undefined:: Result: undefined Info seq [hh:mm:ss:mss] Before ensureProjectForOpenFiles: Info seq [hh:mm:ss:mss] Project '/user/username/projects/myproject/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (4) diff --git a/tests/baselines/reference/tsserver/projectReferences/when-file-is-not-part-of-first-config-tree-found-appConfig-not-composite-with-file-open-before-revert.js b/tests/baselines/reference/tsserver/projectReferences/when-file-is-not-part-of-first-config-tree-found-appConfig-not-composite-with-file-open-before-revert.js index 3fd8cc7a023e0..431b5c2dc82fe 100644 --- a/tests/baselines/reference/tsserver/projectReferences/when-file-is-not-part-of-first-config-tree-found-appConfig-not-composite-with-file-open-before-revert.js +++ b/tests/baselines/reference/tsserver/projectReferences/when-file-is-not-part-of-first-config-tree-found-appConfig-not-composite-with-file-open-before-revert.js @@ -203,271 +203,46 @@ Info seq [hh:mm:ss:mss] event: "diagnostics": [] } } -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /home/src/projects/project/app/tsconfig.json ProjectRootPath: undefined:: Result: /home/src/projects/project/tsconfig.json -Info seq [hh:mm:ss:mss] Creating configuration project /home/src/projects/project/tsconfig.json -Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/projects/project/tsconfig.json 2000 undefined Project: /home/src/projects/project/tsconfig.json WatchType: Config file -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "projectLoadingStart", - "body": { - "projectName": "/home/src/projects/project/tsconfig.json", - "reason": "Creating possible configured project for /home/src/projects/project/app/Component-demos.ts to open" - } - } -Info seq [hh:mm:ss:mss] Config: /home/src/projects/project/tsconfig.json : { - "rootNames": [ - "/home/src/projects/project/app/Component-demos.ts", - "/home/src/projects/project/app/Component.ts", - "/home/src/projects/project/demos/helpers.ts" - ], - "options": { - "outDir": "/home/src/projects/project/dist", - "configFilePath": "/home/src/projects/project/tsconfig.json" - }, - "projectReferences": [ - { - "path": "/home/src/projects/project/demos/tsconfig.json", - "originalPath": "./demos/tsconfig.json" - }, - { - "path": "/home/src/projects/project/app/tsconfig.json", - "originalPath": "./app/tsconfig.json" - } - ] -} -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project 1 undefined Config: /home/src/projects/project/tsconfig.json WatchType: Wild card directory -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project 1 undefined Config: /home/src/projects/project/tsconfig.json WatchType: Wild card directory -Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/projects/project/demos/helpers.ts 500 undefined WatchType: Closed Script info -Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /home/src/projects/project/tsconfig.json -Info seq [hh:mm:ss:mss] Config: /home/src/projects/project/demos/tsconfig.json : { - "rootNames": [ - "/home/src/projects/project/demos/helpers.ts", - "/home/src/projects/project/app/Component-demos.ts" - ], - "options": { - "composite": true, - "rootDir": "/home/src/projects/project", - "outDir": "/home/src/projects/project/demos-dist", - "paths": { - "demos/*": [ - "./*" - ] - }, - "pathsBasePath": "/home/src/projects/project/demos", - "configFilePath": "/home/src/projects/project/demos/tsconfig.json" - } -} -Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/projects/project/demos/tsconfig.json 2000 undefined Project: /home/src/projects/project/tsconfig.json WatchType: Config file -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/demos 1 undefined Config: /home/src/projects/project/demos/tsconfig.json WatchType: Wild card directory -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/demos 1 undefined Config: /home/src/projects/project/demos/tsconfig.json WatchType: Wild card directory -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/app 1 undefined Config: /home/src/projects/project/demos/tsconfig.json WatchType: Wild card directory -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/app 1 undefined Config: /home/src/projects/project/demos/tsconfig.json WatchType: Wild card directory -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/node_modules/@types 1 undefined Project: /home/src/projects/project/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/node_modules/@types 1 undefined Project: /home/src/projects/project/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/node_modules/@types 1 undefined Project: /home/src/projects/project/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/node_modules/@types 1 undefined Project: /home/src/projects/project/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /home/src/projects/project/tsconfig.json projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (4) - /a/lib/lib.d.ts Text-1 "/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }" - /home/src/projects/project/demos/helpers.ts Text-1 "export const foo = 1;\n" - /home/src/projects/project/app/Component-demos.ts SVC-1-0 "import * as helpers from 'demos/helpers';\nexport const demo = () => {\n helpers;\n}\n" - /home/src/projects/project/app/Component.ts Text-1 "export const Component = () => {}\n" - - - ../../../../a/lib/lib.d.ts - Default library for target 'es5' - demos/helpers.ts - Imported via 'demos/helpers' from file 'app/Component-demos.ts' - Matched by default include pattern '**/*' - app/Component-demos.ts - Matched by default include pattern '**/*' - app/Component.ts - Matched by default include pattern '**/*' - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "projectLoadingFinish", - "body": { - "projectName": "/home/src/projects/project/tsconfig.json" - } - } -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "telemetry", - "body": { - "telemetryEventName": "projectInfo", - "payload": { - "projectId": "1097a5f82e8323ba7aba7567ec06402f7ad4ea74abce44ec5efd223ac77ff169", - "fileStats": { - "js": 0, - "jsSize": 0, - "jsx": 0, - "jsxSize": 0, - "ts": 3, - "tsSize": 141, - "tsx": 0, - "tsxSize": 0, - "dts": 1, - "dtsSize": 334, - "deferred": 0, - "deferredSize": 0 - }, - "compilerOptions": { - "outDir": "" - }, - "typeAcquisition": { - "enable": false, - "include": false, - "exclude": false - }, - "extends": false, - "files": false, - "include": false, - "exclude": false, - "compileOnSave": false, - "configFileName": "tsconfig.json", - "projectType": "configured", - "languageServiceEnabled": true, - "version": "FakeVersion" - } - } - } -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "configFileDiag", - "body": { - "triggerFile": "/home/src/projects/project/app/Component-demos.ts", - "configFile": "/home/src/projects/project/tsconfig.json", - "diagnostics": [] - } - } -Info seq [hh:mm:ss:mss] Creating configuration project /home/src/projects/project/demos/tsconfig.json -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "projectLoadingStart", - "body": { - "projectName": "/home/src/projects/project/demos/tsconfig.json", - "reason": "Creating project referenced in solution /home/src/projects/project/tsconfig.json to find possible configured project for /home/src/projects/project/app/Component-demos.ts to open" - } - } -Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /home/src/projects/project/demos/tsconfig.json -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/demos/node_modules/@types 1 undefined Project: /home/src/projects/project/demos/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/demos/node_modules/@types 1 undefined Project: /home/src/projects/project/demos/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/node_modules/@types 1 undefined Project: /home/src/projects/project/demos/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/node_modules/@types 1 undefined Project: /home/src/projects/project/demos/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/node_modules/@types 1 undefined Project: /home/src/projects/project/demos/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/node_modules/@types 1 undefined Project: /home/src/projects/project/demos/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /home/src/projects/project/demos/tsconfig.json projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/demos/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (3) +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/projects/project/app/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/projects/project/tsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/projects/project/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/app/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/app/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/app/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/app/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (2) /a/lib/lib.d.ts Text-1 "/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }" - /home/src/projects/project/demos/helpers.ts Text-1 "export const foo = 1;\n" /home/src/projects/project/app/Component-demos.ts SVC-1-0 "import * as helpers from 'demos/helpers';\nexport const demo = () => {\n helpers;\n}\n" ../../../../../a/lib/lib.d.ts Default library for target 'es5' - helpers.ts - Matched by include pattern '**/*' in 'tsconfig.json' - Imported via 'demos/helpers' from file '../app/Component-demos.ts' - ../app/Component-demos.ts - Matched by include pattern '../app/**/*-demos.*' in 'tsconfig.json' + Component-demos.ts + Root file specified for compilation Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "projectLoadingFinish", - "body": { - "projectName": "/home/src/projects/project/demos/tsconfig.json" - } - } -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "telemetry", - "body": { - "telemetryEventName": "projectInfo", - "payload": { - "projectId": "528692a1575f61fd3bf7069493cc100a7cad975f6cd24c47b7a63b99928a8171", - "fileStats": { - "js": 0, - "jsSize": 0, - "jsx": 0, - "jsxSize": 0, - "ts": 2, - "tsSize": 107, - "tsx": 0, - "tsxSize": 0, - "dts": 1, - "dtsSize": 334, - "deferred": 0, - "deferredSize": 0 - }, - "compilerOptions": { - "composite": true, - "rootDir": "", - "outDir": "", - "paths": "" - }, - "typeAcquisition": { - "enable": false, - "include": false, - "exclude": false - }, - "extends": false, - "files": false, - "include": true, - "exclude": false, - "compileOnSave": false, - "configFileName": "tsconfig.json", - "projectType": "configured", - "languageServiceEnabled": true, - "version": "FakeVersion" - } - } - } -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "configFileDiag", - "body": { - "triggerFile": "/home/src/projects/project/app/Component-demos.ts", - "configFile": "/home/src/projects/project/demos/tsconfig.json", - "diagnostics": [] - } - } -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /home/src/projects/project/demos/tsconfig.json ProjectRootPath: undefined:: Result: /home/src/projects/project/tsconfig.json Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/app/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (4) - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/demos/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (3) +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: Info seq [hh:mm:ss:mss] FileName: /home/src/projects/project/app/Component-demos.ts ProjectRootPath: undefined -Info seq [hh:mm:ss:mss] Projects: /home/src/projects/project/tsconfig.json,/home/src/projects/project/demos/tsconfig.json +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* Info seq [hh:mm:ss:mss] response: { "seq": 0, @@ -482,11 +257,19 @@ Info seq [hh:mm:ss:mss] response: After request PolledWatches:: +/home/src/projects/node_modules: *new* + {"pollingInterval":500} /home/src/projects/node_modules/@types: *new* {"pollingInterval":500} +/home/src/projects/project/app/jsconfig.json: *new* + {"pollingInterval":2000} +/home/src/projects/project/app/node_modules: *new* + {"pollingInterval":500} /home/src/projects/project/app/node_modules/@types: *new* {"pollingInterval":500} -/home/src/projects/project/demos/node_modules/@types: *new* +/home/src/projects/project/jsconfig.json: *new* + {"pollingInterval":2000} +/home/src/projects/project/node_modules: *new* {"pollingInterval":500} /home/src/projects/project/node_modules/@types: *new* {"pollingInterval":500} @@ -498,65 +281,45 @@ FsWatches:: {} /home/src/projects/project/app/tsconfig.json: *new* {} -/home/src/projects/project/demos/helpers.ts: *new* - {} -/home/src/projects/project/demos/tsconfig.json: *new* - {} /home/src/projects/project/tsconfig.json: *new* {} FsWatchesRecursive:: -/home/src/projects/project: *new* - {} /home/src/projects/project/app: *new* {} -/home/src/projects/project/demos: *new* - {} Projects:: -/home/src/projects/project/app/tsconfig.json (Configured) *new* - projectStateVersion: 1 - projectProgramVersion: 1 -/home/src/projects/project/demos/tsconfig.json (Configured) *new* +/dev/null/inferredProject1* (Inferred) *new* projectStateVersion: 1 projectProgramVersion: 1 -/home/src/projects/project/tsconfig.json (Configured) *new* +/home/src/projects/project/app/tsconfig.json (Configured) *new* projectStateVersion: 1 projectProgramVersion: 1 + noOpenRef: true ScriptInfos:: /a/lib/lib.d.ts *new* version: Text-1 - containingProjects: 3 + containingProjects: 2 /home/src/projects/project/app/tsconfig.json - /home/src/projects/project/tsconfig.json - /home/src/projects/project/demos/tsconfig.json + /dev/null/inferredProject1* /home/src/projects/project/app/Component-demos.ts (Open) *new* version: SVC-1-0 - containingProjects: 2 - /home/src/projects/project/tsconfig.json - /home/src/projects/project/demos/tsconfig.json *default* + containingProjects: 1 + /dev/null/inferredProject1* *default* /home/src/projects/project/app/Component.ts *new* version: Text-1 - containingProjects: 2 + containingProjects: 1 /home/src/projects/project/app/tsconfig.json - /home/src/projects/project/tsconfig.json -/home/src/projects/project/demos/helpers.ts *new* - version: Text-1 - containingProjects: 2 - /home/src/projects/project/tsconfig.json - /home/src/projects/project/demos/tsconfig.json Info seq [hh:mm:ss:mss] FileWatcher:: Triggered with /home/src/projects/project/app/tsconfig.json 1:: WatchInfo: /home/src/projects/project/app/tsconfig.json 2000 undefined Project: /home/src/projects/project/app/tsconfig.json WatchType: Config file Info seq [hh:mm:ss:mss] Scheduled: /home/src/projects/project/app/tsconfig.json -Info seq [hh:mm:ss:mss] Scheduled: /home/src/projects/project/tsconfig.json Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /home/src/projects/project/app/Component-demos.ts ProjectRootPath: undefined:: Result: /home/src/projects/project/app/tsconfig.json Info seq [hh:mm:ss:mss] Scheduled: *ensureProjectForOpenFiles* Info seq [hh:mm:ss:mss] Elapsed:: *ms FileWatcher:: Triggered with /home/src/projects/project/app/tsconfig.json 1:: WatchInfo: /home/src/projects/project/app/tsconfig.json 2000 undefined Project: /home/src/projects/project/app/tsconfig.json WatchType: Config file -Before running Timeout callback:: count: 3 +Before running Timeout callback:: count: 2 1: /home/src/projects/project/app/tsconfig.json -2: /home/src/projects/project/tsconfig.json -3: *ensureProjectForOpenFiles* +2: *ensureProjectForOpenFiles* //// [/home/src/projects/project/app/tsconfig.json] { "compilerOptions": { @@ -572,23 +335,19 @@ Before running Timeout callback:: count: 3 } -Timeout callback:: count: 3 +Timeout callback:: count: 2 1: /home/src/projects/project/app/tsconfig.json *new* -2: /home/src/projects/project/tsconfig.json *new* -3: *ensureProjectForOpenFiles* *new* +2: *ensureProjectForOpenFiles* *new* Projects:: -/home/src/projects/project/app/tsconfig.json (Configured) *changed* - projectStateVersion: 2 *changed* - projectProgramVersion: 1 - dirty: true *changed* -/home/src/projects/project/demos/tsconfig.json (Configured) +/dev/null/inferredProject1* (Inferred) projectStateVersion: 1 projectProgramVersion: 1 -/home/src/projects/project/tsconfig.json (Configured) *changed* +/home/src/projects/project/app/tsconfig.json (Configured) *changed* projectStateVersion: 2 *changed* projectProgramVersion: 1 dirty: true *changed* + noOpenRef: false *changed* Info seq [hh:mm:ss:mss] Running: /home/src/projects/project/app/tsconfig.json Info seq [hh:mm:ss:mss] event: @@ -638,78 +397,31 @@ Info seq [hh:mm:ss:mss] event: "diagnostics": [] } } -Info seq [hh:mm:ss:mss] Running: /home/src/projects/project/tsconfig.json -Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /home/src/projects/project/tsconfig.json -Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /home/src/projects/project/tsconfig.json projectStateVersion: 2 projectProgramVersion: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (4) - /a/lib/lib.d.ts Text-1 "/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }" - /home/src/projects/project/demos/helpers.ts Text-1 "export const foo = 1;\n" - /home/src/projects/project/app/Component-demos.ts SVC-1-0 "import * as helpers from 'demos/helpers';\nexport const demo = () => {\n helpers;\n}\n" - /home/src/projects/project/app/Component.ts Text-1 "export const Component = () => {}\n" - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "configFileDiag", - "body": { - "triggerFile": "/home/src/projects/project/tsconfig.json", - "configFile": "/home/src/projects/project/tsconfig.json", - "diagnostics": [ - { - "start": { - "line": 9, - "offset": 5 - }, - "end": { - "line": 11, - "offset": 6 - }, - "text": "Referenced project '/home/src/projects/project/app/tsconfig.json' must have setting \"composite\": true.", - "code": 6306, - "category": "error", - "fileName": "/home/src/projects/project/tsconfig.json" - } - ] - } - } Info seq [hh:mm:ss:mss] Running: *ensureProjectForOpenFiles* Info seq [hh:mm:ss:mss] Before ensureProjectForOpenFiles: Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/app/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (4) - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/demos/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (3) +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: Info seq [hh:mm:ss:mss] FileName: /home/src/projects/project/app/Component-demos.ts ProjectRootPath: undefined -Info seq [hh:mm:ss:mss] Projects: /home/src/projects/project/tsconfig.json,/home/src/projects/project/demos/tsconfig.json -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /home/src/projects/project/app/tsconfig.json ProjectRootPath: undefined:: Result: /home/src/projects/project/tsconfig.json -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /home/src/projects/project/demos/tsconfig.json ProjectRootPath: undefined:: Result: /home/src/projects/project/tsconfig.json +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* Info seq [hh:mm:ss:mss] After ensureProjectForOpenFiles: Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/app/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (4) - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/demos/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (3) +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: Info seq [hh:mm:ss:mss] FileName: /home/src/projects/project/app/Component-demos.ts ProjectRootPath: undefined -Info seq [hh:mm:ss:mss] Projects: /home/src/projects/project/tsconfig.json,/home/src/projects/project/demos/tsconfig.json +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* Info seq [hh:mm:ss:mss] got projects updated in background /home/src/projects/project/app/Component-demos.ts Info seq [hh:mm:ss:mss] event: { @@ -725,23 +437,20 @@ Info seq [hh:mm:ss:mss] event: After running Timeout callback:: count: 0 Projects:: -/home/src/projects/project/app/tsconfig.json (Configured) *changed* - projectStateVersion: 2 - projectProgramVersion: 1 - dirty: false *changed* -/home/src/projects/project/demos/tsconfig.json (Configured) +/dev/null/inferredProject1* (Inferred) projectStateVersion: 1 projectProgramVersion: 1 -/home/src/projects/project/tsconfig.json (Configured) *changed* +/home/src/projects/project/app/tsconfig.json (Configured) *changed* projectStateVersion: 2 - projectProgramVersion: 2 *changed* + projectProgramVersion: 1 dirty: false *changed* + noOpenRef: true *changed* Info seq [hh:mm:ss:mss] File: /home/src/projects/project/app/Component-demos.ts: getDefaultProjectForFile: - /home/src/projects/project/demos/tsconfig.json + /dev/null/inferredProject1* findDefaultConfiguredProject: - /home/src/projects/project/demos/tsconfig.json + undefined Before request Info seq [hh:mm:ss:mss] request: @@ -855,25 +564,39 @@ Info seq [hh:mm:ss:mss] event: "diagnostics": [] } } +Info seq [hh:mm:ss:mss] `remove Project:: Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/app/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (2) + /a/lib/lib.d.ts + /home/src/projects/project/app/Component.ts + + + ../../../../../a/lib/lib.d.ts + Default library for target 'es5' + Component.ts + Matched by include pattern '**/*' in 'tsconfig.json' Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (4) - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/demos/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (3) +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/project/app 1 undefined Config: /home/src/projects/project/app/tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/project/app 1 undefined Config: /home/src/projects/project/app/tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/project/app/node_modules/@types 1 undefined Project: /home/src/projects/project/app/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/project/app/node_modules/@types 1 undefined Project: /home/src/projects/project/app/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/project/node_modules/@types 1 undefined Project: /home/src/projects/project/app/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/project/node_modules/@types 1 undefined Project: /home/src/projects/project/app/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/node_modules/@types 1 undefined Project: /home/src/projects/project/app/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/node_modules/@types 1 undefined Project: /home/src/projects/project/app/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /home/src/projects/project/app/Component.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Project '/home/src/projects/random/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/home/src/projects/random/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: Info seq [hh:mm:ss:mss] FileName: /home/src/projects/project/app/Component-demos.ts ProjectRootPath: undefined -Info seq [hh:mm:ss:mss] Projects: /home/src/projects/project/tsconfig.json,/home/src/projects/project/demos/tsconfig.json +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* Info seq [hh:mm:ss:mss] FileName: /home/src/projects/random/random.ts ProjectRootPath: undefined Info seq [hh:mm:ss:mss] Projects: /home/src/projects/random/tsconfig.json Info seq [hh:mm:ss:mss] response: @@ -890,11 +613,19 @@ Info seq [hh:mm:ss:mss] response: After request PolledWatches:: +/home/src/projects/node_modules: + {"pollingInterval":500} /home/src/projects/node_modules/@types: {"pollingInterval":500} +/home/src/projects/project/app/jsconfig.json: + {"pollingInterval":2000} +/home/src/projects/project/app/node_modules: + {"pollingInterval":500} /home/src/projects/project/app/node_modules/@types: {"pollingInterval":500} -/home/src/projects/project/demos/node_modules/@types: +/home/src/projects/project/jsconfig.json: + {"pollingInterval":2000} +/home/src/projects/project/node_modules: {"pollingInterval":500} /home/src/projects/project/node_modules/@types: {"pollingInterval":500} @@ -904,39 +635,34 @@ PolledWatches:: FsWatches:: /a/lib/lib.d.ts: {} -/home/src/projects/project/app/Component.ts: - {} /home/src/projects/project/app/tsconfig.json: {} -/home/src/projects/project/demos/helpers.ts: - {} -/home/src/projects/project/demos/tsconfig.json: - {} /home/src/projects/project/tsconfig.json: {} /home/src/projects/random/tsconfig.json: *new* {} +FsWatches *deleted*:: +/home/src/projects/project/app/Component.ts: + {} + FsWatchesRecursive:: -/home/src/projects/project: +/home/src/projects/random: *new* {} + +FsWatchesRecursive *deleted*:: /home/src/projects/project/app: {} -/home/src/projects/project/demos: - {} -/home/src/projects/random: *new* - {} Projects:: -/home/src/projects/project/app/tsconfig.json (Configured) - projectStateVersion: 2 - projectProgramVersion: 1 -/home/src/projects/project/demos/tsconfig.json (Configured) +/dev/null/inferredProject1* (Inferred) projectStateVersion: 1 projectProgramVersion: 1 -/home/src/projects/project/tsconfig.json (Configured) +/home/src/projects/project/app/tsconfig.json (Configured) *deleted* projectStateVersion: 2 - projectProgramVersion: 2 + projectProgramVersion: 1 + isClosed: true *changed* + noOpenRef: true /home/src/projects/random/tsconfig.json (Configured) *new* projectStateVersion: 1 projectProgramVersion: 1 @@ -944,26 +670,18 @@ Projects:: ScriptInfos:: /a/lib/lib.d.ts *changed* version: Text-1 - containingProjects: 4 *changed* - /home/src/projects/project/app/tsconfig.json - /home/src/projects/project/tsconfig.json - /home/src/projects/project/demos/tsconfig.json + containingProjects: 2 *changed* + /dev/null/inferredProject1* /home/src/projects/random/tsconfig.json *new* + /home/src/projects/project/app/tsconfig.json *deleted* /home/src/projects/project/app/Component-demos.ts (Open) version: SVC-1-0 - containingProjects: 2 - /home/src/projects/project/tsconfig.json - /home/src/projects/project/demos/tsconfig.json *default* -/home/src/projects/project/app/Component.ts - version: Text-1 - containingProjects: 2 - /home/src/projects/project/app/tsconfig.json - /home/src/projects/project/tsconfig.json -/home/src/projects/project/demos/helpers.ts + containingProjects: 1 + /dev/null/inferredProject1* *default* +/home/src/projects/project/app/Component.ts *deleted* version: Text-1 - containingProjects: 2 - /home/src/projects/project/tsconfig.json - /home/src/projects/project/demos/tsconfig.json + containingProjects: 0 *changed* + /home/src/projects/project/app/tsconfig.json *deleted* /home/src/projects/random/random.ts (Open) *new* version: SVC-1-0 containingProjects: 1 @@ -981,25 +699,17 @@ Info seq [hh:mm:ss:mss] request: "type": "request" } Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/projects/random/random.ts 500 undefined WatchType: Closed Script info -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/app/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Project '/home/src/projects/random/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (4) - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/demos/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (3) - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/home/src/projects/random/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: Info seq [hh:mm:ss:mss] FileName: /home/src/projects/project/app/Component-demos.ts ProjectRootPath: undefined -Info seq [hh:mm:ss:mss] Projects: /home/src/projects/project/tsconfig.json,/home/src/projects/project/demos/tsconfig.json +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* Info seq [hh:mm:ss:mss] response: { "seq": 0, @@ -1011,11 +721,19 @@ Info seq [hh:mm:ss:mss] response: After request PolledWatches:: +/home/src/projects/node_modules: + {"pollingInterval":500} /home/src/projects/node_modules/@types: {"pollingInterval":500} +/home/src/projects/project/app/jsconfig.json: + {"pollingInterval":2000} +/home/src/projects/project/app/node_modules: + {"pollingInterval":500} /home/src/projects/project/app/node_modules/@types: {"pollingInterval":500} -/home/src/projects/project/demos/node_modules/@types: +/home/src/projects/project/jsconfig.json: + {"pollingInterval":2000} +/home/src/projects/project/node_modules: {"pollingInterval":500} /home/src/projects/project/node_modules/@types: {"pollingInterval":500} @@ -1025,14 +743,8 @@ PolledWatches:: FsWatches:: /a/lib/lib.d.ts: {} -/home/src/projects/project/app/Component.ts: - {} /home/src/projects/project/app/tsconfig.json: {} -/home/src/projects/project/demos/helpers.ts: - {} -/home/src/projects/project/demos/tsconfig.json: - {} /home/src/projects/project/tsconfig.json: {} /home/src/projects/random/random.ts: *new* @@ -1041,25 +753,13 @@ FsWatches:: {} FsWatchesRecursive:: -/home/src/projects/project: - {} -/home/src/projects/project/app: - {} -/home/src/projects/project/demos: - {} /home/src/projects/random: {} Projects:: -/home/src/projects/project/app/tsconfig.json (Configured) - projectStateVersion: 2 - projectProgramVersion: 1 -/home/src/projects/project/demos/tsconfig.json (Configured) +/dev/null/inferredProject1* (Inferred) projectStateVersion: 1 projectProgramVersion: 1 -/home/src/projects/project/tsconfig.json (Configured) - projectStateVersion: 2 - projectProgramVersion: 2 /home/src/projects/random/tsconfig.json (Configured) *changed* projectStateVersion: 1 projectProgramVersion: 1 @@ -1068,26 +768,13 @@ Projects:: ScriptInfos:: /a/lib/lib.d.ts version: Text-1 - containingProjects: 4 - /home/src/projects/project/app/tsconfig.json - /home/src/projects/project/tsconfig.json - /home/src/projects/project/demos/tsconfig.json + containingProjects: 2 + /dev/null/inferredProject1* /home/src/projects/random/tsconfig.json /home/src/projects/project/app/Component-demos.ts (Open) version: SVC-1-0 - containingProjects: 2 - /home/src/projects/project/tsconfig.json - /home/src/projects/project/demos/tsconfig.json *default* -/home/src/projects/project/app/Component.ts - version: Text-1 - containingProjects: 2 - /home/src/projects/project/app/tsconfig.json - /home/src/projects/project/tsconfig.json -/home/src/projects/project/demos/helpers.ts - version: Text-1 - containingProjects: 2 - /home/src/projects/project/tsconfig.json - /home/src/projects/project/demos/tsconfig.json + containingProjects: 1 + /dev/null/inferredProject1* *default* /home/src/projects/random/random.ts *changed* open: false *changed* version: SVC-1-0 @@ -1096,19 +783,18 @@ ScriptInfos:: Info seq [hh:mm:ss:mss] File: /home/src/projects/project/app/Component-demos.ts: getDefaultProjectForFile: - /home/src/projects/project/demos/tsconfig.json + /dev/null/inferredProject1* findDefaultConfiguredProject: - /home/src/projects/project/demos/tsconfig.json + undefined Info seq [hh:mm:ss:mss] FileWatcher:: Triggered with /home/src/projects/project/app/tsconfig.json 1:: WatchInfo: /home/src/projects/project/app/tsconfig.json 2000 undefined Project: /home/src/projects/project/app/tsconfig.json WatchType: Config file -Info seq [hh:mm:ss:mss] Scheduled: /home/src/projects/project/app/tsconfig.json -Info seq [hh:mm:ss:mss] Scheduled: /home/src/projects/project/tsconfig.json Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /home/src/projects/project/app/Component-demos.ts ProjectRootPath: undefined:: Result: /home/src/projects/project/app/tsconfig.json +Info seq [hh:mm:ss:mss] Creating configuration project /home/src/projects/project/app/tsconfig.json +Info seq [hh:mm:ss:mss] Scheduled: /home/src/projects/project/app/tsconfig.json Info seq [hh:mm:ss:mss] Scheduled: *ensureProjectForOpenFiles* Info seq [hh:mm:ss:mss] Elapsed:: *ms FileWatcher:: Triggered with /home/src/projects/project/app/tsconfig.json 1:: WatchInfo: /home/src/projects/project/app/tsconfig.json 2000 undefined Project: /home/src/projects/project/app/tsconfig.json WatchType: Config file -Before running Timeout callback:: count: 3 -4: /home/src/projects/project/app/tsconfig.json -5: /home/src/projects/project/tsconfig.json -6: *ensureProjectForOpenFiles* +Before running Timeout callback:: count: 2 +3: /home/src/projects/project/app/tsconfig.json +4: *ensureProjectForOpenFiles* //// [/home/src/projects/project/app/tsconfig.json] { "compilerOptions": { @@ -1124,23 +810,18 @@ Before running Timeout callback:: count: 3 } -Timeout callback:: count: 3 -4: /home/src/projects/project/app/tsconfig.json *new* -5: /home/src/projects/project/tsconfig.json *new* -6: *ensureProjectForOpenFiles* *new* +Timeout callback:: count: 2 +3: /home/src/projects/project/app/tsconfig.json *new* +4: *ensureProjectForOpenFiles* *new* Projects:: -/home/src/projects/project/app/tsconfig.json (Configured) *changed* - projectStateVersion: 3 *changed* - projectProgramVersion: 1 - dirty: true *changed* -/home/src/projects/project/demos/tsconfig.json (Configured) +/dev/null/inferredProject1* (Inferred) projectStateVersion: 1 projectProgramVersion: 1 -/home/src/projects/project/tsconfig.json (Configured) *changed* - projectStateVersion: 3 *changed* - projectProgramVersion: 2 - dirty: true *changed* +/home/src/projects/project/app/tsconfig.json (Configured) *new* + projectStateVersion: 1 + projectProgramVersion: 0 + dirty: true /home/src/projects/random/tsconfig.json (Configured) projectStateVersion: 1 projectProgramVersion: 1 @@ -1154,7 +835,7 @@ Info seq [hh:mm:ss:mss] event: "event": "projectLoadingStart", "body": { "projectName": "/home/src/projects/project/app/tsconfig.json", - "reason": "Change in config file detected" + "reason": "Change in config file /home/src/projects/project/app/tsconfig.json detected, Creating possible configured project for /home/src/projects/project/app/Component-demos.ts to open" } } Info seq [hh:mm:ss:mss] Config: /home/src/projects/project/app/tsconfig.json : { @@ -1167,12 +848,27 @@ Info seq [hh:mm:ss:mss] Config: /home/src/projects/project/app/tsconfig.json : "configFilePath": "/home/src/projects/project/app/tsconfig.json" } } +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/app 1 undefined Config: /home/src/projects/project/app/tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/app 1 undefined Config: /home/src/projects/project/app/tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/projects/project/app/Component.ts 500 undefined WatchType: Closed Script info Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /home/src/projects/project/app/tsconfig.json -Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /home/src/projects/project/app/tsconfig.json projectStateVersion: 3 projectProgramVersion: 1 structureChanged: false structureIsReused:: Completely Elapsed:: *ms +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/app/node_modules/@types 1 undefined Project: /home/src/projects/project/app/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/app/node_modules/@types 1 undefined Project: /home/src/projects/project/app/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/node_modules/@types 1 undefined Project: /home/src/projects/project/app/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/node_modules/@types 1 undefined Project: /home/src/projects/project/app/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/node_modules/@types 1 undefined Project: /home/src/projects/project/app/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/node_modules/@types 1 undefined Project: /home/src/projects/project/app/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /home/src/projects/project/app/tsconfig.json projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/app/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (2) /a/lib/lib.d.ts Text-1 "/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }" - /home/src/projects/project/app/Component.ts Text-1 "export const Component = () => {}\n" + /home/src/projects/project/app/Component.ts Text-2 "export const Component = () => {}\n" + + + ../../../../../a/lib/lib.d.ts + Default library for target 'es5' + Component.ts + Matched by include pattern '**/*' in 'tsconfig.json' Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] event: @@ -1195,71 +891,39 @@ Info seq [hh:mm:ss:mss] event: "diagnostics": [] } } -Info seq [hh:mm:ss:mss] Running: /home/src/projects/project/tsconfig.json -Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /home/src/projects/project/tsconfig.json -Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /home/src/projects/project/tsconfig.json projectStateVersion: 3 projectProgramVersion: 2 structureChanged: true structureIsReused:: Not Elapsed:: *ms -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (4) - /a/lib/lib.d.ts Text-1 "/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }" - /home/src/projects/project/demos/helpers.ts Text-1 "export const foo = 1;\n" - /home/src/projects/project/app/Component-demos.ts SVC-1-0 "import * as helpers from 'demos/helpers';\nexport const demo = () => {\n helpers;\n}\n" - /home/src/projects/project/app/Component.ts Text-1 "export const Component = () => {}\n" - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "configFileDiag", - "body": { - "triggerFile": "/home/src/projects/project/tsconfig.json", - "configFile": "/home/src/projects/project/tsconfig.json", - "diagnostics": [] - } - } Info seq [hh:mm:ss:mss] Running: *ensureProjectForOpenFiles* Info seq [hh:mm:ss:mss] Before ensureProjectForOpenFiles: -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/app/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Project '/home/src/projects/random/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (4) - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/demos/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (3) +Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/app/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/home/src/projects/random/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: Info seq [hh:mm:ss:mss] FileName: /home/src/projects/project/app/Component-demos.ts ProjectRootPath: undefined -Info seq [hh:mm:ss:mss] Projects: /home/src/projects/project/tsconfig.json,/home/src/projects/project/demos/tsconfig.json -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /home/src/projects/project/app/tsconfig.json ProjectRootPath: undefined:: Result: /home/src/projects/project/tsconfig.json -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /home/src/projects/project/demos/tsconfig.json ProjectRootPath: undefined:: Result: /home/src/projects/project/tsconfig.json +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* Info seq [hh:mm:ss:mss] After ensureProjectForOpenFiles: -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/app/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Project '/home/src/projects/random/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (4) - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/demos/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (3) +Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/app/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/home/src/projects/random/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: Info seq [hh:mm:ss:mss] FileName: /home/src/projects/project/app/Component-demos.ts ProjectRootPath: undefined -Info seq [hh:mm:ss:mss] Projects: /home/src/projects/project/tsconfig.json,/home/src/projects/project/demos/tsconfig.json +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* Info seq [hh:mm:ss:mss] got projects updated in background /home/src/projects/project/app/Component-demos.ts Info seq [hh:mm:ss:mss] event: { @@ -1274,25 +938,82 @@ Info seq [hh:mm:ss:mss] event: } After running Timeout callback:: count: 0 +PolledWatches:: +/home/src/projects/node_modules: + {"pollingInterval":500} +/home/src/projects/node_modules/@types: + {"pollingInterval":500} +/home/src/projects/project/app/jsconfig.json: + {"pollingInterval":2000} +/home/src/projects/project/app/node_modules: + {"pollingInterval":500} +/home/src/projects/project/app/node_modules/@types: + {"pollingInterval":500} +/home/src/projects/project/jsconfig.json: + {"pollingInterval":2000} +/home/src/projects/project/node_modules: + {"pollingInterval":500} +/home/src/projects/project/node_modules/@types: + {"pollingInterval":500} +/home/src/projects/random/node_modules/@types: + {"pollingInterval":500} + +FsWatches:: +/a/lib/lib.d.ts: + {} +/home/src/projects/project/app/Component.ts: *new* + {} +/home/src/projects/project/app/tsconfig.json: + {} +/home/src/projects/project/tsconfig.json: + {} +/home/src/projects/random/random.ts: + {} +/home/src/projects/random/tsconfig.json: + {} + +FsWatchesRecursive:: +/home/src/projects/project/app: *new* + {} +/home/src/projects/random: + {} + Projects:: -/home/src/projects/project/app/tsconfig.json (Configured) *changed* - projectStateVersion: 3 - projectProgramVersion: 1 - dirty: false *changed* -/home/src/projects/project/demos/tsconfig.json (Configured) +/dev/null/inferredProject1* (Inferred) projectStateVersion: 1 projectProgramVersion: 1 -/home/src/projects/project/tsconfig.json (Configured) *changed* - projectStateVersion: 3 - projectProgramVersion: 3 *changed* +/home/src/projects/project/app/tsconfig.json (Configured) *changed* + projectStateVersion: 1 + projectProgramVersion: 1 *changed* dirty: false *changed* + noOpenRef: true *changed* /home/src/projects/random/tsconfig.json (Configured) projectStateVersion: 1 projectProgramVersion: 1 noOpenRef: true +ScriptInfos:: +/a/lib/lib.d.ts *changed* + version: Text-1 + containingProjects: 3 *changed* + /dev/null/inferredProject1* + /home/src/projects/random/tsconfig.json + /home/src/projects/project/app/tsconfig.json *new* +/home/src/projects/project/app/Component-demos.ts (Open) + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject1* *default* +/home/src/projects/project/app/Component.ts *new* + version: Text-2 + containingProjects: 1 + /home/src/projects/project/app/tsconfig.json +/home/src/projects/random/random.ts + version: SVC-1-0 + containingProjects: 1 + /home/src/projects/random/tsconfig.json + Info seq [hh:mm:ss:mss] File: /home/src/projects/project/app/Component-demos.ts: getDefaultProjectForFile: - /home/src/projects/project/demos/tsconfig.json + /dev/null/inferredProject1* findDefaultConfiguredProject: - /home/src/projects/project/demos/tsconfig.json \ No newline at end of file + undefined \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/projectReferences/when-file-is-not-part-of-first-config-tree-found-appConfig-not-composite.js b/tests/baselines/reference/tsserver/projectReferences/when-file-is-not-part-of-first-config-tree-found-appConfig-not-composite.js index 12a99b70b9949..22467f7e7f32b 100644 --- a/tests/baselines/reference/tsserver/projectReferences/when-file-is-not-part-of-first-config-tree-found-appConfig-not-composite.js +++ b/tests/baselines/reference/tsserver/projectReferences/when-file-is-not-part-of-first-config-tree-found-appConfig-not-composite.js @@ -203,271 +203,46 @@ Info seq [hh:mm:ss:mss] event: "diagnostics": [] } } -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /home/src/projects/project/app/tsconfig.json ProjectRootPath: undefined:: Result: /home/src/projects/project/tsconfig.json -Info seq [hh:mm:ss:mss] Creating configuration project /home/src/projects/project/tsconfig.json -Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/projects/project/tsconfig.json 2000 undefined Project: /home/src/projects/project/tsconfig.json WatchType: Config file -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "projectLoadingStart", - "body": { - "projectName": "/home/src/projects/project/tsconfig.json", - "reason": "Creating possible configured project for /home/src/projects/project/app/Component-demos.ts to open" - } - } -Info seq [hh:mm:ss:mss] Config: /home/src/projects/project/tsconfig.json : { - "rootNames": [ - "/home/src/projects/project/app/Component-demos.ts", - "/home/src/projects/project/app/Component.ts", - "/home/src/projects/project/demos/helpers.ts" - ], - "options": { - "outDir": "/home/src/projects/project/dist", - "configFilePath": "/home/src/projects/project/tsconfig.json" - }, - "projectReferences": [ - { - "path": "/home/src/projects/project/demos/tsconfig.json", - "originalPath": "./demos/tsconfig.json" - }, - { - "path": "/home/src/projects/project/app/tsconfig.json", - "originalPath": "./app/tsconfig.json" - } - ] -} -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project 1 undefined Config: /home/src/projects/project/tsconfig.json WatchType: Wild card directory -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project 1 undefined Config: /home/src/projects/project/tsconfig.json WatchType: Wild card directory -Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/projects/project/demos/helpers.ts 500 undefined WatchType: Closed Script info -Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /home/src/projects/project/tsconfig.json -Info seq [hh:mm:ss:mss] Config: /home/src/projects/project/demos/tsconfig.json : { - "rootNames": [ - "/home/src/projects/project/demos/helpers.ts", - "/home/src/projects/project/app/Component-demos.ts" - ], - "options": { - "composite": true, - "rootDir": "/home/src/projects/project", - "outDir": "/home/src/projects/project/demos-dist", - "paths": { - "demos/*": [ - "./*" - ] - }, - "pathsBasePath": "/home/src/projects/project/demos", - "configFilePath": "/home/src/projects/project/demos/tsconfig.json" - } -} -Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/projects/project/demos/tsconfig.json 2000 undefined Project: /home/src/projects/project/tsconfig.json WatchType: Config file -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/demos 1 undefined Config: /home/src/projects/project/demos/tsconfig.json WatchType: Wild card directory -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/demos 1 undefined Config: /home/src/projects/project/demos/tsconfig.json WatchType: Wild card directory -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/app 1 undefined Config: /home/src/projects/project/demos/tsconfig.json WatchType: Wild card directory -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/app 1 undefined Config: /home/src/projects/project/demos/tsconfig.json WatchType: Wild card directory -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/node_modules/@types 1 undefined Project: /home/src/projects/project/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/node_modules/@types 1 undefined Project: /home/src/projects/project/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/node_modules/@types 1 undefined Project: /home/src/projects/project/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/node_modules/@types 1 undefined Project: /home/src/projects/project/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /home/src/projects/project/tsconfig.json projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (4) - /a/lib/lib.d.ts Text-1 "/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }" - /home/src/projects/project/demos/helpers.ts Text-1 "export const foo = 1;\n" - /home/src/projects/project/app/Component-demos.ts SVC-1-0 "import * as helpers from 'demos/helpers';\nexport const demo = () => {\n helpers;\n}\n" - /home/src/projects/project/app/Component.ts Text-1 "export const Component = () => {}\n" - - - ../../../../a/lib/lib.d.ts - Default library for target 'es5' - demos/helpers.ts - Imported via 'demos/helpers' from file 'app/Component-demos.ts' - Matched by default include pattern '**/*' - app/Component-demos.ts - Matched by default include pattern '**/*' - app/Component.ts - Matched by default include pattern '**/*' - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "projectLoadingFinish", - "body": { - "projectName": "/home/src/projects/project/tsconfig.json" - } - } -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "telemetry", - "body": { - "telemetryEventName": "projectInfo", - "payload": { - "projectId": "1097a5f82e8323ba7aba7567ec06402f7ad4ea74abce44ec5efd223ac77ff169", - "fileStats": { - "js": 0, - "jsSize": 0, - "jsx": 0, - "jsxSize": 0, - "ts": 3, - "tsSize": 141, - "tsx": 0, - "tsxSize": 0, - "dts": 1, - "dtsSize": 334, - "deferred": 0, - "deferredSize": 0 - }, - "compilerOptions": { - "outDir": "" - }, - "typeAcquisition": { - "enable": false, - "include": false, - "exclude": false - }, - "extends": false, - "files": false, - "include": false, - "exclude": false, - "compileOnSave": false, - "configFileName": "tsconfig.json", - "projectType": "configured", - "languageServiceEnabled": true, - "version": "FakeVersion" - } - } - } -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "configFileDiag", - "body": { - "triggerFile": "/home/src/projects/project/app/Component-demos.ts", - "configFile": "/home/src/projects/project/tsconfig.json", - "diagnostics": [] - } - } -Info seq [hh:mm:ss:mss] Creating configuration project /home/src/projects/project/demos/tsconfig.json -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "projectLoadingStart", - "body": { - "projectName": "/home/src/projects/project/demos/tsconfig.json", - "reason": "Creating project referenced in solution /home/src/projects/project/tsconfig.json to find possible configured project for /home/src/projects/project/app/Component-demos.ts to open" - } - } -Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /home/src/projects/project/demos/tsconfig.json -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/demos/node_modules/@types 1 undefined Project: /home/src/projects/project/demos/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/demos/node_modules/@types 1 undefined Project: /home/src/projects/project/demos/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/node_modules/@types 1 undefined Project: /home/src/projects/project/demos/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/node_modules/@types 1 undefined Project: /home/src/projects/project/demos/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/node_modules/@types 1 undefined Project: /home/src/projects/project/demos/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/node_modules/@types 1 undefined Project: /home/src/projects/project/demos/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /home/src/projects/project/demos/tsconfig.json projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/demos/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (3) +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/projects/project/app/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/projects/project/tsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/projects/project/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/app/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/app/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/app/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/app/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (2) /a/lib/lib.d.ts Text-1 "/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }" - /home/src/projects/project/demos/helpers.ts Text-1 "export const foo = 1;\n" /home/src/projects/project/app/Component-demos.ts SVC-1-0 "import * as helpers from 'demos/helpers';\nexport const demo = () => {\n helpers;\n}\n" ../../../../../a/lib/lib.d.ts Default library for target 'es5' - helpers.ts - Matched by include pattern '**/*' in 'tsconfig.json' - Imported via 'demos/helpers' from file '../app/Component-demos.ts' - ../app/Component-demos.ts - Matched by include pattern '../app/**/*-demos.*' in 'tsconfig.json' + Component-demos.ts + Root file specified for compilation Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "projectLoadingFinish", - "body": { - "projectName": "/home/src/projects/project/demos/tsconfig.json" - } - } -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "telemetry", - "body": { - "telemetryEventName": "projectInfo", - "payload": { - "projectId": "528692a1575f61fd3bf7069493cc100a7cad975f6cd24c47b7a63b99928a8171", - "fileStats": { - "js": 0, - "jsSize": 0, - "jsx": 0, - "jsxSize": 0, - "ts": 2, - "tsSize": 107, - "tsx": 0, - "tsxSize": 0, - "dts": 1, - "dtsSize": 334, - "deferred": 0, - "deferredSize": 0 - }, - "compilerOptions": { - "composite": true, - "rootDir": "", - "outDir": "", - "paths": "" - }, - "typeAcquisition": { - "enable": false, - "include": false, - "exclude": false - }, - "extends": false, - "files": false, - "include": true, - "exclude": false, - "compileOnSave": false, - "configFileName": "tsconfig.json", - "projectType": "configured", - "languageServiceEnabled": true, - "version": "FakeVersion" - } - } - } -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "configFileDiag", - "body": { - "triggerFile": "/home/src/projects/project/app/Component-demos.ts", - "configFile": "/home/src/projects/project/demos/tsconfig.json", - "diagnostics": [] - } - } -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /home/src/projects/project/demos/tsconfig.json ProjectRootPath: undefined:: Result: /home/src/projects/project/tsconfig.json Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/app/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (4) - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/demos/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (3) +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: Info seq [hh:mm:ss:mss] FileName: /home/src/projects/project/app/Component-demos.ts ProjectRootPath: undefined -Info seq [hh:mm:ss:mss] Projects: /home/src/projects/project/tsconfig.json,/home/src/projects/project/demos/tsconfig.json +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* Info seq [hh:mm:ss:mss] response: { "seq": 0, @@ -482,11 +257,19 @@ Info seq [hh:mm:ss:mss] response: After request PolledWatches:: +/home/src/projects/node_modules: *new* + {"pollingInterval":500} /home/src/projects/node_modules/@types: *new* {"pollingInterval":500} +/home/src/projects/project/app/jsconfig.json: *new* + {"pollingInterval":2000} +/home/src/projects/project/app/node_modules: *new* + {"pollingInterval":500} /home/src/projects/project/app/node_modules/@types: *new* {"pollingInterval":500} -/home/src/projects/project/demos/node_modules/@types: *new* +/home/src/projects/project/jsconfig.json: *new* + {"pollingInterval":2000} +/home/src/projects/project/node_modules: *new* {"pollingInterval":500} /home/src/projects/project/node_modules/@types: *new* {"pollingInterval":500} @@ -498,65 +281,45 @@ FsWatches:: {} /home/src/projects/project/app/tsconfig.json: *new* {} -/home/src/projects/project/demos/helpers.ts: *new* - {} -/home/src/projects/project/demos/tsconfig.json: *new* - {} /home/src/projects/project/tsconfig.json: *new* {} FsWatchesRecursive:: -/home/src/projects/project: *new* - {} /home/src/projects/project/app: *new* {} -/home/src/projects/project/demos: *new* - {} Projects:: -/home/src/projects/project/app/tsconfig.json (Configured) *new* +/dev/null/inferredProject1* (Inferred) *new* projectStateVersion: 1 projectProgramVersion: 1 -/home/src/projects/project/demos/tsconfig.json (Configured) *new* - projectStateVersion: 1 - projectProgramVersion: 1 -/home/src/projects/project/tsconfig.json (Configured) *new* +/home/src/projects/project/app/tsconfig.json (Configured) *new* projectStateVersion: 1 projectProgramVersion: 1 + noOpenRef: true ScriptInfos:: /a/lib/lib.d.ts *new* version: Text-1 - containingProjects: 3 + containingProjects: 2 /home/src/projects/project/app/tsconfig.json - /home/src/projects/project/tsconfig.json - /home/src/projects/project/demos/tsconfig.json + /dev/null/inferredProject1* /home/src/projects/project/app/Component-demos.ts (Open) *new* version: SVC-1-0 - containingProjects: 2 - /home/src/projects/project/tsconfig.json - /home/src/projects/project/demos/tsconfig.json *default* + containingProjects: 1 + /dev/null/inferredProject1* *default* /home/src/projects/project/app/Component.ts *new* version: Text-1 - containingProjects: 2 + containingProjects: 1 /home/src/projects/project/app/tsconfig.json - /home/src/projects/project/tsconfig.json -/home/src/projects/project/demos/helpers.ts *new* - version: Text-1 - containingProjects: 2 - /home/src/projects/project/tsconfig.json - /home/src/projects/project/demos/tsconfig.json Info seq [hh:mm:ss:mss] FileWatcher:: Triggered with /home/src/projects/project/app/tsconfig.json 1:: WatchInfo: /home/src/projects/project/app/tsconfig.json 2000 undefined Project: /home/src/projects/project/app/tsconfig.json WatchType: Config file Info seq [hh:mm:ss:mss] Scheduled: /home/src/projects/project/app/tsconfig.json -Info seq [hh:mm:ss:mss] Scheduled: /home/src/projects/project/tsconfig.json Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /home/src/projects/project/app/Component-demos.ts ProjectRootPath: undefined:: Result: /home/src/projects/project/app/tsconfig.json Info seq [hh:mm:ss:mss] Scheduled: *ensureProjectForOpenFiles* Info seq [hh:mm:ss:mss] Elapsed:: *ms FileWatcher:: Triggered with /home/src/projects/project/app/tsconfig.json 1:: WatchInfo: /home/src/projects/project/app/tsconfig.json 2000 undefined Project: /home/src/projects/project/app/tsconfig.json WatchType: Config file -Before running Timeout callback:: count: 3 +Before running Timeout callback:: count: 2 1: /home/src/projects/project/app/tsconfig.json -2: /home/src/projects/project/tsconfig.json -3: *ensureProjectForOpenFiles* +2: *ensureProjectForOpenFiles* //// [/home/src/projects/project/app/tsconfig.json] { "compilerOptions": { @@ -572,23 +335,19 @@ Before running Timeout callback:: count: 3 } -Timeout callback:: count: 3 +Timeout callback:: count: 2 1: /home/src/projects/project/app/tsconfig.json *new* -2: /home/src/projects/project/tsconfig.json *new* -3: *ensureProjectForOpenFiles* *new* +2: *ensureProjectForOpenFiles* *new* Projects:: -/home/src/projects/project/app/tsconfig.json (Configured) *changed* - projectStateVersion: 2 *changed* - projectProgramVersion: 1 - dirty: true *changed* -/home/src/projects/project/demos/tsconfig.json (Configured) +/dev/null/inferredProject1* (Inferred) projectStateVersion: 1 projectProgramVersion: 1 -/home/src/projects/project/tsconfig.json (Configured) *changed* +/home/src/projects/project/app/tsconfig.json (Configured) *changed* projectStateVersion: 2 *changed* projectProgramVersion: 1 dirty: true *changed* + noOpenRef: false *changed* Info seq [hh:mm:ss:mss] Running: /home/src/projects/project/app/tsconfig.json Info seq [hh:mm:ss:mss] event: @@ -638,78 +397,31 @@ Info seq [hh:mm:ss:mss] event: "diagnostics": [] } } -Info seq [hh:mm:ss:mss] Running: /home/src/projects/project/tsconfig.json -Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /home/src/projects/project/tsconfig.json -Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /home/src/projects/project/tsconfig.json projectStateVersion: 2 projectProgramVersion: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (4) - /a/lib/lib.d.ts Text-1 "/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }" - /home/src/projects/project/demos/helpers.ts Text-1 "export const foo = 1;\n" - /home/src/projects/project/app/Component-demos.ts SVC-1-0 "import * as helpers from 'demos/helpers';\nexport const demo = () => {\n helpers;\n}\n" - /home/src/projects/project/app/Component.ts Text-1 "export const Component = () => {}\n" - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "configFileDiag", - "body": { - "triggerFile": "/home/src/projects/project/tsconfig.json", - "configFile": "/home/src/projects/project/tsconfig.json", - "diagnostics": [ - { - "start": { - "line": 9, - "offset": 5 - }, - "end": { - "line": 11, - "offset": 6 - }, - "text": "Referenced project '/home/src/projects/project/app/tsconfig.json' must have setting \"composite\": true.", - "code": 6306, - "category": "error", - "fileName": "/home/src/projects/project/tsconfig.json" - } - ] - } - } Info seq [hh:mm:ss:mss] Running: *ensureProjectForOpenFiles* Info seq [hh:mm:ss:mss] Before ensureProjectForOpenFiles: Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/app/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (4) - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/demos/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (3) +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: Info seq [hh:mm:ss:mss] FileName: /home/src/projects/project/app/Component-demos.ts ProjectRootPath: undefined -Info seq [hh:mm:ss:mss] Projects: /home/src/projects/project/tsconfig.json,/home/src/projects/project/demos/tsconfig.json -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /home/src/projects/project/app/tsconfig.json ProjectRootPath: undefined:: Result: /home/src/projects/project/tsconfig.json -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /home/src/projects/project/demos/tsconfig.json ProjectRootPath: undefined:: Result: /home/src/projects/project/tsconfig.json +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* Info seq [hh:mm:ss:mss] After ensureProjectForOpenFiles: Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/app/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (4) - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/demos/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (3) +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: Info seq [hh:mm:ss:mss] FileName: /home/src/projects/project/app/Component-demos.ts ProjectRootPath: undefined -Info seq [hh:mm:ss:mss] Projects: /home/src/projects/project/tsconfig.json,/home/src/projects/project/demos/tsconfig.json +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* Info seq [hh:mm:ss:mss] got projects updated in background /home/src/projects/project/app/Component-demos.ts Info seq [hh:mm:ss:mss] event: { @@ -725,33 +437,28 @@ Info seq [hh:mm:ss:mss] event: After running Timeout callback:: count: 0 Projects:: -/home/src/projects/project/app/tsconfig.json (Configured) *changed* - projectStateVersion: 2 - projectProgramVersion: 1 - dirty: false *changed* -/home/src/projects/project/demos/tsconfig.json (Configured) +/dev/null/inferredProject1* (Inferred) projectStateVersion: 1 projectProgramVersion: 1 -/home/src/projects/project/tsconfig.json (Configured) *changed* +/home/src/projects/project/app/tsconfig.json (Configured) *changed* projectStateVersion: 2 - projectProgramVersion: 2 *changed* + projectProgramVersion: 1 dirty: false *changed* + noOpenRef: true *changed* Info seq [hh:mm:ss:mss] File: /home/src/projects/project/app/Component-demos.ts: getDefaultProjectForFile: - /home/src/projects/project/demos/tsconfig.json + /dev/null/inferredProject1* findDefaultConfiguredProject: - /home/src/projects/project/demos/tsconfig.json + undefined Info seq [hh:mm:ss:mss] FileWatcher:: Triggered with /home/src/projects/project/app/tsconfig.json 1:: WatchInfo: /home/src/projects/project/app/tsconfig.json 2000 undefined Project: /home/src/projects/project/app/tsconfig.json WatchType: Config file Info seq [hh:mm:ss:mss] Scheduled: /home/src/projects/project/app/tsconfig.json -Info seq [hh:mm:ss:mss] Scheduled: /home/src/projects/project/tsconfig.json Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /home/src/projects/project/app/Component-demos.ts ProjectRootPath: undefined:: Result: /home/src/projects/project/app/tsconfig.json Info seq [hh:mm:ss:mss] Scheduled: *ensureProjectForOpenFiles* Info seq [hh:mm:ss:mss] Elapsed:: *ms FileWatcher:: Triggered with /home/src/projects/project/app/tsconfig.json 1:: WatchInfo: /home/src/projects/project/app/tsconfig.json 2000 undefined Project: /home/src/projects/project/app/tsconfig.json WatchType: Config file -Before running Timeout callback:: count: 3 -4: /home/src/projects/project/app/tsconfig.json -5: /home/src/projects/project/tsconfig.json -6: *ensureProjectForOpenFiles* +Before running Timeout callback:: count: 2 +3: /home/src/projects/project/app/tsconfig.json +4: *ensureProjectForOpenFiles* //// [/home/src/projects/project/app/tsconfig.json] { "compilerOptions": { @@ -767,23 +474,19 @@ Before running Timeout callback:: count: 3 } -Timeout callback:: count: 3 -4: /home/src/projects/project/app/tsconfig.json *new* -5: /home/src/projects/project/tsconfig.json *new* -6: *ensureProjectForOpenFiles* *new* +Timeout callback:: count: 2 +3: /home/src/projects/project/app/tsconfig.json *new* +4: *ensureProjectForOpenFiles* *new* Projects:: -/home/src/projects/project/app/tsconfig.json (Configured) *changed* - projectStateVersion: 3 *changed* - projectProgramVersion: 1 - dirty: true *changed* -/home/src/projects/project/demos/tsconfig.json (Configured) +/dev/null/inferredProject1* (Inferred) projectStateVersion: 1 projectProgramVersion: 1 -/home/src/projects/project/tsconfig.json (Configured) *changed* +/home/src/projects/project/app/tsconfig.json (Configured) *changed* projectStateVersion: 3 *changed* - projectProgramVersion: 2 + projectProgramVersion: 1 dirty: true *changed* + noOpenRef: false *changed* Info seq [hh:mm:ss:mss] Running: /home/src/projects/project/app/tsconfig.json Info seq [hh:mm:ss:mss] event: @@ -834,63 +537,31 @@ Info seq [hh:mm:ss:mss] event: "diagnostics": [] } } -Info seq [hh:mm:ss:mss] Running: /home/src/projects/project/tsconfig.json -Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /home/src/projects/project/tsconfig.json -Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /home/src/projects/project/tsconfig.json projectStateVersion: 3 projectProgramVersion: 2 structureChanged: true structureIsReused:: Not Elapsed:: *ms -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (4) - /a/lib/lib.d.ts Text-1 "/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }" - /home/src/projects/project/demos/helpers.ts Text-1 "export const foo = 1;\n" - /home/src/projects/project/app/Component-demos.ts SVC-1-0 "import * as helpers from 'demos/helpers';\nexport const demo = () => {\n helpers;\n}\n" - /home/src/projects/project/app/Component.ts Text-1 "export const Component = () => {}\n" - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "configFileDiag", - "body": { - "triggerFile": "/home/src/projects/project/tsconfig.json", - "configFile": "/home/src/projects/project/tsconfig.json", - "diagnostics": [] - } - } Info seq [hh:mm:ss:mss] Running: *ensureProjectForOpenFiles* Info seq [hh:mm:ss:mss] Before ensureProjectForOpenFiles: Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/app/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (4) - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/demos/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (3) +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: Info seq [hh:mm:ss:mss] FileName: /home/src/projects/project/app/Component-demos.ts ProjectRootPath: undefined -Info seq [hh:mm:ss:mss] Projects: /home/src/projects/project/tsconfig.json,/home/src/projects/project/demos/tsconfig.json -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /home/src/projects/project/app/tsconfig.json ProjectRootPath: undefined:: Result: /home/src/projects/project/tsconfig.json -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /home/src/projects/project/demos/tsconfig.json ProjectRootPath: undefined:: Result: /home/src/projects/project/tsconfig.json +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* Info seq [hh:mm:ss:mss] After ensureProjectForOpenFiles: Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/app/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (4) - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/demos/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (3) +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: Info seq [hh:mm:ss:mss] FileName: /home/src/projects/project/app/Component-demos.ts ProjectRootPath: undefined -Info seq [hh:mm:ss:mss] Projects: /home/src/projects/project/tsconfig.json,/home/src/projects/project/demos/tsconfig.json +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* Info seq [hh:mm:ss:mss] got projects updated in background /home/src/projects/project/app/Component-demos.ts Info seq [hh:mm:ss:mss] event: { @@ -906,23 +577,20 @@ Info seq [hh:mm:ss:mss] event: After running Timeout callback:: count: 0 Projects:: -/home/src/projects/project/app/tsconfig.json (Configured) *changed* - projectStateVersion: 3 - projectProgramVersion: 1 - dirty: false *changed* -/home/src/projects/project/demos/tsconfig.json (Configured) +/dev/null/inferredProject1* (Inferred) projectStateVersion: 1 projectProgramVersion: 1 -/home/src/projects/project/tsconfig.json (Configured) *changed* +/home/src/projects/project/app/tsconfig.json (Configured) *changed* projectStateVersion: 3 - projectProgramVersion: 3 *changed* + projectProgramVersion: 1 dirty: false *changed* + noOpenRef: true *changed* Info seq [hh:mm:ss:mss] File: /home/src/projects/project/app/Component-demos.ts: getDefaultProjectForFile: - /home/src/projects/project/demos/tsconfig.json + /dev/null/inferredProject1* findDefaultConfiguredProject: - /home/src/projects/project/demos/tsconfig.json + undefined Before request Info seq [hh:mm:ss:mss] request: @@ -1036,25 +704,39 @@ Info seq [hh:mm:ss:mss] event: "diagnostics": [] } } +Info seq [hh:mm:ss:mss] `remove Project:: Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/app/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (2) + /a/lib/lib.d.ts + /home/src/projects/project/app/Component.ts + + + ../../../../../a/lib/lib.d.ts + Default library for target 'es5' + Component.ts + Matched by include pattern '**/*' in 'tsconfig.json' Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (4) - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/demos/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (3) +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/project/app 1 undefined Config: /home/src/projects/project/app/tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/project/app 1 undefined Config: /home/src/projects/project/app/tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/project/app/node_modules/@types 1 undefined Project: /home/src/projects/project/app/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/project/app/node_modules/@types 1 undefined Project: /home/src/projects/project/app/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/project/node_modules/@types 1 undefined Project: /home/src/projects/project/app/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/project/node_modules/@types 1 undefined Project: /home/src/projects/project/app/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/node_modules/@types 1 undefined Project: /home/src/projects/project/app/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/node_modules/@types 1 undefined Project: /home/src/projects/project/app/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /home/src/projects/project/app/Component.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Project '/home/src/projects/random/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/home/src/projects/random/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: Info seq [hh:mm:ss:mss] FileName: /home/src/projects/project/app/Component-demos.ts ProjectRootPath: undefined -Info seq [hh:mm:ss:mss] Projects: /home/src/projects/project/tsconfig.json,/home/src/projects/project/demos/tsconfig.json +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* Info seq [hh:mm:ss:mss] FileName: /home/src/projects/random/random.ts ProjectRootPath: undefined Info seq [hh:mm:ss:mss] Projects: /home/src/projects/random/tsconfig.json Info seq [hh:mm:ss:mss] response: @@ -1071,11 +753,19 @@ Info seq [hh:mm:ss:mss] response: After request PolledWatches:: +/home/src/projects/node_modules: + {"pollingInterval":500} /home/src/projects/node_modules/@types: {"pollingInterval":500} +/home/src/projects/project/app/jsconfig.json: + {"pollingInterval":2000} +/home/src/projects/project/app/node_modules: + {"pollingInterval":500} /home/src/projects/project/app/node_modules/@types: {"pollingInterval":500} -/home/src/projects/project/demos/node_modules/@types: +/home/src/projects/project/jsconfig.json: + {"pollingInterval":2000} +/home/src/projects/project/node_modules: {"pollingInterval":500} /home/src/projects/project/node_modules/@types: {"pollingInterval":500} @@ -1085,39 +775,34 @@ PolledWatches:: FsWatches:: /a/lib/lib.d.ts: {} -/home/src/projects/project/app/Component.ts: - {} /home/src/projects/project/app/tsconfig.json: {} -/home/src/projects/project/demos/helpers.ts: - {} -/home/src/projects/project/demos/tsconfig.json: - {} /home/src/projects/project/tsconfig.json: {} /home/src/projects/random/tsconfig.json: *new* {} +FsWatches *deleted*:: +/home/src/projects/project/app/Component.ts: + {} + FsWatchesRecursive:: -/home/src/projects/project: +/home/src/projects/random: *new* {} + +FsWatchesRecursive *deleted*:: /home/src/projects/project/app: {} -/home/src/projects/project/demos: - {} -/home/src/projects/random: *new* - {} Projects:: -/home/src/projects/project/app/tsconfig.json (Configured) - projectStateVersion: 3 - projectProgramVersion: 1 -/home/src/projects/project/demos/tsconfig.json (Configured) +/dev/null/inferredProject1* (Inferred) projectStateVersion: 1 projectProgramVersion: 1 -/home/src/projects/project/tsconfig.json (Configured) +/home/src/projects/project/app/tsconfig.json (Configured) *deleted* projectStateVersion: 3 - projectProgramVersion: 3 + projectProgramVersion: 1 + isClosed: true *changed* + noOpenRef: true /home/src/projects/random/tsconfig.json (Configured) *new* projectStateVersion: 1 projectProgramVersion: 1 @@ -1125,26 +810,18 @@ Projects:: ScriptInfos:: /a/lib/lib.d.ts *changed* version: Text-1 - containingProjects: 4 *changed* - /home/src/projects/project/app/tsconfig.json - /home/src/projects/project/tsconfig.json - /home/src/projects/project/demos/tsconfig.json + containingProjects: 2 *changed* + /dev/null/inferredProject1* /home/src/projects/random/tsconfig.json *new* + /home/src/projects/project/app/tsconfig.json *deleted* /home/src/projects/project/app/Component-demos.ts (Open) version: SVC-1-0 - containingProjects: 2 - /home/src/projects/project/tsconfig.json - /home/src/projects/project/demos/tsconfig.json *default* -/home/src/projects/project/app/Component.ts - version: Text-1 - containingProjects: 2 - /home/src/projects/project/app/tsconfig.json - /home/src/projects/project/tsconfig.json -/home/src/projects/project/demos/helpers.ts + containingProjects: 1 + /dev/null/inferredProject1* *default* +/home/src/projects/project/app/Component.ts *deleted* version: Text-1 - containingProjects: 2 - /home/src/projects/project/tsconfig.json - /home/src/projects/project/demos/tsconfig.json + containingProjects: 0 *changed* + /home/src/projects/project/app/tsconfig.json *deleted* /home/src/projects/random/random.ts (Open) *new* version: SVC-1-0 containingProjects: 1 @@ -1162,25 +839,17 @@ Info seq [hh:mm:ss:mss] request: "type": "request" } Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/projects/random/random.ts 500 undefined WatchType: Closed Script info -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/app/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Project '/home/src/projects/random/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (4) - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/demos/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (3) - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/home/src/projects/random/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: Info seq [hh:mm:ss:mss] FileName: /home/src/projects/project/app/Component-demos.ts ProjectRootPath: undefined -Info seq [hh:mm:ss:mss] Projects: /home/src/projects/project/tsconfig.json,/home/src/projects/project/demos/tsconfig.json +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* Info seq [hh:mm:ss:mss] response: { "seq": 0, @@ -1192,11 +861,19 @@ Info seq [hh:mm:ss:mss] response: After request PolledWatches:: +/home/src/projects/node_modules: + {"pollingInterval":500} /home/src/projects/node_modules/@types: {"pollingInterval":500} +/home/src/projects/project/app/jsconfig.json: + {"pollingInterval":2000} +/home/src/projects/project/app/node_modules: + {"pollingInterval":500} /home/src/projects/project/app/node_modules/@types: {"pollingInterval":500} -/home/src/projects/project/demos/node_modules/@types: +/home/src/projects/project/jsconfig.json: + {"pollingInterval":2000} +/home/src/projects/project/node_modules: {"pollingInterval":500} /home/src/projects/project/node_modules/@types: {"pollingInterval":500} @@ -1206,14 +883,8 @@ PolledWatches:: FsWatches:: /a/lib/lib.d.ts: {} -/home/src/projects/project/app/Component.ts: - {} /home/src/projects/project/app/tsconfig.json: {} -/home/src/projects/project/demos/helpers.ts: - {} -/home/src/projects/project/demos/tsconfig.json: - {} /home/src/projects/project/tsconfig.json: {} /home/src/projects/random/random.ts: *new* @@ -1222,25 +893,13 @@ FsWatches:: {} FsWatchesRecursive:: -/home/src/projects/project: - {} -/home/src/projects/project/app: - {} -/home/src/projects/project/demos: - {} /home/src/projects/random: {} Projects:: -/home/src/projects/project/app/tsconfig.json (Configured) - projectStateVersion: 3 - projectProgramVersion: 1 -/home/src/projects/project/demos/tsconfig.json (Configured) +/dev/null/inferredProject1* (Inferred) projectStateVersion: 1 projectProgramVersion: 1 -/home/src/projects/project/tsconfig.json (Configured) - projectStateVersion: 3 - projectProgramVersion: 3 /home/src/projects/random/tsconfig.json (Configured) *changed* projectStateVersion: 1 projectProgramVersion: 1 @@ -1249,26 +908,13 @@ Projects:: ScriptInfos:: /a/lib/lib.d.ts version: Text-1 - containingProjects: 4 - /home/src/projects/project/app/tsconfig.json - /home/src/projects/project/tsconfig.json - /home/src/projects/project/demos/tsconfig.json + containingProjects: 2 + /dev/null/inferredProject1* /home/src/projects/random/tsconfig.json /home/src/projects/project/app/Component-demos.ts (Open) version: SVC-1-0 - containingProjects: 2 - /home/src/projects/project/tsconfig.json - /home/src/projects/project/demos/tsconfig.json *default* -/home/src/projects/project/app/Component.ts - version: Text-1 - containingProjects: 2 - /home/src/projects/project/app/tsconfig.json - /home/src/projects/project/tsconfig.json -/home/src/projects/project/demos/helpers.ts - version: Text-1 - containingProjects: 2 - /home/src/projects/project/tsconfig.json - /home/src/projects/project/demos/tsconfig.json + containingProjects: 1 + /dev/null/inferredProject1* *default* /home/src/projects/random/random.ts *changed* open: false *changed* version: SVC-1-0 @@ -1277,6 +923,6 @@ ScriptInfos:: Info seq [hh:mm:ss:mss] File: /home/src/projects/project/app/Component-demos.ts: getDefaultProjectForFile: - /home/src/projects/project/demos/tsconfig.json + /dev/null/inferredProject1* findDefaultConfiguredProject: - /home/src/projects/project/demos/tsconfig.json \ No newline at end of file + undefined \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/projectReferences/when-file-is-not-part-of-first-config-tree-found-demoConfig-change-with-file-open-before-revert.js b/tests/baselines/reference/tsserver/projectReferences/when-file-is-not-part-of-first-config-tree-found-demoConfig-change-with-file-open-before-revert.js index f2304f6c604bf..ceb05d5d0cca9 100644 --- a/tests/baselines/reference/tsserver/projectReferences/when-file-is-not-part-of-first-config-tree-found-demoConfig-change-with-file-open-before-revert.js +++ b/tests/baselines/reference/tsserver/projectReferences/when-file-is-not-part-of-first-config-tree-found-demoConfig-change-with-file-open-before-revert.js @@ -203,271 +203,46 @@ Info seq [hh:mm:ss:mss] event: "diagnostics": [] } } -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /home/src/projects/project/app/tsconfig.json ProjectRootPath: undefined:: Result: /home/src/projects/project/tsconfig.json -Info seq [hh:mm:ss:mss] Creating configuration project /home/src/projects/project/tsconfig.json -Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/projects/project/tsconfig.json 2000 undefined Project: /home/src/projects/project/tsconfig.json WatchType: Config file -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "projectLoadingStart", - "body": { - "projectName": "/home/src/projects/project/tsconfig.json", - "reason": "Creating possible configured project for /home/src/projects/project/app/Component-demos.ts to open" - } - } -Info seq [hh:mm:ss:mss] Config: /home/src/projects/project/tsconfig.json : { - "rootNames": [ - "/home/src/projects/project/app/Component-demos.ts", - "/home/src/projects/project/app/Component.ts", - "/home/src/projects/project/demos/helpers.ts" - ], - "options": { - "outDir": "/home/src/projects/project/dist", - "configFilePath": "/home/src/projects/project/tsconfig.json" - }, - "projectReferences": [ - { - "path": "/home/src/projects/project/demos/tsconfig.json", - "originalPath": "./demos/tsconfig.json" - }, - { - "path": "/home/src/projects/project/app/tsconfig.json", - "originalPath": "./app/tsconfig.json" - } - ] -} -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project 1 undefined Config: /home/src/projects/project/tsconfig.json WatchType: Wild card directory -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project 1 undefined Config: /home/src/projects/project/tsconfig.json WatchType: Wild card directory -Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/projects/project/demos/helpers.ts 500 undefined WatchType: Closed Script info -Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /home/src/projects/project/tsconfig.json -Info seq [hh:mm:ss:mss] Config: /home/src/projects/project/demos/tsconfig.json : { - "rootNames": [ - "/home/src/projects/project/demos/helpers.ts", - "/home/src/projects/project/app/Component-demos.ts" - ], - "options": { - "composite": true, - "rootDir": "/home/src/projects/project", - "outDir": "/home/src/projects/project/demos-dist", - "paths": { - "demos/*": [ - "./*" - ] - }, - "pathsBasePath": "/home/src/projects/project/demos", - "configFilePath": "/home/src/projects/project/demos/tsconfig.json" - } -} -Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/projects/project/demos/tsconfig.json 2000 undefined Project: /home/src/projects/project/tsconfig.json WatchType: Config file -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/demos 1 undefined Config: /home/src/projects/project/demos/tsconfig.json WatchType: Wild card directory -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/demos 1 undefined Config: /home/src/projects/project/demos/tsconfig.json WatchType: Wild card directory -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/app 1 undefined Config: /home/src/projects/project/demos/tsconfig.json WatchType: Wild card directory -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/app 1 undefined Config: /home/src/projects/project/demos/tsconfig.json WatchType: Wild card directory -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/node_modules/@types 1 undefined Project: /home/src/projects/project/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/node_modules/@types 1 undefined Project: /home/src/projects/project/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/node_modules/@types 1 undefined Project: /home/src/projects/project/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/node_modules/@types 1 undefined Project: /home/src/projects/project/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /home/src/projects/project/tsconfig.json projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (4) - /a/lib/lib.d.ts Text-1 "/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }" - /home/src/projects/project/demos/helpers.ts Text-1 "export const foo = 1;\n" - /home/src/projects/project/app/Component-demos.ts SVC-1-0 "import * as helpers from 'demos/helpers';\nexport const demo = () => {\n helpers;\n}\n" - /home/src/projects/project/app/Component.ts Text-1 "export const Component = () => {}\n" - - - ../../../../a/lib/lib.d.ts - Default library for target 'es5' - demos/helpers.ts - Imported via 'demos/helpers' from file 'app/Component-demos.ts' - Matched by default include pattern '**/*' - app/Component-demos.ts - Matched by default include pattern '**/*' - app/Component.ts - Matched by default include pattern '**/*' - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "projectLoadingFinish", - "body": { - "projectName": "/home/src/projects/project/tsconfig.json" - } - } -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "telemetry", - "body": { - "telemetryEventName": "projectInfo", - "payload": { - "projectId": "1097a5f82e8323ba7aba7567ec06402f7ad4ea74abce44ec5efd223ac77ff169", - "fileStats": { - "js": 0, - "jsSize": 0, - "jsx": 0, - "jsxSize": 0, - "ts": 3, - "tsSize": 141, - "tsx": 0, - "tsxSize": 0, - "dts": 1, - "dtsSize": 334, - "deferred": 0, - "deferredSize": 0 - }, - "compilerOptions": { - "outDir": "" - }, - "typeAcquisition": { - "enable": false, - "include": false, - "exclude": false - }, - "extends": false, - "files": false, - "include": false, - "exclude": false, - "compileOnSave": false, - "configFileName": "tsconfig.json", - "projectType": "configured", - "languageServiceEnabled": true, - "version": "FakeVersion" - } - } - } -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "configFileDiag", - "body": { - "triggerFile": "/home/src/projects/project/app/Component-demos.ts", - "configFile": "/home/src/projects/project/tsconfig.json", - "diagnostics": [] - } - } -Info seq [hh:mm:ss:mss] Creating configuration project /home/src/projects/project/demos/tsconfig.json -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "projectLoadingStart", - "body": { - "projectName": "/home/src/projects/project/demos/tsconfig.json", - "reason": "Creating project referenced in solution /home/src/projects/project/tsconfig.json to find possible configured project for /home/src/projects/project/app/Component-demos.ts to open" - } - } -Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /home/src/projects/project/demos/tsconfig.json -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/demos/node_modules/@types 1 undefined Project: /home/src/projects/project/demos/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/demos/node_modules/@types 1 undefined Project: /home/src/projects/project/demos/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/node_modules/@types 1 undefined Project: /home/src/projects/project/demos/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/node_modules/@types 1 undefined Project: /home/src/projects/project/demos/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/node_modules/@types 1 undefined Project: /home/src/projects/project/demos/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/node_modules/@types 1 undefined Project: /home/src/projects/project/demos/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /home/src/projects/project/demos/tsconfig.json projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/demos/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (3) +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/projects/project/app/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/projects/project/tsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/projects/project/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/app/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/app/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/app/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/app/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (2) /a/lib/lib.d.ts Text-1 "/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }" - /home/src/projects/project/demos/helpers.ts Text-1 "export const foo = 1;\n" /home/src/projects/project/app/Component-demos.ts SVC-1-0 "import * as helpers from 'demos/helpers';\nexport const demo = () => {\n helpers;\n}\n" ../../../../../a/lib/lib.d.ts Default library for target 'es5' - helpers.ts - Matched by include pattern '**/*' in 'tsconfig.json' - Imported via 'demos/helpers' from file '../app/Component-demos.ts' - ../app/Component-demos.ts - Matched by include pattern '../app/**/*-demos.*' in 'tsconfig.json' + Component-demos.ts + Root file specified for compilation Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "projectLoadingFinish", - "body": { - "projectName": "/home/src/projects/project/demos/tsconfig.json" - } - } -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "telemetry", - "body": { - "telemetryEventName": "projectInfo", - "payload": { - "projectId": "528692a1575f61fd3bf7069493cc100a7cad975f6cd24c47b7a63b99928a8171", - "fileStats": { - "js": 0, - "jsSize": 0, - "jsx": 0, - "jsxSize": 0, - "ts": 2, - "tsSize": 107, - "tsx": 0, - "tsxSize": 0, - "dts": 1, - "dtsSize": 334, - "deferred": 0, - "deferredSize": 0 - }, - "compilerOptions": { - "composite": true, - "rootDir": "", - "outDir": "", - "paths": "" - }, - "typeAcquisition": { - "enable": false, - "include": false, - "exclude": false - }, - "extends": false, - "files": false, - "include": true, - "exclude": false, - "compileOnSave": false, - "configFileName": "tsconfig.json", - "projectType": "configured", - "languageServiceEnabled": true, - "version": "FakeVersion" - } - } - } -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "configFileDiag", - "body": { - "triggerFile": "/home/src/projects/project/app/Component-demos.ts", - "configFile": "/home/src/projects/project/demos/tsconfig.json", - "diagnostics": [] - } - } -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /home/src/projects/project/demos/tsconfig.json ProjectRootPath: undefined:: Result: /home/src/projects/project/tsconfig.json Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/app/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (4) - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/demos/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (3) +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: Info seq [hh:mm:ss:mss] FileName: /home/src/projects/project/app/Component-demos.ts ProjectRootPath: undefined -Info seq [hh:mm:ss:mss] Projects: /home/src/projects/project/tsconfig.json,/home/src/projects/project/demos/tsconfig.json +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* Info seq [hh:mm:ss:mss] response: { "seq": 0, @@ -481,323 +256,89 @@ Info seq [hh:mm:ss:mss] response: } After request -PolledWatches:: -/home/src/projects/node_modules/@types: *new* - {"pollingInterval":500} -/home/src/projects/project/app/node_modules/@types: *new* - {"pollingInterval":500} -/home/src/projects/project/demos/node_modules/@types: *new* - {"pollingInterval":500} -/home/src/projects/project/node_modules/@types: *new* - {"pollingInterval":500} - -FsWatches:: -/a/lib/lib.d.ts: *new* - {} -/home/src/projects/project/app/Component.ts: *new* - {} -/home/src/projects/project/app/tsconfig.json: *new* - {} -/home/src/projects/project/demos/helpers.ts: *new* - {} -/home/src/projects/project/demos/tsconfig.json: *new* - {} -/home/src/projects/project/tsconfig.json: *new* - {} - -FsWatchesRecursive:: -/home/src/projects/project: *new* - {} -/home/src/projects/project/app: *new* - {} -/home/src/projects/project/demos: *new* - {} - -Projects:: -/home/src/projects/project/app/tsconfig.json (Configured) *new* - projectStateVersion: 1 - projectProgramVersion: 1 -/home/src/projects/project/demos/tsconfig.json (Configured) *new* - projectStateVersion: 1 - projectProgramVersion: 1 -/home/src/projects/project/tsconfig.json (Configured) *new* - projectStateVersion: 1 - projectProgramVersion: 1 - -ScriptInfos:: -/a/lib/lib.d.ts *new* - version: Text-1 - containingProjects: 3 - /home/src/projects/project/app/tsconfig.json - /home/src/projects/project/tsconfig.json - /home/src/projects/project/demos/tsconfig.json -/home/src/projects/project/app/Component-demos.ts (Open) *new* - version: SVC-1-0 - containingProjects: 2 - /home/src/projects/project/tsconfig.json - /home/src/projects/project/demos/tsconfig.json *default* -/home/src/projects/project/app/Component.ts *new* - version: Text-1 - containingProjects: 2 - /home/src/projects/project/app/tsconfig.json - /home/src/projects/project/tsconfig.json -/home/src/projects/project/demos/helpers.ts *new* - version: Text-1 - containingProjects: 2 - /home/src/projects/project/tsconfig.json - /home/src/projects/project/demos/tsconfig.json - -Info seq [hh:mm:ss:mss] FileWatcher:: Triggered with /home/src/projects/project/demos/tsconfig.json 1:: WatchInfo: /home/src/projects/project/demos/tsconfig.json 2000 undefined Project: /home/src/projects/project/tsconfig.json WatchType: Config file -Info seq [hh:mm:ss:mss] Scheduled: /home/src/projects/project/tsconfig.json -Info seq [hh:mm:ss:mss] Scheduled: /home/src/projects/project/demos/tsconfig.json -Info seq [hh:mm:ss:mss] Scheduled: *ensureProjectForOpenFiles* -Info seq [hh:mm:ss:mss] Elapsed:: *ms FileWatcher:: Triggered with /home/src/projects/project/demos/tsconfig.json 1:: WatchInfo: /home/src/projects/project/demos/tsconfig.json 2000 undefined Project: /home/src/projects/project/tsconfig.json WatchType: Config file -Before running Timeout callback:: count: 3 -1: /home/src/projects/project/tsconfig.json -2: /home/src/projects/project/demos/tsconfig.json -3: *ensureProjectForOpenFiles* -//// [/home/src/projects/project/demos/tsconfig.json] -{ - "compilerOptions": { - "composite": true, - "rootDir": "../", - "outDir": "../demos-dist/", - "paths": { - "demos/*": [ - "./*" - ] - } - }, - "include": [ - "**/*", - - ] -} - - -Timeout callback:: count: 3 -1: /home/src/projects/project/tsconfig.json *new* -2: /home/src/projects/project/demos/tsconfig.json *new* -3: *ensureProjectForOpenFiles* *new* - -Projects:: -/home/src/projects/project/app/tsconfig.json (Configured) - projectStateVersion: 1 - projectProgramVersion: 1 -/home/src/projects/project/demos/tsconfig.json (Configured) *changed* - projectStateVersion: 2 *changed* - projectProgramVersion: 1 - dirty: true *changed* -/home/src/projects/project/tsconfig.json (Configured) *changed* - projectStateVersion: 2 *changed* - projectProgramVersion: 1 - dirty: true *changed* - -Info seq [hh:mm:ss:mss] Running: /home/src/projects/project/tsconfig.json -Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /home/src/projects/project/tsconfig.json -Info seq [hh:mm:ss:mss] Config: /home/src/projects/project/demos/tsconfig.json : { - "rootNames": [ - "/home/src/projects/project/demos/helpers.ts" - ], - "options": { - "composite": true, - "rootDir": "/home/src/projects/project", - "outDir": "/home/src/projects/project/demos-dist", - "paths": { - "demos/*": [ - "./*" - ] - }, - "pathsBasePath": "/home/src/projects/project/demos", - "configFilePath": "/home/src/projects/project/demos/tsconfig.json" - } -} -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/project/app 1 undefined Config: /home/src/projects/project/demos/tsconfig.json WatchType: Wild card directory -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/project/app 1 undefined Config: /home/src/projects/project/demos/tsconfig.json WatchType: Wild card directory -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/app 1 undefined Project: /home/src/projects/project/tsconfig.json WatchType: Failed Lookup Locations -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/app 1 undefined Project: /home/src/projects/project/tsconfig.json WatchType: Failed Lookup Locations -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/node_modules 1 undefined Project: /home/src/projects/project/tsconfig.json WatchType: Failed Lookup Locations -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/node_modules 1 undefined Project: /home/src/projects/project/tsconfig.json WatchType: Failed Lookup Locations -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/node_modules 1 undefined Project: /home/src/projects/project/tsconfig.json WatchType: Failed Lookup Locations -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/node_modules 1 undefined Project: /home/src/projects/project/tsconfig.json WatchType: Failed Lookup Locations -Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /home/src/projects/project/tsconfig.json projectStateVersion: 2 projectProgramVersion: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (4) - /a/lib/lib.d.ts Text-1 "/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }" - /home/src/projects/project/app/Component-demos.ts SVC-1-0 "import * as helpers from 'demos/helpers';\nexport const demo = () => {\n helpers;\n}\n" - /home/src/projects/project/app/Component.ts Text-1 "export const Component = () => {}\n" - /home/src/projects/project/demos/helpers.ts Text-1 "export const foo = 1;\n" - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Running: /home/src/projects/project/demos/tsconfig.json -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "projectLoadingStart", - "body": { - "projectName": "/home/src/projects/project/demos/tsconfig.json", - "reason": "Change in config file detected" - } - } -Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /home/src/projects/project/demos/tsconfig.json -Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /home/src/projects/project/demos/tsconfig.json projectStateVersion: 2 projectProgramVersion: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/demos/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (2) - /a/lib/lib.d.ts Text-1 "/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }" - /home/src/projects/project/demos/helpers.ts Text-1 "export const foo = 1;\n" - - - ../../../../../a/lib/lib.d.ts - Default library for target 'es5' - helpers.ts - Matched by include pattern '**/*' in 'tsconfig.json' - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "projectLoadingFinish", - "body": { - "projectName": "/home/src/projects/project/demos/tsconfig.json" - } - } -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "configFileDiag", - "body": { - "triggerFile": "/home/src/projects/project/demos/tsconfig.json", - "configFile": "/home/src/projects/project/demos/tsconfig.json", - "diagnostics": [] - } - } -Info seq [hh:mm:ss:mss] Running: *ensureProjectForOpenFiles* -Info seq [hh:mm:ss:mss] Before ensureProjectForOpenFiles: -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/app/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (2) - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (4) - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/demos/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (2) - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Open files: -Info seq [hh:mm:ss:mss] FileName: /home/src/projects/project/app/Component-demos.ts ProjectRootPath: undefined -Info seq [hh:mm:ss:mss] Projects: /home/src/projects/project/tsconfig.json -Info seq [hh:mm:ss:mss] After ensureProjectForOpenFiles: -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/app/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (2) - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (4) - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/demos/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (2) - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Open files: -Info seq [hh:mm:ss:mss] FileName: /home/src/projects/project/app/Component-demos.ts ProjectRootPath: undefined -Info seq [hh:mm:ss:mss] Projects: /home/src/projects/project/tsconfig.json -Info seq [hh:mm:ss:mss] got projects updated in background /home/src/projects/project/app/Component-demos.ts -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "projectsUpdatedInBackground", - "body": { - "openFiles": [ - "/home/src/projects/project/app/Component-demos.ts" - ] - } - } -After running Timeout callback:: count: 0 - PolledWatches:: /home/src/projects/node_modules: *new* {"pollingInterval":500} -/home/src/projects/node_modules/@types: +/home/src/projects/node_modules/@types: *new* {"pollingInterval":500} -/home/src/projects/project/app/node_modules/@types: +/home/src/projects/project/app/jsconfig.json: *new* + {"pollingInterval":2000} +/home/src/projects/project/app/node_modules: *new* {"pollingInterval":500} -/home/src/projects/project/demos/node_modules/@types: +/home/src/projects/project/app/node_modules/@types: *new* {"pollingInterval":500} +/home/src/projects/project/jsconfig.json: *new* + {"pollingInterval":2000} /home/src/projects/project/node_modules: *new* {"pollingInterval":500} -/home/src/projects/project/node_modules/@types: - {"pollingInterval":500} - -FsWatches:: -/a/lib/lib.d.ts: - {} -/home/src/projects/project/app/Component.ts: - {} -/home/src/projects/project/app/tsconfig.json: +/home/src/projects/project/node_modules/@types: *new* + {"pollingInterval":500} + +FsWatches:: +/a/lib/lib.d.ts: *new* {} -/home/src/projects/project/demos/helpers.ts: +/home/src/projects/project/app/Component.ts: *new* {} -/home/src/projects/project/demos/tsconfig.json: +/home/src/projects/project/app/tsconfig.json: *new* {} -/home/src/projects/project/tsconfig.json: +/home/src/projects/project/tsconfig.json: *new* {} FsWatchesRecursive:: -/home/src/projects/project: - {} -/home/src/projects/project/app: - {} -/home/src/projects/project/demos: +/home/src/projects/project/app: *new* {} Projects:: -/home/src/projects/project/app/tsconfig.json (Configured) +/dev/null/inferredProject1* (Inferred) *new* projectStateVersion: 1 projectProgramVersion: 1 -/home/src/projects/project/demos/tsconfig.json (Configured) *changed* - projectStateVersion: 2 - projectProgramVersion: 2 *changed* - dirty: false *changed* -/home/src/projects/project/tsconfig.json (Configured) *changed* - projectStateVersion: 2 - projectProgramVersion: 2 *changed* - dirty: false *changed* +/home/src/projects/project/app/tsconfig.json (Configured) *new* + projectStateVersion: 1 + projectProgramVersion: 1 + noOpenRef: true ScriptInfos:: -/a/lib/lib.d.ts +/a/lib/lib.d.ts *new* version: Text-1 - containingProjects: 3 + containingProjects: 2 /home/src/projects/project/app/tsconfig.json - /home/src/projects/project/tsconfig.json - /home/src/projects/project/demos/tsconfig.json -/home/src/projects/project/app/Component-demos.ts (Open) *changed* + /dev/null/inferredProject1* +/home/src/projects/project/app/Component-demos.ts (Open) *new* version: SVC-1-0 - containingProjects: 1 *changed* - /home/src/projects/project/tsconfig.json *default* - /home/src/projects/project/demos/tsconfig.json *deleted* -/home/src/projects/project/app/Component.ts + containingProjects: 1 + /dev/null/inferredProject1* *default* +/home/src/projects/project/app/Component.ts *new* version: Text-1 - containingProjects: 2 + containingProjects: 1 /home/src/projects/project/app/tsconfig.json - /home/src/projects/project/tsconfig.json -/home/src/projects/project/demos/helpers.ts - version: Text-1 - containingProjects: 2 - /home/src/projects/project/tsconfig.json - /home/src/projects/project/demos/tsconfig.json + +Before running Timeout callback:: count: 0 +//// [/home/src/projects/project/demos/tsconfig.json] +{ + "compilerOptions": { + "composite": true, + "rootDir": "../", + "outDir": "../demos-dist/", + "paths": { + "demos/*": [ + "./*" + ] + } + }, + "include": [ + "**/*", + + ] +} + + +After running Timeout callback:: count: 0 Info seq [hh:mm:ss:mss] File: /home/src/projects/project/app/Component-demos.ts: getDefaultProjectForFile: - /home/src/projects/project/tsconfig.json + /dev/null/inferredProject1* findDefaultConfiguredProject: - /home/src/projects/project/tsconfig.json + undefined Before request Info seq [hh:mm:ss:mss] request: @@ -911,25 +452,39 @@ Info seq [hh:mm:ss:mss] event: "diagnostics": [] } } +Info seq [hh:mm:ss:mss] `remove Project:: Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/app/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (2) + /a/lib/lib.d.ts + /home/src/projects/project/app/Component.ts + + + ../../../../../a/lib/lib.d.ts + Default library for target 'es5' + Component.ts + Matched by include pattern '**/*' in 'tsconfig.json' Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (4) - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/demos/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/project/app 1 undefined Config: /home/src/projects/project/app/tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/project/app 1 undefined Config: /home/src/projects/project/app/tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/project/app/node_modules/@types 1 undefined Project: /home/src/projects/project/app/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/project/app/node_modules/@types 1 undefined Project: /home/src/projects/project/app/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/project/node_modules/@types 1 undefined Project: /home/src/projects/project/app/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/project/node_modules/@types 1 undefined Project: /home/src/projects/project/app/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/node_modules/@types 1 undefined Project: /home/src/projects/project/app/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/node_modules/@types 1 undefined Project: /home/src/projects/project/app/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /home/src/projects/project/app/Component.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Project '/home/src/projects/random/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/home/src/projects/random/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: Info seq [hh:mm:ss:mss] FileName: /home/src/projects/project/app/Component-demos.ts ProjectRootPath: undefined -Info seq [hh:mm:ss:mss] Projects: /home/src/projects/project/tsconfig.json +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* Info seq [hh:mm:ss:mss] FileName: /home/src/projects/random/random.ts ProjectRootPath: undefined Info seq [hh:mm:ss:mss] Projects: /home/src/projects/random/tsconfig.json Info seq [hh:mm:ss:mss] response: @@ -950,10 +505,14 @@ PolledWatches:: {"pollingInterval":500} /home/src/projects/node_modules/@types: {"pollingInterval":500} -/home/src/projects/project/app/node_modules/@types: +/home/src/projects/project/app/jsconfig.json: + {"pollingInterval":2000} +/home/src/projects/project/app/node_modules: {"pollingInterval":500} -/home/src/projects/project/demos/node_modules/@types: +/home/src/projects/project/app/node_modules/@types: {"pollingInterval":500} +/home/src/projects/project/jsconfig.json: + {"pollingInterval":2000} /home/src/projects/project/node_modules: {"pollingInterval":500} /home/src/projects/project/node_modules/@types: @@ -964,39 +523,34 @@ PolledWatches:: FsWatches:: /a/lib/lib.d.ts: {} -/home/src/projects/project/app/Component.ts: - {} /home/src/projects/project/app/tsconfig.json: {} -/home/src/projects/project/demos/helpers.ts: - {} -/home/src/projects/project/demos/tsconfig.json: - {} /home/src/projects/project/tsconfig.json: {} /home/src/projects/random/tsconfig.json: *new* {} +FsWatches *deleted*:: +/home/src/projects/project/app/Component.ts: + {} + FsWatchesRecursive:: -/home/src/projects/project: +/home/src/projects/random: *new* {} + +FsWatchesRecursive *deleted*:: /home/src/projects/project/app: {} -/home/src/projects/project/demos: - {} -/home/src/projects/random: *new* - {} Projects:: -/home/src/projects/project/app/tsconfig.json (Configured) +/dev/null/inferredProject1* (Inferred) + projectStateVersion: 1 + projectProgramVersion: 1 +/home/src/projects/project/app/tsconfig.json (Configured) *deleted* projectStateVersion: 1 projectProgramVersion: 1 -/home/src/projects/project/demos/tsconfig.json (Configured) - projectStateVersion: 2 - projectProgramVersion: 2 -/home/src/projects/project/tsconfig.json (Configured) - projectStateVersion: 2 - projectProgramVersion: 2 + isClosed: true *changed* + noOpenRef: true /home/src/projects/random/tsconfig.json (Configured) *new* projectStateVersion: 1 projectProgramVersion: 1 @@ -1004,25 +558,18 @@ Projects:: ScriptInfos:: /a/lib/lib.d.ts *changed* version: Text-1 - containingProjects: 4 *changed* - /home/src/projects/project/app/tsconfig.json - /home/src/projects/project/tsconfig.json - /home/src/projects/project/demos/tsconfig.json + containingProjects: 2 *changed* + /dev/null/inferredProject1* /home/src/projects/random/tsconfig.json *new* + /home/src/projects/project/app/tsconfig.json *deleted* /home/src/projects/project/app/Component-demos.ts (Open) version: SVC-1-0 containingProjects: 1 - /home/src/projects/project/tsconfig.json *default* -/home/src/projects/project/app/Component.ts + /dev/null/inferredProject1* *default* +/home/src/projects/project/app/Component.ts *deleted* version: Text-1 - containingProjects: 2 - /home/src/projects/project/app/tsconfig.json - /home/src/projects/project/tsconfig.json -/home/src/projects/project/demos/helpers.ts - version: Text-1 - containingProjects: 2 - /home/src/projects/project/tsconfig.json - /home/src/projects/project/demos/tsconfig.json + containingProjects: 0 *changed* + /home/src/projects/project/app/tsconfig.json *deleted* /home/src/projects/random/random.ts (Open) *new* version: SVC-1-0 containingProjects: 1 @@ -1040,25 +587,17 @@ Info seq [hh:mm:ss:mss] request: "type": "request" } Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/projects/random/random.ts 500 undefined WatchType: Closed Script info -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/app/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (2) - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (4) - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/demos/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Project '/home/src/projects/random/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/home/src/projects/random/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: Info seq [hh:mm:ss:mss] FileName: /home/src/projects/project/app/Component-demos.ts ProjectRootPath: undefined -Info seq [hh:mm:ss:mss] Projects: /home/src/projects/project/tsconfig.json +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* Info seq [hh:mm:ss:mss] response: { "seq": 0, @@ -1074,10 +613,14 @@ PolledWatches:: {"pollingInterval":500} /home/src/projects/node_modules/@types: {"pollingInterval":500} -/home/src/projects/project/app/node_modules/@types: +/home/src/projects/project/app/jsconfig.json: + {"pollingInterval":2000} +/home/src/projects/project/app/node_modules: {"pollingInterval":500} -/home/src/projects/project/demos/node_modules/@types: +/home/src/projects/project/app/node_modules/@types: {"pollingInterval":500} +/home/src/projects/project/jsconfig.json: + {"pollingInterval":2000} /home/src/projects/project/node_modules: {"pollingInterval":500} /home/src/projects/project/node_modules/@types: @@ -1088,14 +631,8 @@ PolledWatches:: FsWatches:: /a/lib/lib.d.ts: {} -/home/src/projects/project/app/Component.ts: - {} /home/src/projects/project/app/tsconfig.json: {} -/home/src/projects/project/demos/helpers.ts: - {} -/home/src/projects/project/demos/tsconfig.json: - {} /home/src/projects/project/tsconfig.json: {} /home/src/projects/random/random.ts: *new* @@ -1104,25 +641,13 @@ FsWatches:: {} FsWatchesRecursive:: -/home/src/projects/project: - {} -/home/src/projects/project/app: - {} -/home/src/projects/project/demos: - {} /home/src/projects/random: {} Projects:: -/home/src/projects/project/app/tsconfig.json (Configured) +/dev/null/inferredProject1* (Inferred) projectStateVersion: 1 projectProgramVersion: 1 -/home/src/projects/project/demos/tsconfig.json (Configured) - projectStateVersion: 2 - projectProgramVersion: 2 -/home/src/projects/project/tsconfig.json (Configured) - projectStateVersion: 2 - projectProgramVersion: 2 /home/src/projects/random/tsconfig.json (Configured) *changed* projectStateVersion: 1 projectProgramVersion: 1 @@ -1131,25 +656,13 @@ Projects:: ScriptInfos:: /a/lib/lib.d.ts version: Text-1 - containingProjects: 4 - /home/src/projects/project/app/tsconfig.json - /home/src/projects/project/tsconfig.json - /home/src/projects/project/demos/tsconfig.json + containingProjects: 2 + /dev/null/inferredProject1* /home/src/projects/random/tsconfig.json /home/src/projects/project/app/Component-demos.ts (Open) version: SVC-1-0 containingProjects: 1 - /home/src/projects/project/tsconfig.json *default* -/home/src/projects/project/app/Component.ts - version: Text-1 - containingProjects: 2 - /home/src/projects/project/app/tsconfig.json - /home/src/projects/project/tsconfig.json -/home/src/projects/project/demos/helpers.ts - version: Text-1 - containingProjects: 2 - /home/src/projects/project/tsconfig.json - /home/src/projects/project/demos/tsconfig.json + /dev/null/inferredProject1* *default* /home/src/projects/random/random.ts *changed* open: false *changed* version: SVC-1-0 @@ -1158,18 +671,10 @@ ScriptInfos:: Info seq [hh:mm:ss:mss] File: /home/src/projects/project/app/Component-demos.ts: getDefaultProjectForFile: - /home/src/projects/project/tsconfig.json + /dev/null/inferredProject1* findDefaultConfiguredProject: - /home/src/projects/project/tsconfig.json -Info seq [hh:mm:ss:mss] FileWatcher:: Triggered with /home/src/projects/project/demos/tsconfig.json 1:: WatchInfo: /home/src/projects/project/demos/tsconfig.json 2000 undefined Project: /home/src/projects/project/tsconfig.json WatchType: Config file -Info seq [hh:mm:ss:mss] Scheduled: /home/src/projects/project/tsconfig.json -Info seq [hh:mm:ss:mss] Scheduled: /home/src/projects/project/demos/tsconfig.json -Info seq [hh:mm:ss:mss] Scheduled: *ensureProjectForOpenFiles* -Info seq [hh:mm:ss:mss] Elapsed:: *ms FileWatcher:: Triggered with /home/src/projects/project/demos/tsconfig.json 1:: WatchInfo: /home/src/projects/project/demos/tsconfig.json 2000 undefined Project: /home/src/projects/project/tsconfig.json WatchType: Config file -Before running Timeout callback:: count: 3 -4: /home/src/projects/project/tsconfig.json -5: /home/src/projects/project/demos/tsconfig.json -6: *ensureProjectForOpenFiles* + undefined +Before running Timeout callback:: count: 0 //// [/home/src/projects/project/demos/tsconfig.json] { "compilerOptions": { @@ -1189,262 +694,10 @@ Before running Timeout callback:: count: 3 } -Timeout callback:: count: 3 -4: /home/src/projects/project/tsconfig.json *new* -5: /home/src/projects/project/demos/tsconfig.json *new* -6: *ensureProjectForOpenFiles* *new* - -Projects:: -/home/src/projects/project/app/tsconfig.json (Configured) - projectStateVersion: 1 - projectProgramVersion: 1 -/home/src/projects/project/demos/tsconfig.json (Configured) *changed* - projectStateVersion: 3 *changed* - projectProgramVersion: 2 - dirty: true *changed* -/home/src/projects/project/tsconfig.json (Configured) *changed* - projectStateVersion: 3 *changed* - projectProgramVersion: 2 - dirty: true *changed* -/home/src/projects/random/tsconfig.json (Configured) - projectStateVersion: 1 - projectProgramVersion: 1 - noOpenRef: true - -Info seq [hh:mm:ss:mss] Running: /home/src/projects/project/tsconfig.json -Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /home/src/projects/project/tsconfig.json -Info seq [hh:mm:ss:mss] Config: /home/src/projects/project/demos/tsconfig.json : { - "rootNames": [ - "/home/src/projects/project/demos/helpers.ts", - "/home/src/projects/project/app/Component-demos.ts" - ], - "options": { - "composite": true, - "rootDir": "/home/src/projects/project", - "outDir": "/home/src/projects/project/demos-dist", - "paths": { - "demos/*": [ - "./*" - ] - }, - "pathsBasePath": "/home/src/projects/project/demos", - "configFilePath": "/home/src/projects/project/demos/tsconfig.json" - } -} -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/app 1 undefined Config: /home/src/projects/project/demos/tsconfig.json WatchType: Wild card directory -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/app 1 undefined Config: /home/src/projects/project/demos/tsconfig.json WatchType: Wild card directory -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/project/app 1 undefined Project: /home/src/projects/project/tsconfig.json WatchType: Failed Lookup Locations -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/project/app 1 undefined Project: /home/src/projects/project/tsconfig.json WatchType: Failed Lookup Locations -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/project/node_modules 1 undefined Project: /home/src/projects/project/tsconfig.json WatchType: Failed Lookup Locations -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/project/node_modules 1 undefined Project: /home/src/projects/project/tsconfig.json WatchType: Failed Lookup Locations -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/node_modules 1 undefined Project: /home/src/projects/project/tsconfig.json WatchType: Failed Lookup Locations -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/node_modules 1 undefined Project: /home/src/projects/project/tsconfig.json WatchType: Failed Lookup Locations -Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /home/src/projects/project/tsconfig.json projectStateVersion: 3 projectProgramVersion: 2 structureChanged: true structureIsReused:: Not Elapsed:: *ms -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (4) - /a/lib/lib.d.ts Text-1 "/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }" - /home/src/projects/project/demos/helpers.ts Text-1 "export const foo = 1;\n" - /home/src/projects/project/app/Component-demos.ts SVC-1-0 "import * as helpers from 'demos/helpers';\nexport const demo = () => {\n helpers;\n}\n" - /home/src/projects/project/app/Component.ts Text-1 "export const Component = () => {}\n" - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Running: /home/src/projects/project/demos/tsconfig.json -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "projectLoadingStart", - "body": { - "projectName": "/home/src/projects/project/demos/tsconfig.json", - "reason": "Change in config file detected" - } - } -Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /home/src/projects/project/demos/tsconfig.json -Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /home/src/projects/project/demos/tsconfig.json projectStateVersion: 3 projectProgramVersion: 2 structureChanged: true structureIsReused:: Not Elapsed:: *ms -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/demos/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (3) - /a/lib/lib.d.ts Text-1 "/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }" - /home/src/projects/project/demos/helpers.ts Text-1 "export const foo = 1;\n" - /home/src/projects/project/app/Component-demos.ts SVC-1-0 "import * as helpers from 'demos/helpers';\nexport const demo = () => {\n helpers;\n}\n" - - - ../../../../../a/lib/lib.d.ts - Default library for target 'es5' - helpers.ts - Matched by include pattern '**/*' in 'tsconfig.json' - Imported via 'demos/helpers' from file '../app/Component-demos.ts' - ../app/Component-demos.ts - Matched by include pattern '../app/**/*-demos.*' in 'tsconfig.json' - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "projectLoadingFinish", - "body": { - "projectName": "/home/src/projects/project/demos/tsconfig.json" - } - } -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "configFileDiag", - "body": { - "triggerFile": "/home/src/projects/project/demos/tsconfig.json", - "configFile": "/home/src/projects/project/demos/tsconfig.json", - "diagnostics": [] - } - } -Info seq [hh:mm:ss:mss] Running: *ensureProjectForOpenFiles* -Info seq [hh:mm:ss:mss] Before ensureProjectForOpenFiles: -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/app/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (2) - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (4) - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/demos/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (3) - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/home/src/projects/random/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (2) - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Open files: -Info seq [hh:mm:ss:mss] FileName: /home/src/projects/project/app/Component-demos.ts ProjectRootPath: undefined -Info seq [hh:mm:ss:mss] Projects: /home/src/projects/project/tsconfig.json,/home/src/projects/project/demos/tsconfig.json -Info seq [hh:mm:ss:mss] After ensureProjectForOpenFiles: -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/app/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (2) - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (4) - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/demos/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (3) - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/home/src/projects/random/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (2) - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Open files: -Info seq [hh:mm:ss:mss] FileName: /home/src/projects/project/app/Component-demos.ts ProjectRootPath: undefined -Info seq [hh:mm:ss:mss] Projects: /home/src/projects/project/tsconfig.json,/home/src/projects/project/demos/tsconfig.json -Info seq [hh:mm:ss:mss] got projects updated in background /home/src/projects/project/app/Component-demos.ts -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "projectsUpdatedInBackground", - "body": { - "openFiles": [ - "/home/src/projects/project/app/Component-demos.ts" - ] - } - } After running Timeout callback:: count: 0 -PolledWatches:: -/home/src/projects/node_modules/@types: - {"pollingInterval":500} -/home/src/projects/project/app/node_modules/@types: - {"pollingInterval":500} -/home/src/projects/project/demos/node_modules/@types: - {"pollingInterval":500} -/home/src/projects/project/node_modules/@types: - {"pollingInterval":500} -/home/src/projects/random/node_modules/@types: - {"pollingInterval":500} - -PolledWatches *deleted*:: -/home/src/projects/node_modules: - {"pollingInterval":500} -/home/src/projects/project/node_modules: - {"pollingInterval":500} - -FsWatches:: -/a/lib/lib.d.ts: - {} -/home/src/projects/project/app/Component.ts: - {} -/home/src/projects/project/app/tsconfig.json: - {} -/home/src/projects/project/demos/helpers.ts: - {} -/home/src/projects/project/demos/tsconfig.json: - {} -/home/src/projects/project/tsconfig.json: - {} -/home/src/projects/random/random.ts: - {} -/home/src/projects/random/tsconfig.json: - {} - -FsWatchesRecursive:: -/home/src/projects/project: - {} -/home/src/projects/project/app: - {} -/home/src/projects/project/demos: - {} -/home/src/projects/random: - {} - -Projects:: -/home/src/projects/project/app/tsconfig.json (Configured) - projectStateVersion: 1 - projectProgramVersion: 1 -/home/src/projects/project/demos/tsconfig.json (Configured) *changed* - projectStateVersion: 3 - projectProgramVersion: 3 *changed* - dirty: false *changed* -/home/src/projects/project/tsconfig.json (Configured) *changed* - projectStateVersion: 3 - projectProgramVersion: 3 *changed* - dirty: false *changed* -/home/src/projects/random/tsconfig.json (Configured) - projectStateVersion: 1 - projectProgramVersion: 1 - noOpenRef: true - -ScriptInfos:: -/a/lib/lib.d.ts - version: Text-1 - containingProjects: 4 - /home/src/projects/project/app/tsconfig.json - /home/src/projects/project/tsconfig.json - /home/src/projects/project/demos/tsconfig.json - /home/src/projects/random/tsconfig.json -/home/src/projects/project/app/Component-demos.ts (Open) *changed* - version: SVC-1-0 - containingProjects: 2 *changed* - /home/src/projects/project/tsconfig.json - /home/src/projects/project/demos/tsconfig.json *default* *new* -/home/src/projects/project/app/Component.ts - version: Text-1 - containingProjects: 2 - /home/src/projects/project/app/tsconfig.json - /home/src/projects/project/tsconfig.json -/home/src/projects/project/demos/helpers.ts - version: Text-1 - containingProjects: 2 - /home/src/projects/project/tsconfig.json - /home/src/projects/project/demos/tsconfig.json -/home/src/projects/random/random.ts - version: SVC-1-0 - containingProjects: 1 - /home/src/projects/random/tsconfig.json - Info seq [hh:mm:ss:mss] File: /home/src/projects/project/app/Component-demos.ts: getDefaultProjectForFile: - /home/src/projects/project/demos/tsconfig.json + /dev/null/inferredProject1* findDefaultConfiguredProject: - /home/src/projects/project/demos/tsconfig.json \ No newline at end of file + undefined \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/projectReferences/when-file-is-not-part-of-first-config-tree-found-demoConfig-change.js b/tests/baselines/reference/tsserver/projectReferences/when-file-is-not-part-of-first-config-tree-found-demoConfig-change.js index bbbba535a7094..2464823021e00 100644 --- a/tests/baselines/reference/tsserver/projectReferences/when-file-is-not-part-of-first-config-tree-found-demoConfig-change.js +++ b/tests/baselines/reference/tsserver/projectReferences/when-file-is-not-part-of-first-config-tree-found-demoConfig-change.js @@ -203,271 +203,46 @@ Info seq [hh:mm:ss:mss] event: "diagnostics": [] } } -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /home/src/projects/project/app/tsconfig.json ProjectRootPath: undefined:: Result: /home/src/projects/project/tsconfig.json -Info seq [hh:mm:ss:mss] Creating configuration project /home/src/projects/project/tsconfig.json -Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/projects/project/tsconfig.json 2000 undefined Project: /home/src/projects/project/tsconfig.json WatchType: Config file -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "projectLoadingStart", - "body": { - "projectName": "/home/src/projects/project/tsconfig.json", - "reason": "Creating possible configured project for /home/src/projects/project/app/Component-demos.ts to open" - } - } -Info seq [hh:mm:ss:mss] Config: /home/src/projects/project/tsconfig.json : { - "rootNames": [ - "/home/src/projects/project/app/Component-demos.ts", - "/home/src/projects/project/app/Component.ts", - "/home/src/projects/project/demos/helpers.ts" - ], - "options": { - "outDir": "/home/src/projects/project/dist", - "configFilePath": "/home/src/projects/project/tsconfig.json" - }, - "projectReferences": [ - { - "path": "/home/src/projects/project/demos/tsconfig.json", - "originalPath": "./demos/tsconfig.json" - }, - { - "path": "/home/src/projects/project/app/tsconfig.json", - "originalPath": "./app/tsconfig.json" - } - ] -} -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project 1 undefined Config: /home/src/projects/project/tsconfig.json WatchType: Wild card directory -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project 1 undefined Config: /home/src/projects/project/tsconfig.json WatchType: Wild card directory -Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/projects/project/demos/helpers.ts 500 undefined WatchType: Closed Script info -Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /home/src/projects/project/tsconfig.json -Info seq [hh:mm:ss:mss] Config: /home/src/projects/project/demos/tsconfig.json : { - "rootNames": [ - "/home/src/projects/project/demos/helpers.ts", - "/home/src/projects/project/app/Component-demos.ts" - ], - "options": { - "composite": true, - "rootDir": "/home/src/projects/project", - "outDir": "/home/src/projects/project/demos-dist", - "paths": { - "demos/*": [ - "./*" - ] - }, - "pathsBasePath": "/home/src/projects/project/demos", - "configFilePath": "/home/src/projects/project/demos/tsconfig.json" - } -} -Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/projects/project/demos/tsconfig.json 2000 undefined Project: /home/src/projects/project/tsconfig.json WatchType: Config file -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/demos 1 undefined Config: /home/src/projects/project/demos/tsconfig.json WatchType: Wild card directory -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/demos 1 undefined Config: /home/src/projects/project/demos/tsconfig.json WatchType: Wild card directory -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/app 1 undefined Config: /home/src/projects/project/demos/tsconfig.json WatchType: Wild card directory -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/app 1 undefined Config: /home/src/projects/project/demos/tsconfig.json WatchType: Wild card directory -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/node_modules/@types 1 undefined Project: /home/src/projects/project/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/node_modules/@types 1 undefined Project: /home/src/projects/project/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/node_modules/@types 1 undefined Project: /home/src/projects/project/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/node_modules/@types 1 undefined Project: /home/src/projects/project/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /home/src/projects/project/tsconfig.json projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (4) - /a/lib/lib.d.ts Text-1 "/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }" - /home/src/projects/project/demos/helpers.ts Text-1 "export const foo = 1;\n" - /home/src/projects/project/app/Component-demos.ts SVC-1-0 "import * as helpers from 'demos/helpers';\nexport const demo = () => {\n helpers;\n}\n" - /home/src/projects/project/app/Component.ts Text-1 "export const Component = () => {}\n" - - - ../../../../a/lib/lib.d.ts - Default library for target 'es5' - demos/helpers.ts - Imported via 'demos/helpers' from file 'app/Component-demos.ts' - Matched by default include pattern '**/*' - app/Component-demos.ts - Matched by default include pattern '**/*' - app/Component.ts - Matched by default include pattern '**/*' - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "projectLoadingFinish", - "body": { - "projectName": "/home/src/projects/project/tsconfig.json" - } - } -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "telemetry", - "body": { - "telemetryEventName": "projectInfo", - "payload": { - "projectId": "1097a5f82e8323ba7aba7567ec06402f7ad4ea74abce44ec5efd223ac77ff169", - "fileStats": { - "js": 0, - "jsSize": 0, - "jsx": 0, - "jsxSize": 0, - "ts": 3, - "tsSize": 141, - "tsx": 0, - "tsxSize": 0, - "dts": 1, - "dtsSize": 334, - "deferred": 0, - "deferredSize": 0 - }, - "compilerOptions": { - "outDir": "" - }, - "typeAcquisition": { - "enable": false, - "include": false, - "exclude": false - }, - "extends": false, - "files": false, - "include": false, - "exclude": false, - "compileOnSave": false, - "configFileName": "tsconfig.json", - "projectType": "configured", - "languageServiceEnabled": true, - "version": "FakeVersion" - } - } - } -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "configFileDiag", - "body": { - "triggerFile": "/home/src/projects/project/app/Component-demos.ts", - "configFile": "/home/src/projects/project/tsconfig.json", - "diagnostics": [] - } - } -Info seq [hh:mm:ss:mss] Creating configuration project /home/src/projects/project/demos/tsconfig.json -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "projectLoadingStart", - "body": { - "projectName": "/home/src/projects/project/demos/tsconfig.json", - "reason": "Creating project referenced in solution /home/src/projects/project/tsconfig.json to find possible configured project for /home/src/projects/project/app/Component-demos.ts to open" - } - } -Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /home/src/projects/project/demos/tsconfig.json -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/demos/node_modules/@types 1 undefined Project: /home/src/projects/project/demos/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/demos/node_modules/@types 1 undefined Project: /home/src/projects/project/demos/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/node_modules/@types 1 undefined Project: /home/src/projects/project/demos/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/node_modules/@types 1 undefined Project: /home/src/projects/project/demos/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/node_modules/@types 1 undefined Project: /home/src/projects/project/demos/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/node_modules/@types 1 undefined Project: /home/src/projects/project/demos/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /home/src/projects/project/demos/tsconfig.json projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/demos/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (3) +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/projects/project/app/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/projects/project/tsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/projects/project/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/app/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/app/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/app/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/app/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (2) /a/lib/lib.d.ts Text-1 "/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }" - /home/src/projects/project/demos/helpers.ts Text-1 "export const foo = 1;\n" /home/src/projects/project/app/Component-demos.ts SVC-1-0 "import * as helpers from 'demos/helpers';\nexport const demo = () => {\n helpers;\n}\n" ../../../../../a/lib/lib.d.ts Default library for target 'es5' - helpers.ts - Matched by include pattern '**/*' in 'tsconfig.json' - Imported via 'demos/helpers' from file '../app/Component-demos.ts' - ../app/Component-demos.ts - Matched by include pattern '../app/**/*-demos.*' in 'tsconfig.json' + Component-demos.ts + Root file specified for compilation Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "projectLoadingFinish", - "body": { - "projectName": "/home/src/projects/project/demos/tsconfig.json" - } - } -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "telemetry", - "body": { - "telemetryEventName": "projectInfo", - "payload": { - "projectId": "528692a1575f61fd3bf7069493cc100a7cad975f6cd24c47b7a63b99928a8171", - "fileStats": { - "js": 0, - "jsSize": 0, - "jsx": 0, - "jsxSize": 0, - "ts": 2, - "tsSize": 107, - "tsx": 0, - "tsxSize": 0, - "dts": 1, - "dtsSize": 334, - "deferred": 0, - "deferredSize": 0 - }, - "compilerOptions": { - "composite": true, - "rootDir": "", - "outDir": "", - "paths": "" - }, - "typeAcquisition": { - "enable": false, - "include": false, - "exclude": false - }, - "extends": false, - "files": false, - "include": true, - "exclude": false, - "compileOnSave": false, - "configFileName": "tsconfig.json", - "projectType": "configured", - "languageServiceEnabled": true, - "version": "FakeVersion" - } - } - } -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "configFileDiag", - "body": { - "triggerFile": "/home/src/projects/project/app/Component-demos.ts", - "configFile": "/home/src/projects/project/demos/tsconfig.json", - "diagnostics": [] - } - } -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /home/src/projects/project/demos/tsconfig.json ProjectRootPath: undefined:: Result: /home/src/projects/project/tsconfig.json Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/app/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (4) - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/demos/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (3) +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: Info seq [hh:mm:ss:mss] FileName: /home/src/projects/project/app/Component-demos.ts ProjectRootPath: undefined -Info seq [hh:mm:ss:mss] Projects: /home/src/projects/project/tsconfig.json,/home/src/projects/project/demos/tsconfig.json +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* Info seq [hh:mm:ss:mss] response: { "seq": 0, @@ -482,11 +257,19 @@ Info seq [hh:mm:ss:mss] response: After request PolledWatches:: +/home/src/projects/node_modules: *new* + {"pollingInterval":500} /home/src/projects/node_modules/@types: *new* {"pollingInterval":500} +/home/src/projects/project/app/jsconfig.json: *new* + {"pollingInterval":2000} +/home/src/projects/project/app/node_modules: *new* + {"pollingInterval":500} /home/src/projects/project/app/node_modules/@types: *new* {"pollingInterval":500} -/home/src/projects/project/demos/node_modules/@types: *new* +/home/src/projects/project/jsconfig.json: *new* + {"pollingInterval":2000} +/home/src/projects/project/node_modules: *new* {"pollingInterval":500} /home/src/projects/project/node_modules/@types: *new* {"pollingInterval":500} @@ -498,64 +281,38 @@ FsWatches:: {} /home/src/projects/project/app/tsconfig.json: *new* {} -/home/src/projects/project/demos/helpers.ts: *new* - {} -/home/src/projects/project/demos/tsconfig.json: *new* - {} /home/src/projects/project/tsconfig.json: *new* {} FsWatchesRecursive:: -/home/src/projects/project: *new* - {} /home/src/projects/project/app: *new* {} -/home/src/projects/project/demos: *new* - {} Projects:: -/home/src/projects/project/app/tsconfig.json (Configured) *new* - projectStateVersion: 1 - projectProgramVersion: 1 -/home/src/projects/project/demos/tsconfig.json (Configured) *new* +/dev/null/inferredProject1* (Inferred) *new* projectStateVersion: 1 projectProgramVersion: 1 -/home/src/projects/project/tsconfig.json (Configured) *new* +/home/src/projects/project/app/tsconfig.json (Configured) *new* projectStateVersion: 1 projectProgramVersion: 1 + noOpenRef: true ScriptInfos:: /a/lib/lib.d.ts *new* version: Text-1 - containingProjects: 3 + containingProjects: 2 /home/src/projects/project/app/tsconfig.json - /home/src/projects/project/tsconfig.json - /home/src/projects/project/demos/tsconfig.json + /dev/null/inferredProject1* /home/src/projects/project/app/Component-demos.ts (Open) *new* version: SVC-1-0 - containingProjects: 2 - /home/src/projects/project/tsconfig.json - /home/src/projects/project/demos/tsconfig.json *default* + containingProjects: 1 + /dev/null/inferredProject1* *default* /home/src/projects/project/app/Component.ts *new* version: Text-1 - containingProjects: 2 + containingProjects: 1 /home/src/projects/project/app/tsconfig.json - /home/src/projects/project/tsconfig.json -/home/src/projects/project/demos/helpers.ts *new* - version: Text-1 - containingProjects: 2 - /home/src/projects/project/tsconfig.json - /home/src/projects/project/demos/tsconfig.json -Info seq [hh:mm:ss:mss] FileWatcher:: Triggered with /home/src/projects/project/demos/tsconfig.json 1:: WatchInfo: /home/src/projects/project/demos/tsconfig.json 2000 undefined Project: /home/src/projects/project/tsconfig.json WatchType: Config file -Info seq [hh:mm:ss:mss] Scheduled: /home/src/projects/project/tsconfig.json -Info seq [hh:mm:ss:mss] Scheduled: /home/src/projects/project/demos/tsconfig.json -Info seq [hh:mm:ss:mss] Scheduled: *ensureProjectForOpenFiles* -Info seq [hh:mm:ss:mss] Elapsed:: *ms FileWatcher:: Triggered with /home/src/projects/project/demos/tsconfig.json 1:: WatchInfo: /home/src/projects/project/demos/tsconfig.json 2000 undefined Project: /home/src/projects/project/tsconfig.json WatchType: Config file -Before running Timeout callback:: count: 3 -1: /home/src/projects/project/tsconfig.json -2: /home/src/projects/project/demos/tsconfig.json -3: *ensureProjectForOpenFiles* +Before running Timeout callback:: count: 0 //// [/home/src/projects/project/demos/tsconfig.json] { "compilerOptions": { @@ -575,238 +332,14 @@ Before running Timeout callback:: count: 3 } -Timeout callback:: count: 3 -1: /home/src/projects/project/tsconfig.json *new* -2: /home/src/projects/project/demos/tsconfig.json *new* -3: *ensureProjectForOpenFiles* *new* - -Projects:: -/home/src/projects/project/app/tsconfig.json (Configured) - projectStateVersion: 1 - projectProgramVersion: 1 -/home/src/projects/project/demos/tsconfig.json (Configured) *changed* - projectStateVersion: 2 *changed* - projectProgramVersion: 1 - dirty: true *changed* -/home/src/projects/project/tsconfig.json (Configured) *changed* - projectStateVersion: 2 *changed* - projectProgramVersion: 1 - dirty: true *changed* - -Info seq [hh:mm:ss:mss] Running: /home/src/projects/project/tsconfig.json -Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /home/src/projects/project/tsconfig.json -Info seq [hh:mm:ss:mss] Config: /home/src/projects/project/demos/tsconfig.json : { - "rootNames": [ - "/home/src/projects/project/demos/helpers.ts" - ], - "options": { - "composite": true, - "rootDir": "/home/src/projects/project", - "outDir": "/home/src/projects/project/demos-dist", - "paths": { - "demos/*": [ - "./*" - ] - }, - "pathsBasePath": "/home/src/projects/project/demos", - "configFilePath": "/home/src/projects/project/demos/tsconfig.json" - } -} -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/project/app 1 undefined Config: /home/src/projects/project/demos/tsconfig.json WatchType: Wild card directory -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/project/app 1 undefined Config: /home/src/projects/project/demos/tsconfig.json WatchType: Wild card directory -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/app 1 undefined Project: /home/src/projects/project/tsconfig.json WatchType: Failed Lookup Locations -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/app 1 undefined Project: /home/src/projects/project/tsconfig.json WatchType: Failed Lookup Locations -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/node_modules 1 undefined Project: /home/src/projects/project/tsconfig.json WatchType: Failed Lookup Locations -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/node_modules 1 undefined Project: /home/src/projects/project/tsconfig.json WatchType: Failed Lookup Locations -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/node_modules 1 undefined Project: /home/src/projects/project/tsconfig.json WatchType: Failed Lookup Locations -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/node_modules 1 undefined Project: /home/src/projects/project/tsconfig.json WatchType: Failed Lookup Locations -Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /home/src/projects/project/tsconfig.json projectStateVersion: 2 projectProgramVersion: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (4) - /a/lib/lib.d.ts Text-1 "/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }" - /home/src/projects/project/app/Component-demos.ts SVC-1-0 "import * as helpers from 'demos/helpers';\nexport const demo = () => {\n helpers;\n}\n" - /home/src/projects/project/app/Component.ts Text-1 "export const Component = () => {}\n" - /home/src/projects/project/demos/helpers.ts Text-1 "export const foo = 1;\n" - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Running: /home/src/projects/project/demos/tsconfig.json -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "projectLoadingStart", - "body": { - "projectName": "/home/src/projects/project/demos/tsconfig.json", - "reason": "Change in config file detected" - } - } -Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /home/src/projects/project/demos/tsconfig.json -Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /home/src/projects/project/demos/tsconfig.json projectStateVersion: 2 projectProgramVersion: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/demos/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (2) - /a/lib/lib.d.ts Text-1 "/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }" - /home/src/projects/project/demos/helpers.ts Text-1 "export const foo = 1;\n" - - - ../../../../../a/lib/lib.d.ts - Default library for target 'es5' - helpers.ts - Matched by include pattern '**/*' in 'tsconfig.json' - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "projectLoadingFinish", - "body": { - "projectName": "/home/src/projects/project/demos/tsconfig.json" - } - } -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "configFileDiag", - "body": { - "triggerFile": "/home/src/projects/project/demos/tsconfig.json", - "configFile": "/home/src/projects/project/demos/tsconfig.json", - "diagnostics": [] - } - } -Info seq [hh:mm:ss:mss] Running: *ensureProjectForOpenFiles* -Info seq [hh:mm:ss:mss] Before ensureProjectForOpenFiles: -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/app/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (2) - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (4) - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/demos/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (2) - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Open files: -Info seq [hh:mm:ss:mss] FileName: /home/src/projects/project/app/Component-demos.ts ProjectRootPath: undefined -Info seq [hh:mm:ss:mss] Projects: /home/src/projects/project/tsconfig.json -Info seq [hh:mm:ss:mss] After ensureProjectForOpenFiles: -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/app/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (2) - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (4) - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/demos/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (2) - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Open files: -Info seq [hh:mm:ss:mss] FileName: /home/src/projects/project/app/Component-demos.ts ProjectRootPath: undefined -Info seq [hh:mm:ss:mss] Projects: /home/src/projects/project/tsconfig.json -Info seq [hh:mm:ss:mss] got projects updated in background /home/src/projects/project/app/Component-demos.ts -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "projectsUpdatedInBackground", - "body": { - "openFiles": [ - "/home/src/projects/project/app/Component-demos.ts" - ] - } - } After running Timeout callback:: count: 0 -PolledWatches:: -/home/src/projects/node_modules: *new* - {"pollingInterval":500} -/home/src/projects/node_modules/@types: - {"pollingInterval":500} -/home/src/projects/project/app/node_modules/@types: - {"pollingInterval":500} -/home/src/projects/project/demos/node_modules/@types: - {"pollingInterval":500} -/home/src/projects/project/node_modules: *new* - {"pollingInterval":500} -/home/src/projects/project/node_modules/@types: - {"pollingInterval":500} - -FsWatches:: -/a/lib/lib.d.ts: - {} -/home/src/projects/project/app/Component.ts: - {} -/home/src/projects/project/app/tsconfig.json: - {} -/home/src/projects/project/demos/helpers.ts: - {} -/home/src/projects/project/demos/tsconfig.json: - {} -/home/src/projects/project/tsconfig.json: - {} - -FsWatchesRecursive:: -/home/src/projects/project: - {} -/home/src/projects/project/app: - {} -/home/src/projects/project/demos: - {} - -Projects:: -/home/src/projects/project/app/tsconfig.json (Configured) - projectStateVersion: 1 - projectProgramVersion: 1 -/home/src/projects/project/demos/tsconfig.json (Configured) *changed* - projectStateVersion: 2 - projectProgramVersion: 2 *changed* - dirty: false *changed* -/home/src/projects/project/tsconfig.json (Configured) *changed* - projectStateVersion: 2 - projectProgramVersion: 2 *changed* - dirty: false *changed* - -ScriptInfos:: -/a/lib/lib.d.ts - version: Text-1 - containingProjects: 3 - /home/src/projects/project/app/tsconfig.json - /home/src/projects/project/tsconfig.json - /home/src/projects/project/demos/tsconfig.json -/home/src/projects/project/app/Component-demos.ts (Open) *changed* - version: SVC-1-0 - containingProjects: 1 *changed* - /home/src/projects/project/tsconfig.json *default* - /home/src/projects/project/demos/tsconfig.json *deleted* -/home/src/projects/project/app/Component.ts - version: Text-1 - containingProjects: 2 - /home/src/projects/project/app/tsconfig.json - /home/src/projects/project/tsconfig.json -/home/src/projects/project/demos/helpers.ts - version: Text-1 - containingProjects: 2 - /home/src/projects/project/tsconfig.json - /home/src/projects/project/demos/tsconfig.json - Info seq [hh:mm:ss:mss] File: /home/src/projects/project/app/Component-demos.ts: getDefaultProjectForFile: - /home/src/projects/project/tsconfig.json + /dev/null/inferredProject1* findDefaultConfiguredProject: - /home/src/projects/project/tsconfig.json -Info seq [hh:mm:ss:mss] FileWatcher:: Triggered with /home/src/projects/project/demos/tsconfig.json 1:: WatchInfo: /home/src/projects/project/demos/tsconfig.json 2000 undefined Project: /home/src/projects/project/tsconfig.json WatchType: Config file -Info seq [hh:mm:ss:mss] Scheduled: /home/src/projects/project/tsconfig.json -Info seq [hh:mm:ss:mss] Scheduled: /home/src/projects/project/demos/tsconfig.json -Info seq [hh:mm:ss:mss] Scheduled: *ensureProjectForOpenFiles* -Info seq [hh:mm:ss:mss] Elapsed:: *ms FileWatcher:: Triggered with /home/src/projects/project/demos/tsconfig.json 1:: WatchInfo: /home/src/projects/project/demos/tsconfig.json 2000 undefined Project: /home/src/projects/project/tsconfig.json WatchType: Config file -Before running Timeout callback:: count: 3 -4: /home/src/projects/project/tsconfig.json -5: /home/src/projects/project/demos/tsconfig.json -6: *ensureProjectForOpenFiles* + undefined +Before running Timeout callback:: count: 0 //// [/home/src/projects/project/demos/tsconfig.json] { "compilerOptions": { @@ -826,236 +359,13 @@ Before running Timeout callback:: count: 3 } -Timeout callback:: count: 3 -4: /home/src/projects/project/tsconfig.json *new* -5: /home/src/projects/project/demos/tsconfig.json *new* -6: *ensureProjectForOpenFiles* *new* - -Projects:: -/home/src/projects/project/app/tsconfig.json (Configured) - projectStateVersion: 1 - projectProgramVersion: 1 -/home/src/projects/project/demos/tsconfig.json (Configured) *changed* - projectStateVersion: 3 *changed* - projectProgramVersion: 2 - dirty: true *changed* -/home/src/projects/project/tsconfig.json (Configured) *changed* - projectStateVersion: 3 *changed* - projectProgramVersion: 2 - dirty: true *changed* - -Info seq [hh:mm:ss:mss] Running: /home/src/projects/project/tsconfig.json -Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /home/src/projects/project/tsconfig.json -Info seq [hh:mm:ss:mss] Config: /home/src/projects/project/demos/tsconfig.json : { - "rootNames": [ - "/home/src/projects/project/demos/helpers.ts", - "/home/src/projects/project/app/Component-demos.ts" - ], - "options": { - "composite": true, - "rootDir": "/home/src/projects/project", - "outDir": "/home/src/projects/project/demos-dist", - "paths": { - "demos/*": [ - "./*" - ] - }, - "pathsBasePath": "/home/src/projects/project/demos", - "configFilePath": "/home/src/projects/project/demos/tsconfig.json" - } -} -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/app 1 undefined Config: /home/src/projects/project/demos/tsconfig.json WatchType: Wild card directory -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/app 1 undefined Config: /home/src/projects/project/demos/tsconfig.json WatchType: Wild card directory -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/project/app 1 undefined Project: /home/src/projects/project/tsconfig.json WatchType: Failed Lookup Locations -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/project/app 1 undefined Project: /home/src/projects/project/tsconfig.json WatchType: Failed Lookup Locations -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/project/node_modules 1 undefined Project: /home/src/projects/project/tsconfig.json WatchType: Failed Lookup Locations -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/project/node_modules 1 undefined Project: /home/src/projects/project/tsconfig.json WatchType: Failed Lookup Locations -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/node_modules 1 undefined Project: /home/src/projects/project/tsconfig.json WatchType: Failed Lookup Locations -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/node_modules 1 undefined Project: /home/src/projects/project/tsconfig.json WatchType: Failed Lookup Locations -Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /home/src/projects/project/tsconfig.json projectStateVersion: 3 projectProgramVersion: 2 structureChanged: true structureIsReused:: Not Elapsed:: *ms -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (4) - /a/lib/lib.d.ts Text-1 "/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }" - /home/src/projects/project/demos/helpers.ts Text-1 "export const foo = 1;\n" - /home/src/projects/project/app/Component-demos.ts SVC-1-0 "import * as helpers from 'demos/helpers';\nexport const demo = () => {\n helpers;\n}\n" - /home/src/projects/project/app/Component.ts Text-1 "export const Component = () => {}\n" - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Running: /home/src/projects/project/demos/tsconfig.json -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "projectLoadingStart", - "body": { - "projectName": "/home/src/projects/project/demos/tsconfig.json", - "reason": "Change in config file detected" - } - } -Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /home/src/projects/project/demos/tsconfig.json -Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /home/src/projects/project/demos/tsconfig.json projectStateVersion: 3 projectProgramVersion: 2 structureChanged: true structureIsReused:: Not Elapsed:: *ms -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/demos/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (3) - /a/lib/lib.d.ts Text-1 "/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }" - /home/src/projects/project/demos/helpers.ts Text-1 "export const foo = 1;\n" - /home/src/projects/project/app/Component-demos.ts SVC-1-0 "import * as helpers from 'demos/helpers';\nexport const demo = () => {\n helpers;\n}\n" - - - ../../../../../a/lib/lib.d.ts - Default library for target 'es5' - helpers.ts - Matched by include pattern '**/*' in 'tsconfig.json' - Imported via 'demos/helpers' from file '../app/Component-demos.ts' - ../app/Component-demos.ts - Matched by include pattern '../app/**/*-demos.*' in 'tsconfig.json' - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "projectLoadingFinish", - "body": { - "projectName": "/home/src/projects/project/demos/tsconfig.json" - } - } -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "configFileDiag", - "body": { - "triggerFile": "/home/src/projects/project/demos/tsconfig.json", - "configFile": "/home/src/projects/project/demos/tsconfig.json", - "diagnostics": [] - } - } -Info seq [hh:mm:ss:mss] Running: *ensureProjectForOpenFiles* -Info seq [hh:mm:ss:mss] Before ensureProjectForOpenFiles: -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/app/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (2) - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (4) - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/demos/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (3) - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Open files: -Info seq [hh:mm:ss:mss] FileName: /home/src/projects/project/app/Component-demos.ts ProjectRootPath: undefined -Info seq [hh:mm:ss:mss] Projects: /home/src/projects/project/tsconfig.json,/home/src/projects/project/demos/tsconfig.json -Info seq [hh:mm:ss:mss] After ensureProjectForOpenFiles: -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/app/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (2) - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (4) - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/demos/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (3) - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Open files: -Info seq [hh:mm:ss:mss] FileName: /home/src/projects/project/app/Component-demos.ts ProjectRootPath: undefined -Info seq [hh:mm:ss:mss] Projects: /home/src/projects/project/tsconfig.json,/home/src/projects/project/demos/tsconfig.json -Info seq [hh:mm:ss:mss] got projects updated in background /home/src/projects/project/app/Component-demos.ts -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "projectsUpdatedInBackground", - "body": { - "openFiles": [ - "/home/src/projects/project/app/Component-demos.ts" - ] - } - } After running Timeout callback:: count: 0 -PolledWatches:: -/home/src/projects/node_modules/@types: - {"pollingInterval":500} -/home/src/projects/project/app/node_modules/@types: - {"pollingInterval":500} -/home/src/projects/project/demos/node_modules/@types: - {"pollingInterval":500} -/home/src/projects/project/node_modules/@types: - {"pollingInterval":500} - -PolledWatches *deleted*:: -/home/src/projects/node_modules: - {"pollingInterval":500} -/home/src/projects/project/node_modules: - {"pollingInterval":500} - -FsWatches:: -/a/lib/lib.d.ts: - {} -/home/src/projects/project/app/Component.ts: - {} -/home/src/projects/project/app/tsconfig.json: - {} -/home/src/projects/project/demos/helpers.ts: - {} -/home/src/projects/project/demos/tsconfig.json: - {} -/home/src/projects/project/tsconfig.json: - {} - -FsWatchesRecursive:: -/home/src/projects/project: - {} -/home/src/projects/project/app: - {} -/home/src/projects/project/demos: - {} - -Projects:: -/home/src/projects/project/app/tsconfig.json (Configured) - projectStateVersion: 1 - projectProgramVersion: 1 -/home/src/projects/project/demos/tsconfig.json (Configured) *changed* - projectStateVersion: 3 - projectProgramVersion: 3 *changed* - dirty: false *changed* -/home/src/projects/project/tsconfig.json (Configured) *changed* - projectStateVersion: 3 - projectProgramVersion: 3 *changed* - dirty: false *changed* - -ScriptInfos:: -/a/lib/lib.d.ts - version: Text-1 - containingProjects: 3 - /home/src/projects/project/app/tsconfig.json - /home/src/projects/project/tsconfig.json - /home/src/projects/project/demos/tsconfig.json -/home/src/projects/project/app/Component-demos.ts (Open) *changed* - version: SVC-1-0 - containingProjects: 2 *changed* - /home/src/projects/project/tsconfig.json - /home/src/projects/project/demos/tsconfig.json *default* *new* -/home/src/projects/project/app/Component.ts - version: Text-1 - containingProjects: 2 - /home/src/projects/project/app/tsconfig.json - /home/src/projects/project/tsconfig.json -/home/src/projects/project/demos/helpers.ts - version: Text-1 - containingProjects: 2 - /home/src/projects/project/tsconfig.json - /home/src/projects/project/demos/tsconfig.json - Info seq [hh:mm:ss:mss] File: /home/src/projects/project/app/Component-demos.ts: getDefaultProjectForFile: - /home/src/projects/project/demos/tsconfig.json + /dev/null/inferredProject1* findDefaultConfiguredProject: - /home/src/projects/project/demos/tsconfig.json + undefined Before request Info seq [hh:mm:ss:mss] request: @@ -1169,25 +479,39 @@ Info seq [hh:mm:ss:mss] event: "diagnostics": [] } } +Info seq [hh:mm:ss:mss] `remove Project:: Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/app/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (2) + /a/lib/lib.d.ts + /home/src/projects/project/app/Component.ts + + + ../../../../../a/lib/lib.d.ts + Default library for target 'es5' + Component.ts + Matched by include pattern '**/*' in 'tsconfig.json' Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (4) - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/demos/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (3) +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/project/app 1 undefined Config: /home/src/projects/project/app/tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/project/app 1 undefined Config: /home/src/projects/project/app/tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/project/app/node_modules/@types 1 undefined Project: /home/src/projects/project/app/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/project/app/node_modules/@types 1 undefined Project: /home/src/projects/project/app/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/project/node_modules/@types 1 undefined Project: /home/src/projects/project/app/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/project/node_modules/@types 1 undefined Project: /home/src/projects/project/app/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/node_modules/@types 1 undefined Project: /home/src/projects/project/app/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/node_modules/@types 1 undefined Project: /home/src/projects/project/app/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /home/src/projects/project/app/Component.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Project '/home/src/projects/random/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/home/src/projects/random/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: Info seq [hh:mm:ss:mss] FileName: /home/src/projects/project/app/Component-demos.ts ProjectRootPath: undefined -Info seq [hh:mm:ss:mss] Projects: /home/src/projects/project/tsconfig.json,/home/src/projects/project/demos/tsconfig.json +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* Info seq [hh:mm:ss:mss] FileName: /home/src/projects/random/random.ts ProjectRootPath: undefined Info seq [hh:mm:ss:mss] Projects: /home/src/projects/random/tsconfig.json Info seq [hh:mm:ss:mss] response: @@ -1204,11 +528,19 @@ Info seq [hh:mm:ss:mss] response: After request PolledWatches:: +/home/src/projects/node_modules: + {"pollingInterval":500} /home/src/projects/node_modules/@types: {"pollingInterval":500} +/home/src/projects/project/app/jsconfig.json: + {"pollingInterval":2000} +/home/src/projects/project/app/node_modules: + {"pollingInterval":500} /home/src/projects/project/app/node_modules/@types: {"pollingInterval":500} -/home/src/projects/project/demos/node_modules/@types: +/home/src/projects/project/jsconfig.json: + {"pollingInterval":2000} +/home/src/projects/project/node_modules: {"pollingInterval":500} /home/src/projects/project/node_modules/@types: {"pollingInterval":500} @@ -1218,39 +550,34 @@ PolledWatches:: FsWatches:: /a/lib/lib.d.ts: {} -/home/src/projects/project/app/Component.ts: - {} /home/src/projects/project/app/tsconfig.json: {} -/home/src/projects/project/demos/helpers.ts: - {} -/home/src/projects/project/demos/tsconfig.json: - {} /home/src/projects/project/tsconfig.json: {} /home/src/projects/random/tsconfig.json: *new* {} +FsWatches *deleted*:: +/home/src/projects/project/app/Component.ts: + {} + FsWatchesRecursive:: -/home/src/projects/project: +/home/src/projects/random: *new* {} + +FsWatchesRecursive *deleted*:: /home/src/projects/project/app: {} -/home/src/projects/project/demos: - {} -/home/src/projects/random: *new* - {} Projects:: -/home/src/projects/project/app/tsconfig.json (Configured) +/dev/null/inferredProject1* (Inferred) projectStateVersion: 1 projectProgramVersion: 1 -/home/src/projects/project/demos/tsconfig.json (Configured) - projectStateVersion: 3 - projectProgramVersion: 3 -/home/src/projects/project/tsconfig.json (Configured) - projectStateVersion: 3 - projectProgramVersion: 3 +/home/src/projects/project/app/tsconfig.json (Configured) *deleted* + projectStateVersion: 1 + projectProgramVersion: 1 + isClosed: true *changed* + noOpenRef: true /home/src/projects/random/tsconfig.json (Configured) *new* projectStateVersion: 1 projectProgramVersion: 1 @@ -1258,26 +585,18 @@ Projects:: ScriptInfos:: /a/lib/lib.d.ts *changed* version: Text-1 - containingProjects: 4 *changed* - /home/src/projects/project/app/tsconfig.json - /home/src/projects/project/tsconfig.json - /home/src/projects/project/demos/tsconfig.json + containingProjects: 2 *changed* + /dev/null/inferredProject1* /home/src/projects/random/tsconfig.json *new* + /home/src/projects/project/app/tsconfig.json *deleted* /home/src/projects/project/app/Component-demos.ts (Open) version: SVC-1-0 - containingProjects: 2 - /home/src/projects/project/tsconfig.json - /home/src/projects/project/demos/tsconfig.json *default* -/home/src/projects/project/app/Component.ts - version: Text-1 - containingProjects: 2 - /home/src/projects/project/app/tsconfig.json - /home/src/projects/project/tsconfig.json -/home/src/projects/project/demos/helpers.ts + containingProjects: 1 + /dev/null/inferredProject1* *default* +/home/src/projects/project/app/Component.ts *deleted* version: Text-1 - containingProjects: 2 - /home/src/projects/project/tsconfig.json - /home/src/projects/project/demos/tsconfig.json + containingProjects: 0 *changed* + /home/src/projects/project/app/tsconfig.json *deleted* /home/src/projects/random/random.ts (Open) *new* version: SVC-1-0 containingProjects: 1 @@ -1295,25 +614,17 @@ Info seq [hh:mm:ss:mss] request: "type": "request" } Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/projects/random/random.ts 500 undefined WatchType: Closed Script info -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/app/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Project '/home/src/projects/random/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (4) - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/demos/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (3) - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/home/src/projects/random/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: Info seq [hh:mm:ss:mss] FileName: /home/src/projects/project/app/Component-demos.ts ProjectRootPath: undefined -Info seq [hh:mm:ss:mss] Projects: /home/src/projects/project/tsconfig.json,/home/src/projects/project/demos/tsconfig.json +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* Info seq [hh:mm:ss:mss] response: { "seq": 0, @@ -1325,11 +636,19 @@ Info seq [hh:mm:ss:mss] response: After request PolledWatches:: +/home/src/projects/node_modules: + {"pollingInterval":500} /home/src/projects/node_modules/@types: {"pollingInterval":500} +/home/src/projects/project/app/jsconfig.json: + {"pollingInterval":2000} +/home/src/projects/project/app/node_modules: + {"pollingInterval":500} /home/src/projects/project/app/node_modules/@types: {"pollingInterval":500} -/home/src/projects/project/demos/node_modules/@types: +/home/src/projects/project/jsconfig.json: + {"pollingInterval":2000} +/home/src/projects/project/node_modules: {"pollingInterval":500} /home/src/projects/project/node_modules/@types: {"pollingInterval":500} @@ -1339,14 +658,8 @@ PolledWatches:: FsWatches:: /a/lib/lib.d.ts: {} -/home/src/projects/project/app/Component.ts: - {} /home/src/projects/project/app/tsconfig.json: {} -/home/src/projects/project/demos/helpers.ts: - {} -/home/src/projects/project/demos/tsconfig.json: - {} /home/src/projects/project/tsconfig.json: {} /home/src/projects/random/random.ts: *new* @@ -1355,25 +668,13 @@ FsWatches:: {} FsWatchesRecursive:: -/home/src/projects/project: - {} -/home/src/projects/project/app: - {} -/home/src/projects/project/demos: - {} /home/src/projects/random: {} Projects:: -/home/src/projects/project/app/tsconfig.json (Configured) +/dev/null/inferredProject1* (Inferred) projectStateVersion: 1 projectProgramVersion: 1 -/home/src/projects/project/demos/tsconfig.json (Configured) - projectStateVersion: 3 - projectProgramVersion: 3 -/home/src/projects/project/tsconfig.json (Configured) - projectStateVersion: 3 - projectProgramVersion: 3 /home/src/projects/random/tsconfig.json (Configured) *changed* projectStateVersion: 1 projectProgramVersion: 1 @@ -1382,26 +683,13 @@ Projects:: ScriptInfos:: /a/lib/lib.d.ts version: Text-1 - containingProjects: 4 - /home/src/projects/project/app/tsconfig.json - /home/src/projects/project/tsconfig.json - /home/src/projects/project/demos/tsconfig.json + containingProjects: 2 + /dev/null/inferredProject1* /home/src/projects/random/tsconfig.json /home/src/projects/project/app/Component-demos.ts (Open) version: SVC-1-0 - containingProjects: 2 - /home/src/projects/project/tsconfig.json - /home/src/projects/project/demos/tsconfig.json *default* -/home/src/projects/project/app/Component.ts - version: Text-1 - containingProjects: 2 - /home/src/projects/project/app/tsconfig.json - /home/src/projects/project/tsconfig.json -/home/src/projects/project/demos/helpers.ts - version: Text-1 - containingProjects: 2 - /home/src/projects/project/tsconfig.json - /home/src/projects/project/demos/tsconfig.json + containingProjects: 1 + /dev/null/inferredProject1* *default* /home/src/projects/random/random.ts *changed* open: false *changed* version: SVC-1-0 @@ -1410,6 +698,6 @@ ScriptInfos:: Info seq [hh:mm:ss:mss] File: /home/src/projects/project/app/Component-demos.ts: getDefaultProjectForFile: - /home/src/projects/project/demos/tsconfig.json + /dev/null/inferredProject1* findDefaultConfiguredProject: - /home/src/projects/project/demos/tsconfig.json \ No newline at end of file + undefined \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/projectReferences/when-file-is-not-part-of-first-config-tree-found-finds-default-project.js b/tests/baselines/reference/tsserver/projectReferences/when-file-is-not-part-of-first-config-tree-found-finds-default-project.js index bf0cfb6e2f5dc..40c2fd300a86f 100644 --- a/tests/baselines/reference/tsserver/projectReferences/when-file-is-not-part-of-first-config-tree-found-finds-default-project.js +++ b/tests/baselines/reference/tsserver/projectReferences/when-file-is-not-part-of-first-config-tree-found-finds-default-project.js @@ -203,271 +203,46 @@ Info seq [hh:mm:ss:mss] event: "diagnostics": [] } } -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /home/src/projects/project/app/tsconfig.json ProjectRootPath: undefined:: Result: /home/src/projects/project/tsconfig.json -Info seq [hh:mm:ss:mss] Creating configuration project /home/src/projects/project/tsconfig.json -Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/projects/project/tsconfig.json 2000 undefined Project: /home/src/projects/project/tsconfig.json WatchType: Config file -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "projectLoadingStart", - "body": { - "projectName": "/home/src/projects/project/tsconfig.json", - "reason": "Creating possible configured project for /home/src/projects/project/app/Component-demos.ts to open" - } - } -Info seq [hh:mm:ss:mss] Config: /home/src/projects/project/tsconfig.json : { - "rootNames": [ - "/home/src/projects/project/app/Component-demos.ts", - "/home/src/projects/project/app/Component.ts", - "/home/src/projects/project/demos/helpers.ts" - ], - "options": { - "outDir": "/home/src/projects/project/dist", - "configFilePath": "/home/src/projects/project/tsconfig.json" - }, - "projectReferences": [ - { - "path": "/home/src/projects/project/demos/tsconfig.json", - "originalPath": "./demos/tsconfig.json" - }, - { - "path": "/home/src/projects/project/app/tsconfig.json", - "originalPath": "./app/tsconfig.json" - } - ] -} -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project 1 undefined Config: /home/src/projects/project/tsconfig.json WatchType: Wild card directory -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project 1 undefined Config: /home/src/projects/project/tsconfig.json WatchType: Wild card directory -Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/projects/project/demos/helpers.ts 500 undefined WatchType: Closed Script info -Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /home/src/projects/project/tsconfig.json -Info seq [hh:mm:ss:mss] Config: /home/src/projects/project/demos/tsconfig.json : { - "rootNames": [ - "/home/src/projects/project/demos/helpers.ts", - "/home/src/projects/project/app/Component-demos.ts" - ], - "options": { - "composite": true, - "rootDir": "/home/src/projects/project", - "outDir": "/home/src/projects/project/demos-dist", - "paths": { - "demos/*": [ - "./*" - ] - }, - "pathsBasePath": "/home/src/projects/project/demos", - "configFilePath": "/home/src/projects/project/demos/tsconfig.json" - } -} -Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/projects/project/demos/tsconfig.json 2000 undefined Project: /home/src/projects/project/tsconfig.json WatchType: Config file -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/demos 1 undefined Config: /home/src/projects/project/demos/tsconfig.json WatchType: Wild card directory -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/demos 1 undefined Config: /home/src/projects/project/demos/tsconfig.json WatchType: Wild card directory -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/app 1 undefined Config: /home/src/projects/project/demos/tsconfig.json WatchType: Wild card directory -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/app 1 undefined Config: /home/src/projects/project/demos/tsconfig.json WatchType: Wild card directory -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/node_modules/@types 1 undefined Project: /home/src/projects/project/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/node_modules/@types 1 undefined Project: /home/src/projects/project/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/node_modules/@types 1 undefined Project: /home/src/projects/project/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/node_modules/@types 1 undefined Project: /home/src/projects/project/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /home/src/projects/project/tsconfig.json projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (4) - /a/lib/lib.d.ts Text-1 "/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }" - /home/src/projects/project/demos/helpers.ts Text-1 "export const foo = 1;\n" - /home/src/projects/project/app/Component-demos.ts SVC-1-0 "import * as helpers from 'demos/helpers';\nexport const demo = () => {\n helpers;\n}\n" - /home/src/projects/project/app/Component.ts Text-1 "export const Component = () => {}\n" - - - ../../../../a/lib/lib.d.ts - Default library for target 'es5' - demos/helpers.ts - Imported via 'demos/helpers' from file 'app/Component-demos.ts' - Matched by default include pattern '**/*' - app/Component-demos.ts - Matched by default include pattern '**/*' - app/Component.ts - Matched by default include pattern '**/*' - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "projectLoadingFinish", - "body": { - "projectName": "/home/src/projects/project/tsconfig.json" - } - } -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "telemetry", - "body": { - "telemetryEventName": "projectInfo", - "payload": { - "projectId": "1097a5f82e8323ba7aba7567ec06402f7ad4ea74abce44ec5efd223ac77ff169", - "fileStats": { - "js": 0, - "jsSize": 0, - "jsx": 0, - "jsxSize": 0, - "ts": 3, - "tsSize": 141, - "tsx": 0, - "tsxSize": 0, - "dts": 1, - "dtsSize": 334, - "deferred": 0, - "deferredSize": 0 - }, - "compilerOptions": { - "outDir": "" - }, - "typeAcquisition": { - "enable": false, - "include": false, - "exclude": false - }, - "extends": false, - "files": false, - "include": false, - "exclude": false, - "compileOnSave": false, - "configFileName": "tsconfig.json", - "projectType": "configured", - "languageServiceEnabled": true, - "version": "FakeVersion" - } - } - } -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "configFileDiag", - "body": { - "triggerFile": "/home/src/projects/project/app/Component-demos.ts", - "configFile": "/home/src/projects/project/tsconfig.json", - "diagnostics": [] - } - } -Info seq [hh:mm:ss:mss] Creating configuration project /home/src/projects/project/demos/tsconfig.json -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "projectLoadingStart", - "body": { - "projectName": "/home/src/projects/project/demos/tsconfig.json", - "reason": "Creating project referenced in solution /home/src/projects/project/tsconfig.json to find possible configured project for /home/src/projects/project/app/Component-demos.ts to open" - } - } -Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /home/src/projects/project/demos/tsconfig.json -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/demos/node_modules/@types 1 undefined Project: /home/src/projects/project/demos/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/demos/node_modules/@types 1 undefined Project: /home/src/projects/project/demos/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/node_modules/@types 1 undefined Project: /home/src/projects/project/demos/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/node_modules/@types 1 undefined Project: /home/src/projects/project/demos/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/node_modules/@types 1 undefined Project: /home/src/projects/project/demos/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/node_modules/@types 1 undefined Project: /home/src/projects/project/demos/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /home/src/projects/project/demos/tsconfig.json projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/demos/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (3) +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/projects/project/app/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/projects/project/tsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/projects/project/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/app/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/app/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/app/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/app/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (2) /a/lib/lib.d.ts Text-1 "/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }" - /home/src/projects/project/demos/helpers.ts Text-1 "export const foo = 1;\n" /home/src/projects/project/app/Component-demos.ts SVC-1-0 "import * as helpers from 'demos/helpers';\nexport const demo = () => {\n helpers;\n}\n" ../../../../../a/lib/lib.d.ts Default library for target 'es5' - helpers.ts - Matched by include pattern '**/*' in 'tsconfig.json' - Imported via 'demos/helpers' from file '../app/Component-demos.ts' - ../app/Component-demos.ts - Matched by include pattern '../app/**/*-demos.*' in 'tsconfig.json' + Component-demos.ts + Root file specified for compilation Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "projectLoadingFinish", - "body": { - "projectName": "/home/src/projects/project/demos/tsconfig.json" - } - } -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "telemetry", - "body": { - "telemetryEventName": "projectInfo", - "payload": { - "projectId": "528692a1575f61fd3bf7069493cc100a7cad975f6cd24c47b7a63b99928a8171", - "fileStats": { - "js": 0, - "jsSize": 0, - "jsx": 0, - "jsxSize": 0, - "ts": 2, - "tsSize": 107, - "tsx": 0, - "tsxSize": 0, - "dts": 1, - "dtsSize": 334, - "deferred": 0, - "deferredSize": 0 - }, - "compilerOptions": { - "composite": true, - "rootDir": "", - "outDir": "", - "paths": "" - }, - "typeAcquisition": { - "enable": false, - "include": false, - "exclude": false - }, - "extends": false, - "files": false, - "include": true, - "exclude": false, - "compileOnSave": false, - "configFileName": "tsconfig.json", - "projectType": "configured", - "languageServiceEnabled": true, - "version": "FakeVersion" - } - } - } -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "configFileDiag", - "body": { - "triggerFile": "/home/src/projects/project/app/Component-demos.ts", - "configFile": "/home/src/projects/project/demos/tsconfig.json", - "diagnostics": [] - } - } -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /home/src/projects/project/demos/tsconfig.json ProjectRootPath: undefined:: Result: /home/src/projects/project/tsconfig.json Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/app/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (4) - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/demos/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (3) +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: Info seq [hh:mm:ss:mss] FileName: /home/src/projects/project/app/Component-demos.ts ProjectRootPath: undefined -Info seq [hh:mm:ss:mss] Projects: /home/src/projects/project/tsconfig.json,/home/src/projects/project/demos/tsconfig.json +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* Info seq [hh:mm:ss:mss] response: { "seq": 0, @@ -482,11 +257,19 @@ Info seq [hh:mm:ss:mss] response: After request PolledWatches:: +/home/src/projects/node_modules: *new* + {"pollingInterval":500} /home/src/projects/node_modules/@types: *new* {"pollingInterval":500} +/home/src/projects/project/app/jsconfig.json: *new* + {"pollingInterval":2000} +/home/src/projects/project/app/node_modules: *new* + {"pollingInterval":500} /home/src/projects/project/app/node_modules/@types: *new* {"pollingInterval":500} -/home/src/projects/project/demos/node_modules/@types: *new* +/home/src/projects/project/jsconfig.json: *new* + {"pollingInterval":2000} +/home/src/projects/project/node_modules: *new* {"pollingInterval":500} /home/src/projects/project/node_modules/@types: *new* {"pollingInterval":500} @@ -498,54 +281,36 @@ FsWatches:: {} /home/src/projects/project/app/tsconfig.json: *new* {} -/home/src/projects/project/demos/helpers.ts: *new* - {} -/home/src/projects/project/demos/tsconfig.json: *new* - {} /home/src/projects/project/tsconfig.json: *new* {} FsWatchesRecursive:: -/home/src/projects/project: *new* - {} /home/src/projects/project/app: *new* {} -/home/src/projects/project/demos: *new* - {} Projects:: -/home/src/projects/project/app/tsconfig.json (Configured) *new* +/dev/null/inferredProject1* (Inferred) *new* projectStateVersion: 1 projectProgramVersion: 1 -/home/src/projects/project/demos/tsconfig.json (Configured) *new* - projectStateVersion: 1 - projectProgramVersion: 1 -/home/src/projects/project/tsconfig.json (Configured) *new* +/home/src/projects/project/app/tsconfig.json (Configured) *new* projectStateVersion: 1 projectProgramVersion: 1 + noOpenRef: true ScriptInfos:: /a/lib/lib.d.ts *new* version: Text-1 - containingProjects: 3 + containingProjects: 2 /home/src/projects/project/app/tsconfig.json - /home/src/projects/project/tsconfig.json - /home/src/projects/project/demos/tsconfig.json + /dev/null/inferredProject1* /home/src/projects/project/app/Component-demos.ts (Open) *new* version: SVC-1-0 - containingProjects: 2 - /home/src/projects/project/tsconfig.json - /home/src/projects/project/demos/tsconfig.json *default* + containingProjects: 1 + /dev/null/inferredProject1* *default* /home/src/projects/project/app/Component.ts *new* version: Text-1 - containingProjects: 2 + containingProjects: 1 /home/src/projects/project/app/tsconfig.json - /home/src/projects/project/tsconfig.json -/home/src/projects/project/demos/helpers.ts *new* - version: Text-1 - containingProjects: 2 - /home/src/projects/project/tsconfig.json - /home/src/projects/project/demos/tsconfig.json Before request @@ -594,7 +359,21 @@ Info seq [hh:mm:ss:mss] event: "event": "semanticDiag", "body": { "file": "/home/src/projects/project/app/Component-demos.ts", - "diagnostics": [] + "diagnostics": [ + { + "start": { + "line": 1, + "offset": 26 + }, + "end": { + "line": 1, + "offset": 41 + }, + "text": "Cannot find module 'demos/helpers' or its corresponding type declarations.", + "code": 2307, + "category": "error" + } + ] } } After running Immedidate callback:: count: 1 @@ -638,9 +417,9 @@ After running Immedidate callback:: count: 0 Info seq [hh:mm:ss:mss] File: /home/src/projects/project/app/Component-demos.ts: getDefaultProjectForFile: - /home/src/projects/project/demos/tsconfig.json + /dev/null/inferredProject1* findDefaultConfiguredProject: - /home/src/projects/project/demos/tsconfig.json + undefined Before request Info seq [hh:mm:ss:mss] request: @@ -754,25 +533,39 @@ Info seq [hh:mm:ss:mss] event: "diagnostics": [] } } +Info seq [hh:mm:ss:mss] `remove Project:: Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/app/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (2) + /a/lib/lib.d.ts + /home/src/projects/project/app/Component.ts + + + ../../../../../a/lib/lib.d.ts + Default library for target 'es5' + Component.ts + Matched by include pattern '**/*' in 'tsconfig.json' Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (4) - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/demos/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (3) +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/project/app 1 undefined Config: /home/src/projects/project/app/tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/project/app 1 undefined Config: /home/src/projects/project/app/tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/project/app/node_modules/@types 1 undefined Project: /home/src/projects/project/app/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/project/app/node_modules/@types 1 undefined Project: /home/src/projects/project/app/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/project/node_modules/@types 1 undefined Project: /home/src/projects/project/app/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/project/node_modules/@types 1 undefined Project: /home/src/projects/project/app/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/node_modules/@types 1 undefined Project: /home/src/projects/project/app/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/node_modules/@types 1 undefined Project: /home/src/projects/project/app/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /home/src/projects/project/app/Component.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Project '/home/src/projects/random/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/home/src/projects/random/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: Info seq [hh:mm:ss:mss] FileName: /home/src/projects/project/app/Component-demos.ts ProjectRootPath: undefined -Info seq [hh:mm:ss:mss] Projects: /home/src/projects/project/tsconfig.json,/home/src/projects/project/demos/tsconfig.json +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* Info seq [hh:mm:ss:mss] FileName: /home/src/projects/random/random.ts ProjectRootPath: undefined Info seq [hh:mm:ss:mss] Projects: /home/src/projects/random/tsconfig.json Info seq [hh:mm:ss:mss] response: @@ -789,11 +582,19 @@ Info seq [hh:mm:ss:mss] response: After request PolledWatches:: +/home/src/projects/node_modules: + {"pollingInterval":500} /home/src/projects/node_modules/@types: {"pollingInterval":500} +/home/src/projects/project/app/jsconfig.json: + {"pollingInterval":2000} +/home/src/projects/project/app/node_modules: + {"pollingInterval":500} /home/src/projects/project/app/node_modules/@types: {"pollingInterval":500} -/home/src/projects/project/demos/node_modules/@types: +/home/src/projects/project/jsconfig.json: + {"pollingInterval":2000} +/home/src/projects/project/node_modules: {"pollingInterval":500} /home/src/projects/project/node_modules/@types: {"pollingInterval":500} @@ -803,39 +604,34 @@ PolledWatches:: FsWatches:: /a/lib/lib.d.ts: {} -/home/src/projects/project/app/Component.ts: - {} /home/src/projects/project/app/tsconfig.json: {} -/home/src/projects/project/demos/helpers.ts: - {} -/home/src/projects/project/demos/tsconfig.json: - {} /home/src/projects/project/tsconfig.json: {} /home/src/projects/random/tsconfig.json: *new* {} +FsWatches *deleted*:: +/home/src/projects/project/app/Component.ts: + {} + FsWatchesRecursive:: -/home/src/projects/project: +/home/src/projects/random: *new* {} + +FsWatchesRecursive *deleted*:: /home/src/projects/project/app: {} -/home/src/projects/project/demos: - {} -/home/src/projects/random: *new* - {} Projects:: -/home/src/projects/project/app/tsconfig.json (Configured) - projectStateVersion: 1 - projectProgramVersion: 1 -/home/src/projects/project/demos/tsconfig.json (Configured) +/dev/null/inferredProject1* (Inferred) projectStateVersion: 1 projectProgramVersion: 1 -/home/src/projects/project/tsconfig.json (Configured) +/home/src/projects/project/app/tsconfig.json (Configured) *deleted* projectStateVersion: 1 projectProgramVersion: 1 + isClosed: true *changed* + noOpenRef: true /home/src/projects/random/tsconfig.json (Configured) *new* projectStateVersion: 1 projectProgramVersion: 1 @@ -843,26 +639,18 @@ Projects:: ScriptInfos:: /a/lib/lib.d.ts *changed* version: Text-1 - containingProjects: 4 *changed* - /home/src/projects/project/app/tsconfig.json - /home/src/projects/project/tsconfig.json - /home/src/projects/project/demos/tsconfig.json + containingProjects: 2 *changed* + /dev/null/inferredProject1* /home/src/projects/random/tsconfig.json *new* + /home/src/projects/project/app/tsconfig.json *deleted* /home/src/projects/project/app/Component-demos.ts (Open) version: SVC-1-0 - containingProjects: 2 - /home/src/projects/project/tsconfig.json - /home/src/projects/project/demos/tsconfig.json *default* -/home/src/projects/project/app/Component.ts - version: Text-1 - containingProjects: 2 - /home/src/projects/project/app/tsconfig.json - /home/src/projects/project/tsconfig.json -/home/src/projects/project/demos/helpers.ts + containingProjects: 1 + /dev/null/inferredProject1* *default* +/home/src/projects/project/app/Component.ts *deleted* version: Text-1 - containingProjects: 2 - /home/src/projects/project/tsconfig.json - /home/src/projects/project/demos/tsconfig.json + containingProjects: 0 *changed* + /home/src/projects/project/app/tsconfig.json *deleted* /home/src/projects/random/random.ts (Open) *new* version: SVC-1-0 containingProjects: 1 @@ -880,25 +668,17 @@ Info seq [hh:mm:ss:mss] request: "type": "request" } Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/projects/random/random.ts 500 undefined WatchType: Closed Script info -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/app/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Project '/home/src/projects/random/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (4) - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/demos/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (3) - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/home/src/projects/random/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: Info seq [hh:mm:ss:mss] FileName: /home/src/projects/project/app/Component-demos.ts ProjectRootPath: undefined -Info seq [hh:mm:ss:mss] Projects: /home/src/projects/project/tsconfig.json,/home/src/projects/project/demos/tsconfig.json +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* Info seq [hh:mm:ss:mss] response: { "seq": 0, @@ -910,11 +690,19 @@ Info seq [hh:mm:ss:mss] response: After request PolledWatches:: +/home/src/projects/node_modules: + {"pollingInterval":500} /home/src/projects/node_modules/@types: {"pollingInterval":500} +/home/src/projects/project/app/jsconfig.json: + {"pollingInterval":2000} +/home/src/projects/project/app/node_modules: + {"pollingInterval":500} /home/src/projects/project/app/node_modules/@types: {"pollingInterval":500} -/home/src/projects/project/demos/node_modules/@types: +/home/src/projects/project/jsconfig.json: + {"pollingInterval":2000} +/home/src/projects/project/node_modules: {"pollingInterval":500} /home/src/projects/project/node_modules/@types: {"pollingInterval":500} @@ -924,14 +712,8 @@ PolledWatches:: FsWatches:: /a/lib/lib.d.ts: {} -/home/src/projects/project/app/Component.ts: - {} /home/src/projects/project/app/tsconfig.json: {} -/home/src/projects/project/demos/helpers.ts: - {} -/home/src/projects/project/demos/tsconfig.json: - {} /home/src/projects/project/tsconfig.json: {} /home/src/projects/random/random.ts: *new* @@ -940,23 +722,11 @@ FsWatches:: {} FsWatchesRecursive:: -/home/src/projects/project: - {} -/home/src/projects/project/app: - {} -/home/src/projects/project/demos: - {} /home/src/projects/random: {} Projects:: -/home/src/projects/project/app/tsconfig.json (Configured) - projectStateVersion: 1 - projectProgramVersion: 1 -/home/src/projects/project/demos/tsconfig.json (Configured) - projectStateVersion: 1 - projectProgramVersion: 1 -/home/src/projects/project/tsconfig.json (Configured) +/dev/null/inferredProject1* (Inferred) projectStateVersion: 1 projectProgramVersion: 1 /home/src/projects/random/tsconfig.json (Configured) *changed* @@ -967,26 +737,13 @@ Projects:: ScriptInfos:: /a/lib/lib.d.ts version: Text-1 - containingProjects: 4 - /home/src/projects/project/app/tsconfig.json - /home/src/projects/project/tsconfig.json - /home/src/projects/project/demos/tsconfig.json + containingProjects: 2 + /dev/null/inferredProject1* /home/src/projects/random/tsconfig.json /home/src/projects/project/app/Component-demos.ts (Open) version: SVC-1-0 - containingProjects: 2 - /home/src/projects/project/tsconfig.json - /home/src/projects/project/demos/tsconfig.json *default* -/home/src/projects/project/app/Component.ts - version: Text-1 - containingProjects: 2 - /home/src/projects/project/app/tsconfig.json - /home/src/projects/project/tsconfig.json -/home/src/projects/project/demos/helpers.ts - version: Text-1 - containingProjects: 2 - /home/src/projects/project/tsconfig.json - /home/src/projects/project/demos/tsconfig.json + containingProjects: 1 + /dev/null/inferredProject1* *default* /home/src/projects/random/random.ts *changed* open: false *changed* version: SVC-1-0 @@ -995,9 +752,9 @@ ScriptInfos:: Info seq [hh:mm:ss:mss] File: /home/src/projects/project/app/Component-demos.ts: getDefaultProjectForFile: - /home/src/projects/project/demos/tsconfig.json + /dev/null/inferredProject1* findDefaultConfiguredProject: - /home/src/projects/project/demos/tsconfig.json + undefined Before request Info seq [hh:mm:ss:mss] request: @@ -1009,20 +766,16 @@ Info seq [hh:mm:ss:mss] request: "seq": 5, "type": "request" } +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /home/src/projects/project/app/tsconfig.json 2000 undefined Project: /home/src/projects/project/app/tsconfig.json WatchType: Config file +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /home/src/projects/project/app/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /home/src/projects/project/tsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /home/src/projects/project/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/projects/project/app/Component-demos.ts 500 undefined WatchType: Closed Script info -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/app/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Project '/home/src/projects/random/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (4) - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/demos/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (3) - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/home/src/projects/random/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- @@ -1038,60 +791,53 @@ Info seq [hh:mm:ss:mss] response: After request PolledWatches:: +/home/src/projects/node_modules: + {"pollingInterval":500} /home/src/projects/node_modules/@types: {"pollingInterval":500} +/home/src/projects/project/app/node_modules: + {"pollingInterval":500} /home/src/projects/project/app/node_modules/@types: {"pollingInterval":500} -/home/src/projects/project/demos/node_modules/@types: +/home/src/projects/project/node_modules: {"pollingInterval":500} /home/src/projects/project/node_modules/@types: {"pollingInterval":500} /home/src/projects/random/node_modules/@types: {"pollingInterval":500} +PolledWatches *deleted*:: +/home/src/projects/project/app/jsconfig.json: + {"pollingInterval":2000} +/home/src/projects/project/jsconfig.json: + {"pollingInterval":2000} + FsWatches:: /a/lib/lib.d.ts: {} /home/src/projects/project/app/Component-demos.ts: *new* {} -/home/src/projects/project/app/Component.ts: - {} -/home/src/projects/project/app/tsconfig.json: - {} -/home/src/projects/project/demos/helpers.ts: - {} -/home/src/projects/project/demos/tsconfig.json: - {} -/home/src/projects/project/tsconfig.json: - {} /home/src/projects/random/random.ts: {} /home/src/projects/random/tsconfig.json: {} -FsWatchesRecursive:: -/home/src/projects/project: - {} -/home/src/projects/project/app: +FsWatches *deleted*:: +/home/src/projects/project/app/tsconfig.json: {} -/home/src/projects/project/demos: +/home/src/projects/project/tsconfig.json: {} + +FsWatchesRecursive:: /home/src/projects/random: {} Projects:: -/home/src/projects/project/app/tsconfig.json (Configured) *changed* - projectStateVersion: 1 - projectProgramVersion: 1 - noOpenRef: true *changed* -/home/src/projects/project/demos/tsconfig.json (Configured) *changed* - projectStateVersion: 1 - projectProgramVersion: 1 - noOpenRef: true *changed* -/home/src/projects/project/tsconfig.json (Configured) *changed* - projectStateVersion: 1 +/dev/null/inferredProject1* (Inferred) *changed* + projectStateVersion: 2 *changed* projectProgramVersion: 1 - noOpenRef: true *changed* + dirty: true *changed* + isOrphan: true *changed* /home/src/projects/random/tsconfig.json (Configured) projectStateVersion: 1 projectProgramVersion: 1 @@ -1100,27 +846,14 @@ Projects:: ScriptInfos:: /a/lib/lib.d.ts version: Text-1 - containingProjects: 4 - /home/src/projects/project/app/tsconfig.json - /home/src/projects/project/tsconfig.json - /home/src/projects/project/demos/tsconfig.json + containingProjects: 2 + /dev/null/inferredProject1* /home/src/projects/random/tsconfig.json /home/src/projects/project/app/Component-demos.ts *changed* open: false *changed* version: SVC-1-0 - containingProjects: 2 - /home/src/projects/project/tsconfig.json - /home/src/projects/project/demos/tsconfig.json -/home/src/projects/project/app/Component.ts - version: Text-1 - containingProjects: 2 - /home/src/projects/project/app/tsconfig.json - /home/src/projects/project/tsconfig.json -/home/src/projects/project/demos/helpers.ts - version: Text-1 - containingProjects: 2 - /home/src/projects/project/tsconfig.json - /home/src/projects/project/demos/tsconfig.json + containingProjects: 0 *changed* + /dev/null/inferredProject1* *deleted* /home/src/projects/random/random.ts version: SVC-1-0 containingProjects: 1 @@ -1128,7 +861,7 @@ ScriptInfos:: Info seq [hh:mm:ss:mss] File: /home/src/projects/project/app/Component-demos.ts: getDefaultProjectForFile: - /home/src/projects/project/demos/tsconfig.json + undefined findDefaultConfiguredProject: undefined Before request @@ -1145,85 +878,31 @@ Info seq [hh:mm:ss:mss] request: Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /home/src/projects/random/random.ts 500 undefined WatchType: Closed Script info Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /home/src/projects/random/random.ts ProjectRootPath: undefined:: Result: /home/src/projects/random/tsconfig.json Info seq [hh:mm:ss:mss] `remove Project:: -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/app/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) Info seq [hh:mm:ss:mss] Files (2) /a/lib/lib.d.ts - /home/src/projects/project/app/Component.ts - - - ../../../../../a/lib/lib.d.ts - Default library for target 'es5' - Component.ts - Matched by include pattern '**/*' in 'tsconfig.json' - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/project/app/node_modules/@types 1 undefined Project: /home/src/projects/project/app/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/project/app/node_modules/@types 1 undefined Project: /home/src/projects/project/app/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/project/node_modules/@types 1 undefined Project: /home/src/projects/project/app/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/project/node_modules/@types 1 undefined Project: /home/src/projects/project/app/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/node_modules/@types 1 undefined Project: /home/src/projects/project/app/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/node_modules/@types 1 undefined Project: /home/src/projects/project/app/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] `remove Project:: -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (4) - /a/lib/lib.d.ts - /home/src/projects/project/demos/helpers.ts - /home/src/projects/project/app/Component-demos.ts - /home/src/projects/project/app/Component.ts - - - ../../../../a/lib/lib.d.ts - Default library for target 'es5' - demos/helpers.ts - Imported via 'demos/helpers' from file 'app/Component-demos.ts' - Matched by default include pattern '**/*' - app/Component-demos.ts - Matched by default include pattern '**/*' - app/Component.ts - Matched by default include pattern '**/*' - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/project/app 1 undefined Config: /home/src/projects/project/app/tsconfig.json WatchType: Wild card directory -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/project/app 1 undefined Config: /home/src/projects/project/app/tsconfig.json WatchType: Wild card directory -Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /home/src/projects/project/app/tsconfig.json 2000 undefined Project: /home/src/projects/project/app/tsconfig.json WatchType: Config file -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/project 1 undefined Config: /home/src/projects/project/tsconfig.json WatchType: Wild card directory -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/project 1 undefined Config: /home/src/projects/project/tsconfig.json WatchType: Wild card directory -Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /home/src/projects/project/tsconfig.json 2000 undefined Project: /home/src/projects/project/tsconfig.json WatchType: Config file -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/project/node_modules/@types 1 undefined Project: /home/src/projects/project/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/project/node_modules/@types 1 undefined Project: /home/src/projects/project/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/node_modules/@types 1 undefined Project: /home/src/projects/project/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/node_modules/@types 1 undefined Project: /home/src/projects/project/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] `remove Project:: -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/demos/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (3) - /a/lib/lib.d.ts - /home/src/projects/project/demos/helpers.ts /home/src/projects/project/app/Component-demos.ts ../../../../../a/lib/lib.d.ts Default library for target 'es5' - helpers.ts - Matched by include pattern '**/*' in 'tsconfig.json' - Imported via 'demos/helpers' from file '../app/Component-demos.ts' - ../app/Component-demos.ts - Matched by include pattern '../app/**/*-demos.*' in 'tsconfig.json' + Component-demos.ts + Root file specified for compilation Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/project/demos 1 undefined Config: /home/src/projects/project/demos/tsconfig.json WatchType: Wild card directory -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/project/demos 1 undefined Config: /home/src/projects/project/demos/tsconfig.json WatchType: Wild card directory -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/project/app 1 undefined Config: /home/src/projects/project/demos/tsconfig.json WatchType: Wild card directory -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/project/app 1 undefined Config: /home/src/projects/project/demos/tsconfig.json WatchType: Wild card directory -Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /home/src/projects/project/demos/tsconfig.json 2000 undefined Project: /home/src/projects/project/tsconfig.json WatchType: Config file -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/project/demos/node_modules/@types 1 undefined Project: /home/src/projects/project/demos/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/project/demos/node_modules/@types 1 undefined Project: /home/src/projects/project/demos/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/project/node_modules/@types 1 undefined Project: /home/src/projects/project/demos/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/project/node_modules/@types 1 undefined Project: /home/src/projects/project/demos/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/node_modules/@types 1 undefined Project: /home/src/projects/project/demos/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/node_modules/@types 1 undefined Project: /home/src/projects/project/demos/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/project/app/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/project/app/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/project/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/project/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/project/app/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/project/app/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/project/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/project/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /home/src/projects/project/app/Component-demos.ts 500 undefined WatchType: Closed Script info -Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /home/src/projects/project/app/Component.ts 500 undefined WatchType: Closed Script info -Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /home/src/projects/project/demos/helpers.ts 500 undefined WatchType: Closed Script info Info seq [hh:mm:ss:mss] Project '/home/src/projects/random/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (2) @@ -1248,9 +927,13 @@ PolledWatches:: {"pollingInterval":500} PolledWatches *deleted*:: +/home/src/projects/node_modules: + {"pollingInterval":500} +/home/src/projects/project/app/node_modules: + {"pollingInterval":500} /home/src/projects/project/app/node_modules/@types: {"pollingInterval":500} -/home/src/projects/project/demos/node_modules/@types: +/home/src/projects/project/node_modules: {"pollingInterval":500} /home/src/projects/project/node_modules/@types: {"pollingInterval":500} @@ -1264,16 +947,6 @@ FsWatches:: FsWatches *deleted*:: /home/src/projects/project/app/Component-demos.ts: {} -/home/src/projects/project/app/Component.ts: - {} -/home/src/projects/project/app/tsconfig.json: - {} -/home/src/projects/project/demos/helpers.ts: - {} -/home/src/projects/project/demos/tsconfig.json: - {} -/home/src/projects/project/tsconfig.json: - {} /home/src/projects/random/random.ts: {} @@ -1281,30 +954,13 @@ FsWatchesRecursive:: /home/src/projects/random: {} -FsWatchesRecursive *deleted*:: -/home/src/projects/project: - {} -/home/src/projects/project/app: - {} -/home/src/projects/project/demos: - {} - Projects:: -/home/src/projects/project/app/tsconfig.json (Configured) *deleted* - projectStateVersion: 1 - projectProgramVersion: 1 - isClosed: true *changed* - noOpenRef: true -/home/src/projects/project/demos/tsconfig.json (Configured) *deleted* - projectStateVersion: 1 - projectProgramVersion: 1 - isClosed: true *changed* - noOpenRef: true -/home/src/projects/project/tsconfig.json (Configured) *deleted* - projectStateVersion: 1 +/dev/null/inferredProject1* (Inferred) *deleted* + projectStateVersion: 2 projectProgramVersion: 1 + dirty: true isClosed: true *changed* - noOpenRef: true + isOrphan: true /home/src/projects/random/tsconfig.json (Configured) *changed* projectStateVersion: 1 projectProgramVersion: 1 @@ -1315,24 +971,10 @@ ScriptInfos:: version: Text-1 containingProjects: 1 *changed* /home/src/projects/random/tsconfig.json - /home/src/projects/project/app/tsconfig.json *deleted* - /home/src/projects/project/tsconfig.json *deleted* - /home/src/projects/project/demos/tsconfig.json *deleted* + /dev/null/inferredProject1* *deleted* /home/src/projects/project/app/Component-demos.ts *deleted* version: SVC-1-0 - containingProjects: 0 *changed* - /home/src/projects/project/tsconfig.json *deleted* - /home/src/projects/project/demos/tsconfig.json *deleted* -/home/src/projects/project/app/Component.ts *deleted* - version: Text-1 - containingProjects: 0 *changed* - /home/src/projects/project/app/tsconfig.json *deleted* - /home/src/projects/project/tsconfig.json *deleted* -/home/src/projects/project/demos/helpers.ts *deleted* - version: Text-1 - containingProjects: 0 *changed* - /home/src/projects/project/tsconfig.json *deleted* - /home/src/projects/project/demos/tsconfig.json *deleted* + containingProjects: 0 /home/src/projects/random/random.ts (Open) *changed* open: true *changed* version: SVC-1-0 diff --git a/tests/baselines/reference/tsserver/projectReferences/when-file-is-not-part-of-first-config-tree-found-reload-projects.js b/tests/baselines/reference/tsserver/projectReferences/when-file-is-not-part-of-first-config-tree-found-reload-projects.js index 0e721adae3175..8b2c0b432267f 100644 --- a/tests/baselines/reference/tsserver/projectReferences/when-file-is-not-part-of-first-config-tree-found-reload-projects.js +++ b/tests/baselines/reference/tsserver/projectReferences/when-file-is-not-part-of-first-config-tree-found-reload-projects.js @@ -203,271 +203,46 @@ Info seq [hh:mm:ss:mss] event: "diagnostics": [] } } -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /home/src/projects/project/app/tsconfig.json ProjectRootPath: undefined:: Result: /home/src/projects/project/tsconfig.json -Info seq [hh:mm:ss:mss] Creating configuration project /home/src/projects/project/tsconfig.json -Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/projects/project/tsconfig.json 2000 undefined Project: /home/src/projects/project/tsconfig.json WatchType: Config file -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "projectLoadingStart", - "body": { - "projectName": "/home/src/projects/project/tsconfig.json", - "reason": "Creating possible configured project for /home/src/projects/project/app/Component-demos.ts to open" - } - } -Info seq [hh:mm:ss:mss] Config: /home/src/projects/project/tsconfig.json : { - "rootNames": [ - "/home/src/projects/project/app/Component-demos.ts", - "/home/src/projects/project/app/Component.ts", - "/home/src/projects/project/demos/helpers.ts" - ], - "options": { - "outDir": "/home/src/projects/project/dist", - "configFilePath": "/home/src/projects/project/tsconfig.json" - }, - "projectReferences": [ - { - "path": "/home/src/projects/project/demos/tsconfig.json", - "originalPath": "./demos/tsconfig.json" - }, - { - "path": "/home/src/projects/project/app/tsconfig.json", - "originalPath": "./app/tsconfig.json" - } - ] -} -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project 1 undefined Config: /home/src/projects/project/tsconfig.json WatchType: Wild card directory -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project 1 undefined Config: /home/src/projects/project/tsconfig.json WatchType: Wild card directory -Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/projects/project/demos/helpers.ts 500 undefined WatchType: Closed Script info -Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /home/src/projects/project/tsconfig.json -Info seq [hh:mm:ss:mss] Config: /home/src/projects/project/demos/tsconfig.json : { - "rootNames": [ - "/home/src/projects/project/demos/helpers.ts", - "/home/src/projects/project/app/Component-demos.ts" - ], - "options": { - "composite": true, - "rootDir": "/home/src/projects/project", - "outDir": "/home/src/projects/project/demos-dist", - "paths": { - "demos/*": [ - "./*" - ] - }, - "pathsBasePath": "/home/src/projects/project/demos", - "configFilePath": "/home/src/projects/project/demos/tsconfig.json" - } -} -Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/projects/project/demos/tsconfig.json 2000 undefined Project: /home/src/projects/project/tsconfig.json WatchType: Config file -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/demos 1 undefined Config: /home/src/projects/project/demos/tsconfig.json WatchType: Wild card directory -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/demos 1 undefined Config: /home/src/projects/project/demos/tsconfig.json WatchType: Wild card directory -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/app 1 undefined Config: /home/src/projects/project/demos/tsconfig.json WatchType: Wild card directory -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/app 1 undefined Config: /home/src/projects/project/demos/tsconfig.json WatchType: Wild card directory -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/node_modules/@types 1 undefined Project: /home/src/projects/project/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/node_modules/@types 1 undefined Project: /home/src/projects/project/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/node_modules/@types 1 undefined Project: /home/src/projects/project/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/node_modules/@types 1 undefined Project: /home/src/projects/project/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /home/src/projects/project/tsconfig.json projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (4) - /a/lib/lib.d.ts Text-1 "/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }" - /home/src/projects/project/demos/helpers.ts Text-1 "export const foo = 1;\n" - /home/src/projects/project/app/Component-demos.ts SVC-1-0 "import * as helpers from 'demos/helpers';\nexport const demo = () => {\n helpers;\n}\n" - /home/src/projects/project/app/Component.ts Text-1 "export const Component = () => {}\n" - - - ../../../../a/lib/lib.d.ts - Default library for target 'es5' - demos/helpers.ts - Imported via 'demos/helpers' from file 'app/Component-demos.ts' - Matched by default include pattern '**/*' - app/Component-demos.ts - Matched by default include pattern '**/*' - app/Component.ts - Matched by default include pattern '**/*' - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "projectLoadingFinish", - "body": { - "projectName": "/home/src/projects/project/tsconfig.json" - } - } -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "telemetry", - "body": { - "telemetryEventName": "projectInfo", - "payload": { - "projectId": "1097a5f82e8323ba7aba7567ec06402f7ad4ea74abce44ec5efd223ac77ff169", - "fileStats": { - "js": 0, - "jsSize": 0, - "jsx": 0, - "jsxSize": 0, - "ts": 3, - "tsSize": 141, - "tsx": 0, - "tsxSize": 0, - "dts": 1, - "dtsSize": 334, - "deferred": 0, - "deferredSize": 0 - }, - "compilerOptions": { - "outDir": "" - }, - "typeAcquisition": { - "enable": false, - "include": false, - "exclude": false - }, - "extends": false, - "files": false, - "include": false, - "exclude": false, - "compileOnSave": false, - "configFileName": "tsconfig.json", - "projectType": "configured", - "languageServiceEnabled": true, - "version": "FakeVersion" - } - } - } -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "configFileDiag", - "body": { - "triggerFile": "/home/src/projects/project/app/Component-demos.ts", - "configFile": "/home/src/projects/project/tsconfig.json", - "diagnostics": [] - } - } -Info seq [hh:mm:ss:mss] Creating configuration project /home/src/projects/project/demos/tsconfig.json -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "projectLoadingStart", - "body": { - "projectName": "/home/src/projects/project/demos/tsconfig.json", - "reason": "Creating project referenced in solution /home/src/projects/project/tsconfig.json to find possible configured project for /home/src/projects/project/app/Component-demos.ts to open" - } - } -Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /home/src/projects/project/demos/tsconfig.json -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/demos/node_modules/@types 1 undefined Project: /home/src/projects/project/demos/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/demos/node_modules/@types 1 undefined Project: /home/src/projects/project/demos/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/node_modules/@types 1 undefined Project: /home/src/projects/project/demos/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/node_modules/@types 1 undefined Project: /home/src/projects/project/demos/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/node_modules/@types 1 undefined Project: /home/src/projects/project/demos/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/node_modules/@types 1 undefined Project: /home/src/projects/project/demos/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /home/src/projects/project/demos/tsconfig.json projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/demos/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (3) +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/projects/project/app/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/projects/project/tsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/projects/project/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/app/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/app/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/app/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/app/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (2) /a/lib/lib.d.ts Text-1 "/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }" - /home/src/projects/project/demos/helpers.ts Text-1 "export const foo = 1;\n" /home/src/projects/project/app/Component-demos.ts SVC-1-0 "import * as helpers from 'demos/helpers';\nexport const demo = () => {\n helpers;\n}\n" ../../../../../a/lib/lib.d.ts Default library for target 'es5' - helpers.ts - Matched by include pattern '**/*' in 'tsconfig.json' - Imported via 'demos/helpers' from file '../app/Component-demos.ts' - ../app/Component-demos.ts - Matched by include pattern '../app/**/*-demos.*' in 'tsconfig.json' + Component-demos.ts + Root file specified for compilation Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "projectLoadingFinish", - "body": { - "projectName": "/home/src/projects/project/demos/tsconfig.json" - } - } -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "telemetry", - "body": { - "telemetryEventName": "projectInfo", - "payload": { - "projectId": "528692a1575f61fd3bf7069493cc100a7cad975f6cd24c47b7a63b99928a8171", - "fileStats": { - "js": 0, - "jsSize": 0, - "jsx": 0, - "jsxSize": 0, - "ts": 2, - "tsSize": 107, - "tsx": 0, - "tsxSize": 0, - "dts": 1, - "dtsSize": 334, - "deferred": 0, - "deferredSize": 0 - }, - "compilerOptions": { - "composite": true, - "rootDir": "", - "outDir": "", - "paths": "" - }, - "typeAcquisition": { - "enable": false, - "include": false, - "exclude": false - }, - "extends": false, - "files": false, - "include": true, - "exclude": false, - "compileOnSave": false, - "configFileName": "tsconfig.json", - "projectType": "configured", - "languageServiceEnabled": true, - "version": "FakeVersion" - } - } - } -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "configFileDiag", - "body": { - "triggerFile": "/home/src/projects/project/app/Component-demos.ts", - "configFile": "/home/src/projects/project/demos/tsconfig.json", - "diagnostics": [] - } - } -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /home/src/projects/project/demos/tsconfig.json ProjectRootPath: undefined:: Result: /home/src/projects/project/tsconfig.json Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/app/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (4) - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/demos/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (3) +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: Info seq [hh:mm:ss:mss] FileName: /home/src/projects/project/app/Component-demos.ts ProjectRootPath: undefined -Info seq [hh:mm:ss:mss] Projects: /home/src/projects/project/tsconfig.json,/home/src/projects/project/demos/tsconfig.json +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* Info seq [hh:mm:ss:mss] response: { "seq": 0, @@ -482,11 +257,19 @@ Info seq [hh:mm:ss:mss] response: After request PolledWatches:: +/home/src/projects/node_modules: *new* + {"pollingInterval":500} /home/src/projects/node_modules/@types: *new* {"pollingInterval":500} +/home/src/projects/project/app/jsconfig.json: *new* + {"pollingInterval":2000} +/home/src/projects/project/app/node_modules: *new* + {"pollingInterval":500} /home/src/projects/project/app/node_modules/@types: *new* {"pollingInterval":500} -/home/src/projects/project/demos/node_modules/@types: *new* +/home/src/projects/project/jsconfig.json: *new* + {"pollingInterval":2000} +/home/src/projects/project/node_modules: *new* {"pollingInterval":500} /home/src/projects/project/node_modules/@types: *new* {"pollingInterval":500} @@ -498,54 +281,36 @@ FsWatches:: {} /home/src/projects/project/app/tsconfig.json: *new* {} -/home/src/projects/project/demos/helpers.ts: *new* - {} -/home/src/projects/project/demos/tsconfig.json: *new* - {} /home/src/projects/project/tsconfig.json: *new* {} FsWatchesRecursive:: -/home/src/projects/project: *new* - {} /home/src/projects/project/app: *new* {} -/home/src/projects/project/demos: *new* - {} Projects:: -/home/src/projects/project/app/tsconfig.json (Configured) *new* +/dev/null/inferredProject1* (Inferred) *new* projectStateVersion: 1 projectProgramVersion: 1 -/home/src/projects/project/demos/tsconfig.json (Configured) *new* - projectStateVersion: 1 - projectProgramVersion: 1 -/home/src/projects/project/tsconfig.json (Configured) *new* +/home/src/projects/project/app/tsconfig.json (Configured) *new* projectStateVersion: 1 projectProgramVersion: 1 + noOpenRef: true ScriptInfos:: /a/lib/lib.d.ts *new* version: Text-1 - containingProjects: 3 + containingProjects: 2 /home/src/projects/project/app/tsconfig.json - /home/src/projects/project/tsconfig.json - /home/src/projects/project/demos/tsconfig.json + /dev/null/inferredProject1* /home/src/projects/project/app/Component-demos.ts (Open) *new* version: SVC-1-0 - containingProjects: 2 - /home/src/projects/project/tsconfig.json - /home/src/projects/project/demos/tsconfig.json *default* + containingProjects: 1 + /dev/null/inferredProject1* *default* /home/src/projects/project/app/Component.ts *new* version: Text-1 - containingProjects: 2 + containingProjects: 1 /home/src/projects/project/app/tsconfig.json - /home/src/projects/project/tsconfig.json -/home/src/projects/project/demos/helpers.ts *new* - version: Text-1 - containingProjects: 2 - /home/src/projects/project/tsconfig.json - /home/src/projects/project/demos/tsconfig.json Before request @@ -557,14 +322,9 @@ Info seq [hh:mm:ss:mss] request: } Info seq [hh:mm:ss:mss] reload projects. Info seq [hh:mm:ss:mss] Scheduled: /home/src/projects/project/app/tsconfig.json -Info seq [hh:mm:ss:mss] Scheduled: /home/src/projects/project/tsconfig.json Info seq [hh:mm:ss:mss] Scheduled: *ensureProjectForOpenFiles* Info seq [hh:mm:ss:mss] Scheduled: /home/src/projects/project/app/tsconfig.json, Cancelled earlier one -Info seq [hh:mm:ss:mss] Scheduled: /home/src/projects/project/tsconfig.json, Cancelled earlier one -Info seq [hh:mm:ss:mss] Scheduled: /home/src/projects/project/demos/tsconfig.json -Info seq [hh:mm:ss:mss] Scheduled: *ensureProjectForOpenFiles*, Cancelled earlier one -Info seq [hh:mm:ss:mss] Scheduled: /home/src/projects/project/tsconfig.json, Cancelled earlier one -Info seq [hh:mm:ss:mss] Scheduled: /home/src/projects/project/demos/tsconfig.json, Cancelled earlier one +Info seq [hh:mm:ss:mss] Scheduled: /dev/null/inferredProject1* Info seq [hh:mm:ss:mss] Scheduled: *ensureProjectForOpenFiles*, Cancelled earlier one Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /home/src/projects/project/app/Component-demos.ts ProjectRootPath: undefined:: Result: /home/src/projects/project/app/tsconfig.json Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/project/app/node_modules/@types 1 undefined Project: /home/src/projects/project/app/tsconfig.json WatchType: Type roots @@ -633,214 +393,80 @@ Info seq [hh:mm:ss:mss] event: "diagnostics": [] } } -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /home/src/projects/project/app/tsconfig.json ProjectRootPath: undefined:: Result: /home/src/projects/project/tsconfig.json -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/project/node_modules/@types 1 undefined Project: /home/src/projects/project/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/project/node_modules/@types 1 undefined Project: /home/src/projects/project/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/node_modules/@types 1 undefined Project: /home/src/projects/project/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/node_modules/@types 1 undefined Project: /home/src/projects/project/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "projectLoadingStart", - "body": { - "projectName": "/home/src/projects/project/tsconfig.json", - "reason": "User requested reload projects: Creating possible configured project for /home/src/projects/project/app/Component-demos.ts to open" - } - } -Info seq [hh:mm:ss:mss] Config: /home/src/projects/project/tsconfig.json : { - "rootNames": [ - "/home/src/projects/project/app/Component-demos.ts", - "/home/src/projects/project/app/Component.ts", - "/home/src/projects/project/demos/helpers.ts" - ], - "options": { - "outDir": "/home/src/projects/project/dist", - "configFilePath": "/home/src/projects/project/tsconfig.json" - }, - "projectReferences": [ - { - "path": "/home/src/projects/project/demos/tsconfig.json", - "originalPath": "./demos/tsconfig.json" - }, - { - "path": "/home/src/projects/project/app/tsconfig.json", - "originalPath": "./app/tsconfig.json" - } - ] -} -Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /home/src/projects/project/tsconfig.json -Info seq [hh:mm:ss:mss] Config: /home/src/projects/project/demos/tsconfig.json : { - "rootNames": [ - "/home/src/projects/project/demos/helpers.ts", - "/home/src/projects/project/app/Component-demos.ts" - ], - "options": { - "composite": true, - "rootDir": "/home/src/projects/project", - "outDir": "/home/src/projects/project/demos-dist", - "paths": { - "demos/*": [ - "./*" - ] - }, - "pathsBasePath": "/home/src/projects/project/demos", - "configFilePath": "/home/src/projects/project/demos/tsconfig.json" - } -} -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/node_modules/@types 1 undefined Project: /home/src/projects/project/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/node_modules/@types 1 undefined Project: /home/src/projects/project/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/node_modules/@types 1 undefined Project: /home/src/projects/project/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/node_modules/@types 1 undefined Project: /home/src/projects/project/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /home/src/projects/project/tsconfig.json projectStateVersion: 2 projectProgramVersion: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (4) - /a/lib/lib.d.ts Text-1 "/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }" - /home/src/projects/project/demos/helpers.ts Text-1 "export const foo = 1;\n" - /home/src/projects/project/app/Component-demos.ts SVC-1-0 "import * as helpers from 'demos/helpers';\nexport const demo = () => {\n helpers;\n}\n" - /home/src/projects/project/app/Component.ts Text-1 "export const Component = () => {}\n" - - - ../../../../a/lib/lib.d.ts - Default library for target 'es5' - demos/helpers.ts - Imported via 'demos/helpers' from file 'app/Component-demos.ts' - Matched by default include pattern '**/*' - app/Component-demos.ts - Matched by default include pattern '**/*' - app/Component.ts - Matched by default include pattern '**/*' +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/project/app/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/project/app/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/project/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/project/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/project/app/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/project/app/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/project/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/project/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Before ensureProjectForOpenFiles: +Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/app/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "projectLoadingFinish", - "body": { - "projectName": "/home/src/projects/project/tsconfig.json" - } - } -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "configFileDiag", - "body": { - "triggerFile": "/home/src/projects/project/tsconfig.json", - "configFile": "/home/src/projects/project/tsconfig.json", - "diagnostics": [] - } - } -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/project/demos/node_modules/@types 1 undefined Project: /home/src/projects/project/demos/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/project/demos/node_modules/@types 1 undefined Project: /home/src/projects/project/demos/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/project/node_modules/@types 1 undefined Project: /home/src/projects/project/demos/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/project/node_modules/@types 1 undefined Project: /home/src/projects/project/demos/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/node_modules/@types 1 undefined Project: /home/src/projects/project/demos/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/node_modules/@types 1 undefined Project: /home/src/projects/project/demos/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "projectLoadingStart", - "body": { - "projectName": "/home/src/projects/project/demos/tsconfig.json", - "reason": "User requested reload projects: Creating project referenced in solution /home/src/projects/project/tsconfig.json to find possible configured project for /home/src/projects/project/app/Component-demos.ts to open" - } - } -Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /home/src/projects/project/demos/tsconfig.json -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/demos/node_modules/@types 1 undefined Project: /home/src/projects/project/demos/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/demos/node_modules/@types 1 undefined Project: /home/src/projects/project/demos/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/node_modules/@types 1 undefined Project: /home/src/projects/project/demos/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/node_modules/@types 1 undefined Project: /home/src/projects/project/demos/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/node_modules/@types 1 undefined Project: /home/src/projects/project/demos/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/node_modules/@types 1 undefined Project: /home/src/projects/project/demos/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /home/src/projects/project/demos/tsconfig.json projectStateVersion: 2 projectProgramVersion: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/demos/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (3) +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (0) NoProgram + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /home/src/projects/project/app/Component-demos.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/app/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/app/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/app/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/app/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* projectStateVersion: 2 projectProgramVersion: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (2) /a/lib/lib.d.ts Text-1 "/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }" - /home/src/projects/project/demos/helpers.ts Text-1 "export const foo = 1;\n" /home/src/projects/project/app/Component-demos.ts SVC-1-0 "import * as helpers from 'demos/helpers';\nexport const demo = () => {\n helpers;\n}\n" ../../../../../a/lib/lib.d.ts Default library for target 'es5' - helpers.ts - Matched by include pattern '**/*' in 'tsconfig.json' - Imported via 'demos/helpers' from file '../app/Component-demos.ts' - ../app/Component-demos.ts - Matched by include pattern '../app/**/*-demos.*' in 'tsconfig.json' - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "projectLoadingFinish", - "body": { - "projectName": "/home/src/projects/project/demos/tsconfig.json" - } - } -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "configFileDiag", - "body": { - "triggerFile": "/home/src/projects/project/demos/tsconfig.json", - "configFile": "/home/src/projects/project/demos/tsconfig.json", - "diagnostics": [] - } - } -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /home/src/projects/project/demos/tsconfig.json ProjectRootPath: undefined:: Result: /home/src/projects/project/tsconfig.json -Info seq [hh:mm:ss:mss] Before ensureProjectForOpenFiles: -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/app/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (2) + Component-demos.ts + Root file specified for compilation Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (4) - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/demos/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (3) - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Open files: -Info seq [hh:mm:ss:mss] FileName: /home/src/projects/project/app/Component-demos.ts ProjectRootPath: undefined -Info seq [hh:mm:ss:mss] Projects: /home/src/projects/project/tsconfig.json,/home/src/projects/project/demos/tsconfig.json Info seq [hh:mm:ss:mss] After ensureProjectForOpenFiles: Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/app/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (4) - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/demos/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (3) +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: Info seq [hh:mm:ss:mss] FileName: /home/src/projects/project/app/Component-demos.ts ProjectRootPath: undefined -Info seq [hh:mm:ss:mss] Projects: /home/src/projects/project/tsconfig.json,/home/src/projects/project/demos/tsconfig.json +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* Info seq [hh:mm:ss:mss] After reloading projects.. Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/app/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (4) - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/demos/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (3) +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: Info seq [hh:mm:ss:mss] FileName: /home/src/projects/project/app/Component-demos.ts ProjectRootPath: undefined -Info seq [hh:mm:ss:mss] Projects: /home/src/projects/project/tsconfig.json,/home/src/projects/project/demos/tsconfig.json +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* Info seq [hh:mm:ss:mss] response: { "seq": 0, @@ -855,19 +481,29 @@ Info seq [hh:mm:ss:mss] response: After request PolledWatches:: +/home/src/projects/node_modules: + {"pollingInterval":500} *new* /home/src/projects/node_modules/@types: {"pollingInterval":500} -/home/src/projects/project/app/node_modules/@types: +/home/src/projects/project/app/jsconfig.json: + {"pollingInterval":2000} +/home/src/projects/project/app/node_modules: {"pollingInterval":500} *new* -/home/src/projects/project/demos/node_modules/@types: +/home/src/projects/project/app/node_modules/@types: + {"pollingInterval":500} +/home/src/projects/project/jsconfig.json: + {"pollingInterval":2000} +/home/src/projects/project/node_modules: {"pollingInterval":500} *new* /home/src/projects/project/node_modules/@types: {"pollingInterval":500} PolledWatches *deleted*:: -/home/src/projects/project/app/node_modules/@types: +/home/src/projects/node_modules: + {"pollingInterval":500} +/home/src/projects/project/app/node_modules: {"pollingInterval":500} -/home/src/projects/project/demos/node_modules/@types: +/home/src/projects/project/node_modules: {"pollingInterval":500} FsWatches:: @@ -877,30 +513,20 @@ FsWatches:: {} /home/src/projects/project/app/tsconfig.json: {} -/home/src/projects/project/demos/helpers.ts: - {} -/home/src/projects/project/demos/tsconfig.json: - {} /home/src/projects/project/tsconfig.json: {} FsWatchesRecursive:: -/home/src/projects/project: - {} /home/src/projects/project/app: {} -/home/src/projects/project/demos: - {} Timeout callback:: count: 0 Projects:: -/home/src/projects/project/app/tsconfig.json (Configured) *changed* - projectStateVersion: 2 *changed* - projectProgramVersion: 2 *changed* -/home/src/projects/project/demos/tsconfig.json (Configured) *changed* +/dev/null/inferredProject1* (Inferred) *changed* projectStateVersion: 2 *changed* projectProgramVersion: 2 *changed* -/home/src/projects/project/tsconfig.json (Configured) *changed* +/home/src/projects/project/app/tsconfig.json (Configured) *changed* projectStateVersion: 2 *changed* projectProgramVersion: 2 *changed* + noOpenRef: true diff --git a/tests/baselines/reference/tsserver/projectReferences/when-file-is-not-part-of-first-config-tree-found-solutionConfig-delete-with-file-open-before-revert.js b/tests/baselines/reference/tsserver/projectReferences/when-file-is-not-part-of-first-config-tree-found-solutionConfig-delete-with-file-open-before-revert.js index 7066ec1f34b59..04e56877e0ad8 100644 --- a/tests/baselines/reference/tsserver/projectReferences/when-file-is-not-part-of-first-config-tree-found-solutionConfig-delete-with-file-open-before-revert.js +++ b/tests/baselines/reference/tsserver/projectReferences/when-file-is-not-part-of-first-config-tree-found-solutionConfig-delete-with-file-open-before-revert.js @@ -203,271 +203,46 @@ Info seq [hh:mm:ss:mss] event: "diagnostics": [] } } -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /home/src/projects/project/app/tsconfig.json ProjectRootPath: undefined:: Result: /home/src/projects/project/tsconfig.json -Info seq [hh:mm:ss:mss] Creating configuration project /home/src/projects/project/tsconfig.json -Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/projects/project/tsconfig.json 2000 undefined Project: /home/src/projects/project/tsconfig.json WatchType: Config file -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "projectLoadingStart", - "body": { - "projectName": "/home/src/projects/project/tsconfig.json", - "reason": "Creating possible configured project for /home/src/projects/project/app/Component-demos.ts to open" - } - } -Info seq [hh:mm:ss:mss] Config: /home/src/projects/project/tsconfig.json : { - "rootNames": [ - "/home/src/projects/project/app/Component-demos.ts", - "/home/src/projects/project/app/Component.ts", - "/home/src/projects/project/demos/helpers.ts" - ], - "options": { - "outDir": "/home/src/projects/project/dist", - "configFilePath": "/home/src/projects/project/tsconfig.json" - }, - "projectReferences": [ - { - "path": "/home/src/projects/project/demos/tsconfig.json", - "originalPath": "./demos/tsconfig.json" - }, - { - "path": "/home/src/projects/project/app/tsconfig.json", - "originalPath": "./app/tsconfig.json" - } - ] -} -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project 1 undefined Config: /home/src/projects/project/tsconfig.json WatchType: Wild card directory -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project 1 undefined Config: /home/src/projects/project/tsconfig.json WatchType: Wild card directory -Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/projects/project/demos/helpers.ts 500 undefined WatchType: Closed Script info -Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /home/src/projects/project/tsconfig.json -Info seq [hh:mm:ss:mss] Config: /home/src/projects/project/demos/tsconfig.json : { - "rootNames": [ - "/home/src/projects/project/demos/helpers.ts", - "/home/src/projects/project/app/Component-demos.ts" - ], - "options": { - "composite": true, - "rootDir": "/home/src/projects/project", - "outDir": "/home/src/projects/project/demos-dist", - "paths": { - "demos/*": [ - "./*" - ] - }, - "pathsBasePath": "/home/src/projects/project/demos", - "configFilePath": "/home/src/projects/project/demos/tsconfig.json" - } -} -Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/projects/project/demos/tsconfig.json 2000 undefined Project: /home/src/projects/project/tsconfig.json WatchType: Config file -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/demos 1 undefined Config: /home/src/projects/project/demos/tsconfig.json WatchType: Wild card directory -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/demos 1 undefined Config: /home/src/projects/project/demos/tsconfig.json WatchType: Wild card directory -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/app 1 undefined Config: /home/src/projects/project/demos/tsconfig.json WatchType: Wild card directory -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/app 1 undefined Config: /home/src/projects/project/demos/tsconfig.json WatchType: Wild card directory -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/node_modules/@types 1 undefined Project: /home/src/projects/project/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/node_modules/@types 1 undefined Project: /home/src/projects/project/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/node_modules/@types 1 undefined Project: /home/src/projects/project/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/node_modules/@types 1 undefined Project: /home/src/projects/project/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /home/src/projects/project/tsconfig.json projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (4) - /a/lib/lib.d.ts Text-1 "/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }" - /home/src/projects/project/demos/helpers.ts Text-1 "export const foo = 1;\n" - /home/src/projects/project/app/Component-demos.ts SVC-1-0 "import * as helpers from 'demos/helpers';\nexport const demo = () => {\n helpers;\n}\n" - /home/src/projects/project/app/Component.ts Text-1 "export const Component = () => {}\n" - - - ../../../../a/lib/lib.d.ts - Default library for target 'es5' - demos/helpers.ts - Imported via 'demos/helpers' from file 'app/Component-demos.ts' - Matched by default include pattern '**/*' - app/Component-demos.ts - Matched by default include pattern '**/*' - app/Component.ts - Matched by default include pattern '**/*' - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "projectLoadingFinish", - "body": { - "projectName": "/home/src/projects/project/tsconfig.json" - } - } -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "telemetry", - "body": { - "telemetryEventName": "projectInfo", - "payload": { - "projectId": "1097a5f82e8323ba7aba7567ec06402f7ad4ea74abce44ec5efd223ac77ff169", - "fileStats": { - "js": 0, - "jsSize": 0, - "jsx": 0, - "jsxSize": 0, - "ts": 3, - "tsSize": 141, - "tsx": 0, - "tsxSize": 0, - "dts": 1, - "dtsSize": 334, - "deferred": 0, - "deferredSize": 0 - }, - "compilerOptions": { - "outDir": "" - }, - "typeAcquisition": { - "enable": false, - "include": false, - "exclude": false - }, - "extends": false, - "files": false, - "include": false, - "exclude": false, - "compileOnSave": false, - "configFileName": "tsconfig.json", - "projectType": "configured", - "languageServiceEnabled": true, - "version": "FakeVersion" - } - } - } -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "configFileDiag", - "body": { - "triggerFile": "/home/src/projects/project/app/Component-demos.ts", - "configFile": "/home/src/projects/project/tsconfig.json", - "diagnostics": [] - } - } -Info seq [hh:mm:ss:mss] Creating configuration project /home/src/projects/project/demos/tsconfig.json -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "projectLoadingStart", - "body": { - "projectName": "/home/src/projects/project/demos/tsconfig.json", - "reason": "Creating project referenced in solution /home/src/projects/project/tsconfig.json to find possible configured project for /home/src/projects/project/app/Component-demos.ts to open" - } - } -Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /home/src/projects/project/demos/tsconfig.json -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/demos/node_modules/@types 1 undefined Project: /home/src/projects/project/demos/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/demos/node_modules/@types 1 undefined Project: /home/src/projects/project/demos/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/node_modules/@types 1 undefined Project: /home/src/projects/project/demos/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/node_modules/@types 1 undefined Project: /home/src/projects/project/demos/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/node_modules/@types 1 undefined Project: /home/src/projects/project/demos/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/node_modules/@types 1 undefined Project: /home/src/projects/project/demos/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /home/src/projects/project/demos/tsconfig.json projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/demos/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (3) +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/projects/project/app/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/projects/project/tsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/projects/project/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/app/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/app/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/app/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/app/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (2) /a/lib/lib.d.ts Text-1 "/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }" - /home/src/projects/project/demos/helpers.ts Text-1 "export const foo = 1;\n" /home/src/projects/project/app/Component-demos.ts SVC-1-0 "import * as helpers from 'demos/helpers';\nexport const demo = () => {\n helpers;\n}\n" ../../../../../a/lib/lib.d.ts Default library for target 'es5' - helpers.ts - Matched by include pattern '**/*' in 'tsconfig.json' - Imported via 'demos/helpers' from file '../app/Component-demos.ts' - ../app/Component-demos.ts - Matched by include pattern '../app/**/*-demos.*' in 'tsconfig.json' + Component-demos.ts + Root file specified for compilation Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "projectLoadingFinish", - "body": { - "projectName": "/home/src/projects/project/demos/tsconfig.json" - } - } -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "telemetry", - "body": { - "telemetryEventName": "projectInfo", - "payload": { - "projectId": "528692a1575f61fd3bf7069493cc100a7cad975f6cd24c47b7a63b99928a8171", - "fileStats": { - "js": 0, - "jsSize": 0, - "jsx": 0, - "jsxSize": 0, - "ts": 2, - "tsSize": 107, - "tsx": 0, - "tsxSize": 0, - "dts": 1, - "dtsSize": 334, - "deferred": 0, - "deferredSize": 0 - }, - "compilerOptions": { - "composite": true, - "rootDir": "", - "outDir": "", - "paths": "" - }, - "typeAcquisition": { - "enable": false, - "include": false, - "exclude": false - }, - "extends": false, - "files": false, - "include": true, - "exclude": false, - "compileOnSave": false, - "configFileName": "tsconfig.json", - "projectType": "configured", - "languageServiceEnabled": true, - "version": "FakeVersion" - } - } - } -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "configFileDiag", - "body": { - "triggerFile": "/home/src/projects/project/app/Component-demos.ts", - "configFile": "/home/src/projects/project/demos/tsconfig.json", - "diagnostics": [] - } - } -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /home/src/projects/project/demos/tsconfig.json ProjectRootPath: undefined:: Result: /home/src/projects/project/tsconfig.json Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/app/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (4) - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/demos/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (3) +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: Info seq [hh:mm:ss:mss] FileName: /home/src/projects/project/app/Component-demos.ts ProjectRootPath: undefined -Info seq [hh:mm:ss:mss] Projects: /home/src/projects/project/tsconfig.json,/home/src/projects/project/demos/tsconfig.json +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* Info seq [hh:mm:ss:mss] response: { "seq": 0, @@ -482,11 +257,19 @@ Info seq [hh:mm:ss:mss] response: After request PolledWatches:: +/home/src/projects/node_modules: *new* + {"pollingInterval":500} /home/src/projects/node_modules/@types: *new* {"pollingInterval":500} +/home/src/projects/project/app/jsconfig.json: *new* + {"pollingInterval":2000} +/home/src/projects/project/app/node_modules: *new* + {"pollingInterval":500} /home/src/projects/project/app/node_modules/@types: *new* {"pollingInterval":500} -/home/src/projects/project/demos/node_modules/@types: *new* +/home/src/projects/project/jsconfig.json: *new* + {"pollingInterval":2000} +/home/src/projects/project/node_modules: *new* {"pollingInterval":500} /home/src/projects/project/node_modules/@types: *new* {"pollingInterval":500} @@ -498,62 +281,41 @@ FsWatches:: {} /home/src/projects/project/app/tsconfig.json: *new* {} -/home/src/projects/project/demos/helpers.ts: *new* - {} -/home/src/projects/project/demos/tsconfig.json: *new* - {} /home/src/projects/project/tsconfig.json: *new* {} FsWatchesRecursive:: -/home/src/projects/project: *new* - {} /home/src/projects/project/app: *new* {} -/home/src/projects/project/demos: *new* - {} Projects:: -/home/src/projects/project/app/tsconfig.json (Configured) *new* - projectStateVersion: 1 - projectProgramVersion: 1 -/home/src/projects/project/demos/tsconfig.json (Configured) *new* +/dev/null/inferredProject1* (Inferred) *new* projectStateVersion: 1 projectProgramVersion: 1 -/home/src/projects/project/tsconfig.json (Configured) *new* +/home/src/projects/project/app/tsconfig.json (Configured) *new* projectStateVersion: 1 projectProgramVersion: 1 + noOpenRef: true ScriptInfos:: /a/lib/lib.d.ts *new* version: Text-1 - containingProjects: 3 + containingProjects: 2 /home/src/projects/project/app/tsconfig.json - /home/src/projects/project/tsconfig.json - /home/src/projects/project/demos/tsconfig.json + /dev/null/inferredProject1* /home/src/projects/project/app/Component-demos.ts (Open) *new* version: SVC-1-0 - containingProjects: 2 - /home/src/projects/project/tsconfig.json - /home/src/projects/project/demos/tsconfig.json *default* + containingProjects: 1 + /dev/null/inferredProject1* *default* /home/src/projects/project/app/Component.ts *new* version: Text-1 - containingProjects: 2 + containingProjects: 1 /home/src/projects/project/app/tsconfig.json - /home/src/projects/project/tsconfig.json -/home/src/projects/project/demos/helpers.ts *new* - version: Text-1 - containingProjects: 2 - /home/src/projects/project/tsconfig.json - /home/src/projects/project/demos/tsconfig.json -Info seq [hh:mm:ss:mss] FileWatcher:: Triggered with /home/src/projects/project/tsconfig.json 2:: WatchInfo: /home/src/projects/project/tsconfig.json 2000 undefined Project: /home/src/projects/project/tsconfig.json WatchType: Config file +Info seq [hh:mm:ss:mss] FileWatcher:: Triggered with /home/src/projects/project/tsconfig.json 2:: WatchInfo: /home/src/projects/project/tsconfig.json 2000 undefined WatchType: Config file for the inferred project root Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /home/src/projects/project/app/Component-demos.ts ProjectRootPath: undefined:: Result: /home/src/projects/project/app/tsconfig.json Info seq [hh:mm:ss:mss] Scheduled: *ensureProjectForOpenFiles* -Info seq [hh:mm:ss:mss] Elapsed:: *ms FileWatcher:: Triggered with /home/src/projects/project/tsconfig.json 2:: WatchInfo: /home/src/projects/project/tsconfig.json 2000 undefined Project: /home/src/projects/project/tsconfig.json WatchType: Config file -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Triggered with /home/src/projects/project/tsconfig.json :: WatchInfo: /home/src/projects/project 1 undefined Config: /home/src/projects/project/tsconfig.json WatchType: Wild card directory -Info seq [hh:mm:ss:mss] Project: /home/src/projects/project/tsconfig.json Detected file add/remove of non supported extension: /home/src/projects/project/tsconfig.json -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Triggered with /home/src/projects/project/tsconfig.json :: WatchInfo: /home/src/projects/project 1 undefined Config: /home/src/projects/project/tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] Elapsed:: *ms FileWatcher:: Triggered with /home/src/projects/project/tsconfig.json 2:: WatchInfo: /home/src/projects/project/tsconfig.json 2000 undefined WatchType: Config file for the inferred project root Before running Timeout callback:: count: 1 1: *ensureProjectForOpenFiles* //// [/home/src/projects/project/tsconfig.json] deleted @@ -561,53 +323,32 @@ Before running Timeout callback:: count: 1 Timeout callback:: count: 1 1: *ensureProjectForOpenFiles* *new* -Projects:: -/home/src/projects/project/app/tsconfig.json (Configured) - projectStateVersion: 1 - projectProgramVersion: 1 -/home/src/projects/project/demos/tsconfig.json (Configured) - projectStateVersion: 1 - projectProgramVersion: 1 -/home/src/projects/project/tsconfig.json (Configured) *changed* - projectStateVersion: 1 - projectProgramVersion: 1 - isOrphan: true *changed* - deferredClose: true *changed* - +Host is moving to new time Info seq [hh:mm:ss:mss] Running: *ensureProjectForOpenFiles* Info seq [hh:mm:ss:mss] Before ensureProjectForOpenFiles: Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/app/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (4) - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/demos/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (3) +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: Info seq [hh:mm:ss:mss] FileName: /home/src/projects/project/app/Component-demos.ts ProjectRootPath: undefined -Info seq [hh:mm:ss:mss] Projects: /home/src/projects/project/tsconfig.json,/home/src/projects/project/demos/tsconfig.json -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /home/src/projects/project/app/tsconfig.json ProjectRootPath: undefined:: Result: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* Info seq [hh:mm:ss:mss] After ensureProjectForOpenFiles: Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/app/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (4) - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/demos/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (3) +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: Info seq [hh:mm:ss:mss] FileName: /home/src/projects/project/app/Component-demos.ts ProjectRootPath: undefined -Info seq [hh:mm:ss:mss] Projects: /home/src/projects/project/tsconfig.json,/home/src/projects/project/demos/tsconfig.json +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* Info seq [hh:mm:ss:mss] got projects updated in background /home/src/projects/project/app/Component-demos.ts Info seq [hh:mm:ss:mss] event: { @@ -624,7 +365,7 @@ After running Timeout callback:: count: 0 Info seq [hh:mm:ss:mss] File: /home/src/projects/project/app/Component-demos.ts: getDefaultProjectForFile: - /home/src/projects/project/demos/tsconfig.json + /dev/null/inferredProject1* findDefaultConfiguredProject: undefined Before request @@ -740,25 +481,39 @@ Info seq [hh:mm:ss:mss] event: "diagnostics": [] } } +Info seq [hh:mm:ss:mss] `remove Project:: Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/app/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (2) + /a/lib/lib.d.ts + /home/src/projects/project/app/Component.ts + + + ../../../../../a/lib/lib.d.ts + Default library for target 'es5' + Component.ts + Matched by include pattern '**/*' in 'tsconfig.json' Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (4) - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/demos/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (3) +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/project/app 1 undefined Config: /home/src/projects/project/app/tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/project/app 1 undefined Config: /home/src/projects/project/app/tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/project/app/node_modules/@types 1 undefined Project: /home/src/projects/project/app/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/project/app/node_modules/@types 1 undefined Project: /home/src/projects/project/app/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/project/node_modules/@types 1 undefined Project: /home/src/projects/project/app/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/project/node_modules/@types 1 undefined Project: /home/src/projects/project/app/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/node_modules/@types 1 undefined Project: /home/src/projects/project/app/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/node_modules/@types 1 undefined Project: /home/src/projects/project/app/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /home/src/projects/project/app/Component.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Project '/home/src/projects/random/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/home/src/projects/random/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: Info seq [hh:mm:ss:mss] FileName: /home/src/projects/project/app/Component-demos.ts ProjectRootPath: undefined -Info seq [hh:mm:ss:mss] Projects: /home/src/projects/project/tsconfig.json,/home/src/projects/project/demos/tsconfig.json +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* Info seq [hh:mm:ss:mss] FileName: /home/src/projects/random/random.ts ProjectRootPath: undefined Info seq [hh:mm:ss:mss] Projects: /home/src/projects/random/tsconfig.json Info seq [hh:mm:ss:mss] response: @@ -775,11 +530,19 @@ Info seq [hh:mm:ss:mss] response: After request PolledWatches:: +/home/src/projects/node_modules: + {"pollingInterval":500} /home/src/projects/node_modules/@types: {"pollingInterval":500} +/home/src/projects/project/app/jsconfig.json: + {"pollingInterval":2000} +/home/src/projects/project/app/node_modules: + {"pollingInterval":500} /home/src/projects/project/app/node_modules/@types: {"pollingInterval":500} -/home/src/projects/project/demos/node_modules/@types: +/home/src/projects/project/jsconfig.json: + {"pollingInterval":2000} +/home/src/projects/project/node_modules: {"pollingInterval":500} /home/src/projects/project/node_modules/@types: {"pollingInterval":500} @@ -789,41 +552,34 @@ PolledWatches:: FsWatches:: /a/lib/lib.d.ts: {} -/home/src/projects/project/app/Component.ts: - {} /home/src/projects/project/app/tsconfig.json: {} -/home/src/projects/project/demos/helpers.ts: - {} -/home/src/projects/project/demos/tsconfig.json: - {} /home/src/projects/project/tsconfig.json: {} /home/src/projects/random/tsconfig.json: *new* {} +FsWatches *deleted*:: +/home/src/projects/project/app/Component.ts: + {} + FsWatchesRecursive:: -/home/src/projects/project: +/home/src/projects/random: *new* {} + +FsWatchesRecursive *deleted*:: /home/src/projects/project/app: {} -/home/src/projects/project/demos: - {} -/home/src/projects/random: *new* - {} Projects:: -/home/src/projects/project/app/tsconfig.json (Configured) +/dev/null/inferredProject1* (Inferred) projectStateVersion: 1 projectProgramVersion: 1 -/home/src/projects/project/demos/tsconfig.json (Configured) +/home/src/projects/project/app/tsconfig.json (Configured) *deleted* projectStateVersion: 1 projectProgramVersion: 1 -/home/src/projects/project/tsconfig.json (Configured) - projectStateVersion: 1 - projectProgramVersion: 1 - isOrphan: true - deferredClose: true + isClosed: true *changed* + noOpenRef: true /home/src/projects/random/tsconfig.json (Configured) *new* projectStateVersion: 1 projectProgramVersion: 1 @@ -831,26 +587,18 @@ Projects:: ScriptInfos:: /a/lib/lib.d.ts *changed* version: Text-1 - containingProjects: 4 *changed* - /home/src/projects/project/app/tsconfig.json - /home/src/projects/project/tsconfig.json - /home/src/projects/project/demos/tsconfig.json + containingProjects: 2 *changed* + /dev/null/inferredProject1* /home/src/projects/random/tsconfig.json *new* + /home/src/projects/project/app/tsconfig.json *deleted* /home/src/projects/project/app/Component-demos.ts (Open) version: SVC-1-0 - containingProjects: 2 - /home/src/projects/project/tsconfig.json - /home/src/projects/project/demos/tsconfig.json *default* -/home/src/projects/project/app/Component.ts - version: Text-1 - containingProjects: 2 - /home/src/projects/project/app/tsconfig.json - /home/src/projects/project/tsconfig.json -/home/src/projects/project/demos/helpers.ts + containingProjects: 1 + /dev/null/inferredProject1* *default* +/home/src/projects/project/app/Component.ts *deleted* version: Text-1 - containingProjects: 2 - /home/src/projects/project/tsconfig.json - /home/src/projects/project/demos/tsconfig.json + containingProjects: 0 *changed* + /home/src/projects/project/app/tsconfig.json *deleted* /home/src/projects/random/random.ts (Open) *new* version: SVC-1-0 containingProjects: 1 @@ -868,25 +616,17 @@ Info seq [hh:mm:ss:mss] request: "type": "request" } Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/projects/random/random.ts 500 undefined WatchType: Closed Script info -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/app/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Project '/home/src/projects/random/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (4) - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/demos/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (3) - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/home/src/projects/random/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: Info seq [hh:mm:ss:mss] FileName: /home/src/projects/project/app/Component-demos.ts ProjectRootPath: undefined -Info seq [hh:mm:ss:mss] Projects: /home/src/projects/project/tsconfig.json,/home/src/projects/project/demos/tsconfig.json +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* Info seq [hh:mm:ss:mss] response: { "seq": 0, @@ -898,11 +638,19 @@ Info seq [hh:mm:ss:mss] response: After request PolledWatches:: +/home/src/projects/node_modules: + {"pollingInterval":500} /home/src/projects/node_modules/@types: {"pollingInterval":500} +/home/src/projects/project/app/jsconfig.json: + {"pollingInterval":2000} +/home/src/projects/project/app/node_modules: + {"pollingInterval":500} /home/src/projects/project/app/node_modules/@types: {"pollingInterval":500} -/home/src/projects/project/demos/node_modules/@types: +/home/src/projects/project/jsconfig.json: + {"pollingInterval":2000} +/home/src/projects/project/node_modules: {"pollingInterval":500} /home/src/projects/project/node_modules/@types: {"pollingInterval":500} @@ -912,14 +660,8 @@ PolledWatches:: FsWatches:: /a/lib/lib.d.ts: {} -/home/src/projects/project/app/Component.ts: - {} /home/src/projects/project/app/tsconfig.json: {} -/home/src/projects/project/demos/helpers.ts: - {} -/home/src/projects/project/demos/tsconfig.json: - {} /home/src/projects/project/tsconfig.json: {} /home/src/projects/random/random.ts: *new* @@ -928,27 +670,13 @@ FsWatches:: {} FsWatchesRecursive:: -/home/src/projects/project: - {} -/home/src/projects/project/app: - {} -/home/src/projects/project/demos: - {} /home/src/projects/random: {} Projects:: -/home/src/projects/project/app/tsconfig.json (Configured) +/dev/null/inferredProject1* (Inferred) projectStateVersion: 1 projectProgramVersion: 1 -/home/src/projects/project/demos/tsconfig.json (Configured) - projectStateVersion: 1 - projectProgramVersion: 1 -/home/src/projects/project/tsconfig.json (Configured) - projectStateVersion: 1 - projectProgramVersion: 1 - isOrphan: true - deferredClose: true /home/src/projects/random/tsconfig.json (Configured) *changed* projectStateVersion: 1 projectProgramVersion: 1 @@ -957,26 +685,13 @@ Projects:: ScriptInfos:: /a/lib/lib.d.ts version: Text-1 - containingProjects: 4 - /home/src/projects/project/app/tsconfig.json - /home/src/projects/project/tsconfig.json - /home/src/projects/project/demos/tsconfig.json + containingProjects: 2 + /dev/null/inferredProject1* /home/src/projects/random/tsconfig.json /home/src/projects/project/app/Component-demos.ts (Open) version: SVC-1-0 - containingProjects: 2 - /home/src/projects/project/tsconfig.json - /home/src/projects/project/demos/tsconfig.json *default* -/home/src/projects/project/app/Component.ts - version: Text-1 - containingProjects: 2 - /home/src/projects/project/app/tsconfig.json - /home/src/projects/project/tsconfig.json -/home/src/projects/project/demos/helpers.ts - version: Text-1 - containingProjects: 2 - /home/src/projects/project/tsconfig.json - /home/src/projects/project/demos/tsconfig.json + containingProjects: 1 + /dev/null/inferredProject1* *default* /home/src/projects/random/random.ts *changed* open: false *changed* version: SVC-1-0 @@ -985,19 +700,17 @@ ScriptInfos:: Info seq [hh:mm:ss:mss] File: /home/src/projects/project/app/Component-demos.ts: getDefaultProjectForFile: - /home/src/projects/project/demos/tsconfig.json + /dev/null/inferredProject1* findDefaultConfiguredProject: undefined -Info seq [hh:mm:ss:mss] FileWatcher:: Triggered with /home/src/projects/project/tsconfig.json 0:: WatchInfo: /home/src/projects/project/tsconfig.json 2000 undefined Project: /home/src/projects/project/tsconfig.json WatchType: Config file -Info seq [hh:mm:ss:mss] Scheduled: /home/src/projects/project/tsconfig.json +Info seq [hh:mm:ss:mss] FileWatcher:: Triggered with /home/src/projects/project/tsconfig.json 0:: WatchInfo: /home/src/projects/project/tsconfig.json 2000 undefined WatchType: Config file for the inferred project root Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /home/src/projects/project/app/Component-demos.ts ProjectRootPath: undefined:: Result: /home/src/projects/project/app/tsconfig.json +Info seq [hh:mm:ss:mss] Creating configuration project /home/src/projects/project/app/tsconfig.json +Info seq [hh:mm:ss:mss] Scheduled: /home/src/projects/project/app/tsconfig.json Info seq [hh:mm:ss:mss] Scheduled: *ensureProjectForOpenFiles* -Info seq [hh:mm:ss:mss] Elapsed:: *ms FileWatcher:: Triggered with /home/src/projects/project/tsconfig.json 0:: WatchInfo: /home/src/projects/project/tsconfig.json 2000 undefined Project: /home/src/projects/project/tsconfig.json WatchType: Config file -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Triggered with /home/src/projects/project/tsconfig.json :: WatchInfo: /home/src/projects/project 1 undefined Config: /home/src/projects/project/tsconfig.json WatchType: Wild card directory -Info seq [hh:mm:ss:mss] Project: /home/src/projects/project/tsconfig.json Detected file add/remove of non supported extension: /home/src/projects/project/tsconfig.json -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Triggered with /home/src/projects/project/tsconfig.json :: WatchInfo: /home/src/projects/project 1 undefined Config: /home/src/projects/project/tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] Elapsed:: *ms FileWatcher:: Triggered with /home/src/projects/project/tsconfig.json 0:: WatchInfo: /home/src/projects/project/tsconfig.json 2000 undefined WatchType: Config file for the inferred project root Before running Timeout callback:: count: 2 -2: /home/src/projects/project/tsconfig.json +2: /home/src/projects/project/app/tsconfig.json 3: *ensureProjectForOpenFiles* //// [/home/src/projects/project/tsconfig.json] { @@ -1016,69 +729,73 @@ Before running Timeout callback:: count: 2 Timeout callback:: count: 2 -2: /home/src/projects/project/tsconfig.json *new* +2: /home/src/projects/project/app/tsconfig.json *new* 3: *ensureProjectForOpenFiles* *new* Projects:: -/home/src/projects/project/app/tsconfig.json (Configured) +/dev/null/inferredProject1* (Inferred) projectStateVersion: 1 projectProgramVersion: 1 -/home/src/projects/project/demos/tsconfig.json (Configured) +/home/src/projects/project/app/tsconfig.json (Configured) *new* projectStateVersion: 1 - projectProgramVersion: 1 -/home/src/projects/project/tsconfig.json (Configured) *changed* - projectStateVersion: 2 *changed* - projectProgramVersion: 1 - dirty: true *changed* - isOrphan: false *changed* - deferredClose: undefined *changed* + projectProgramVersion: 0 + dirty: true /home/src/projects/random/tsconfig.json (Configured) projectStateVersion: 1 projectProgramVersion: 1 noOpenRef: true -Info seq [hh:mm:ss:mss] Running: /home/src/projects/project/tsconfig.json +Info seq [hh:mm:ss:mss] Running: /home/src/projects/project/app/tsconfig.json Info seq [hh:mm:ss:mss] event: { "seq": 0, "type": "event", "event": "projectLoadingStart", "body": { - "projectName": "/home/src/projects/project/tsconfig.json", - "reason": "Change in config file detected" + "projectName": "/home/src/projects/project/app/tsconfig.json", + "reason": "Change in config file /home/src/projects/project/tsconfig.json detected, Creating possible configured project for /home/src/projects/project/app/Component-demos.ts to open" } } -Info seq [hh:mm:ss:mss] Config: /home/src/projects/project/tsconfig.json : { +Info seq [hh:mm:ss:mss] Config: /home/src/projects/project/app/tsconfig.json : { "rootNames": [ - "/home/src/projects/project/app/Component-demos.ts", - "/home/src/projects/project/app/Component.ts", - "/home/src/projects/project/demos/helpers.ts" + "/home/src/projects/project/app/Component.ts" ], "options": { - "outDir": "/home/src/projects/project/dist", - "configFilePath": "/home/src/projects/project/tsconfig.json" - }, - "projectReferences": [ - { - "path": "/home/src/projects/project/demos/tsconfig.json", - "originalPath": "./demos/tsconfig.json" - }, - { - "path": "/home/src/projects/project/app/tsconfig.json", - "originalPath": "./app/tsconfig.json" - } - ] + "composite": true, + "outDir": "/home/src/projects/project/app-dist", + "configFilePath": "/home/src/projects/project/app/tsconfig.json" + } } -Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /home/src/projects/project/tsconfig.json -Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /home/src/projects/project/tsconfig.json projectStateVersion: 2 projectProgramVersion: 1 structureChanged: false structureIsReused:: Not Elapsed:: *ms -Info seq [hh:mm:ss:mss] Same program as before +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/app 1 undefined Config: /home/src/projects/project/app/tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/app 1 undefined Config: /home/src/projects/project/app/tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/projects/project/app/Component.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /home/src/projects/project/app/tsconfig.json +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/app/node_modules/@types 1 undefined Project: /home/src/projects/project/app/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/app/node_modules/@types 1 undefined Project: /home/src/projects/project/app/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/node_modules/@types 1 undefined Project: /home/src/projects/project/app/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/node_modules/@types 1 undefined Project: /home/src/projects/project/app/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/node_modules/@types 1 undefined Project: /home/src/projects/project/app/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/node_modules/@types 1 undefined Project: /home/src/projects/project/app/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /home/src/projects/project/app/tsconfig.json projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/app/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (2) + /a/lib/lib.d.ts Text-1 "/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }" + /home/src/projects/project/app/Component.ts Text-2 "export const Component = () => {}\n" + + + ../../../../../a/lib/lib.d.ts + Default library for target 'es5' + Component.ts + Matched by include pattern '**/*' in 'tsconfig.json' + +Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] event: { "seq": 0, "type": "event", "event": "projectLoadingFinish", "body": { - "projectName": "/home/src/projects/project/tsconfig.json" + "projectName": "/home/src/projects/project/app/tsconfig.json" } } Info seq [hh:mm:ss:mss] event: @@ -1087,54 +804,44 @@ Info seq [hh:mm:ss:mss] event: "type": "event", "event": "configFileDiag", "body": { - "triggerFile": "/home/src/projects/project/tsconfig.json", - "configFile": "/home/src/projects/project/tsconfig.json", + "triggerFile": "/home/src/projects/project/app/tsconfig.json", + "configFile": "/home/src/projects/project/app/tsconfig.json", "diagnostics": [] } } Info seq [hh:mm:ss:mss] Running: *ensureProjectForOpenFiles* Info seq [hh:mm:ss:mss] Before ensureProjectForOpenFiles: -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/app/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Project '/home/src/projects/random/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (4) - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/demos/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (3) +Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/app/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/home/src/projects/random/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: Info seq [hh:mm:ss:mss] FileName: /home/src/projects/project/app/Component-demos.ts ProjectRootPath: undefined -Info seq [hh:mm:ss:mss] Projects: /home/src/projects/project/tsconfig.json,/home/src/projects/project/demos/tsconfig.json -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /home/src/projects/project/app/tsconfig.json ProjectRootPath: undefined:: Result: /home/src/projects/project/tsconfig.json -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /home/src/projects/project/demos/tsconfig.json ProjectRootPath: undefined:: Result: /home/src/projects/project/tsconfig.json +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* Info seq [hh:mm:ss:mss] After ensureProjectForOpenFiles: -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/app/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Project '/home/src/projects/random/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (4) - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/demos/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (3) +Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/app/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/home/src/projects/random/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: Info seq [hh:mm:ss:mss] FileName: /home/src/projects/project/app/Component-demos.ts ProjectRootPath: undefined -Info seq [hh:mm:ss:mss] Projects: /home/src/projects/project/tsconfig.json,/home/src/projects/project/demos/tsconfig.json +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* Info seq [hh:mm:ss:mss] got projects updated in background /home/src/projects/project/app/Component-demos.ts Info seq [hh:mm:ss:mss] event: { @@ -1149,24 +856,82 @@ Info seq [hh:mm:ss:mss] event: } After running Timeout callback:: count: 0 +PolledWatches:: +/home/src/projects/node_modules: + {"pollingInterval":500} +/home/src/projects/node_modules/@types: + {"pollingInterval":500} +/home/src/projects/project/app/jsconfig.json: + {"pollingInterval":2000} +/home/src/projects/project/app/node_modules: + {"pollingInterval":500} +/home/src/projects/project/app/node_modules/@types: + {"pollingInterval":500} +/home/src/projects/project/jsconfig.json: + {"pollingInterval":2000} +/home/src/projects/project/node_modules: + {"pollingInterval":500} +/home/src/projects/project/node_modules/@types: + {"pollingInterval":500} +/home/src/projects/random/node_modules/@types: + {"pollingInterval":500} + +FsWatches:: +/a/lib/lib.d.ts: + {} +/home/src/projects/project/app/Component.ts: *new* + {} +/home/src/projects/project/app/tsconfig.json: + {} +/home/src/projects/project/tsconfig.json: + {} +/home/src/projects/random/random.ts: + {} +/home/src/projects/random/tsconfig.json: + {} + +FsWatchesRecursive:: +/home/src/projects/project/app: *new* + {} +/home/src/projects/random: + {} + Projects:: -/home/src/projects/project/app/tsconfig.json (Configured) +/dev/null/inferredProject1* (Inferred) projectStateVersion: 1 projectProgramVersion: 1 -/home/src/projects/project/demos/tsconfig.json (Configured) +/home/src/projects/project/app/tsconfig.json (Configured) *changed* projectStateVersion: 1 - projectProgramVersion: 1 -/home/src/projects/project/tsconfig.json (Configured) *changed* - projectStateVersion: 2 - projectProgramVersion: 1 + projectProgramVersion: 1 *changed* dirty: false *changed* + noOpenRef: true *changed* /home/src/projects/random/tsconfig.json (Configured) projectStateVersion: 1 projectProgramVersion: 1 noOpenRef: true +ScriptInfos:: +/a/lib/lib.d.ts *changed* + version: Text-1 + containingProjects: 3 *changed* + /dev/null/inferredProject1* + /home/src/projects/random/tsconfig.json + /home/src/projects/project/app/tsconfig.json *new* +/home/src/projects/project/app/Component-demos.ts (Open) + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject1* *default* +/home/src/projects/project/app/Component.ts *new* + version: Text-2 + containingProjects: 1 + /home/src/projects/project/app/tsconfig.json +/home/src/projects/random/random.ts + version: SVC-1-0 + containingProjects: 1 + /home/src/projects/random/tsconfig.json + Info seq [hh:mm:ss:mss] File: /home/src/projects/project/app/Component-demos.ts: getDefaultProjectForFile: - /home/src/projects/project/demos/tsconfig.json + /dev/null/inferredProject1* findDefaultConfiguredProject: - /home/src/projects/project/demos/tsconfig.json \ No newline at end of file + undefined \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/projectReferences/when-file-is-not-part-of-first-config-tree-found-solutionConfig-delete.js b/tests/baselines/reference/tsserver/projectReferences/when-file-is-not-part-of-first-config-tree-found-solutionConfig-delete.js index ca4236e80ef60..e90cac93be968 100644 --- a/tests/baselines/reference/tsserver/projectReferences/when-file-is-not-part-of-first-config-tree-found-solutionConfig-delete.js +++ b/tests/baselines/reference/tsserver/projectReferences/when-file-is-not-part-of-first-config-tree-found-solutionConfig-delete.js @@ -203,271 +203,46 @@ Info seq [hh:mm:ss:mss] event: "diagnostics": [] } } -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /home/src/projects/project/app/tsconfig.json ProjectRootPath: undefined:: Result: /home/src/projects/project/tsconfig.json -Info seq [hh:mm:ss:mss] Creating configuration project /home/src/projects/project/tsconfig.json -Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/projects/project/tsconfig.json 2000 undefined Project: /home/src/projects/project/tsconfig.json WatchType: Config file -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "projectLoadingStart", - "body": { - "projectName": "/home/src/projects/project/tsconfig.json", - "reason": "Creating possible configured project for /home/src/projects/project/app/Component-demos.ts to open" - } - } -Info seq [hh:mm:ss:mss] Config: /home/src/projects/project/tsconfig.json : { - "rootNames": [ - "/home/src/projects/project/app/Component-demos.ts", - "/home/src/projects/project/app/Component.ts", - "/home/src/projects/project/demos/helpers.ts" - ], - "options": { - "outDir": "/home/src/projects/project/dist", - "configFilePath": "/home/src/projects/project/tsconfig.json" - }, - "projectReferences": [ - { - "path": "/home/src/projects/project/demos/tsconfig.json", - "originalPath": "./demos/tsconfig.json" - }, - { - "path": "/home/src/projects/project/app/tsconfig.json", - "originalPath": "./app/tsconfig.json" - } - ] -} -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project 1 undefined Config: /home/src/projects/project/tsconfig.json WatchType: Wild card directory -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project 1 undefined Config: /home/src/projects/project/tsconfig.json WatchType: Wild card directory -Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/projects/project/demos/helpers.ts 500 undefined WatchType: Closed Script info -Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /home/src/projects/project/tsconfig.json -Info seq [hh:mm:ss:mss] Config: /home/src/projects/project/demos/tsconfig.json : { - "rootNames": [ - "/home/src/projects/project/demos/helpers.ts", - "/home/src/projects/project/app/Component-demos.ts" - ], - "options": { - "composite": true, - "rootDir": "/home/src/projects/project", - "outDir": "/home/src/projects/project/demos-dist", - "paths": { - "demos/*": [ - "./*" - ] - }, - "pathsBasePath": "/home/src/projects/project/demos", - "configFilePath": "/home/src/projects/project/demos/tsconfig.json" - } -} -Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/projects/project/demos/tsconfig.json 2000 undefined Project: /home/src/projects/project/tsconfig.json WatchType: Config file -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/demos 1 undefined Config: /home/src/projects/project/demos/tsconfig.json WatchType: Wild card directory -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/demos 1 undefined Config: /home/src/projects/project/demos/tsconfig.json WatchType: Wild card directory -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/app 1 undefined Config: /home/src/projects/project/demos/tsconfig.json WatchType: Wild card directory -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/app 1 undefined Config: /home/src/projects/project/demos/tsconfig.json WatchType: Wild card directory -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/node_modules/@types 1 undefined Project: /home/src/projects/project/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/node_modules/@types 1 undefined Project: /home/src/projects/project/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/node_modules/@types 1 undefined Project: /home/src/projects/project/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/node_modules/@types 1 undefined Project: /home/src/projects/project/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /home/src/projects/project/tsconfig.json projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (4) - /a/lib/lib.d.ts Text-1 "/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }" - /home/src/projects/project/demos/helpers.ts Text-1 "export const foo = 1;\n" - /home/src/projects/project/app/Component-demos.ts SVC-1-0 "import * as helpers from 'demos/helpers';\nexport const demo = () => {\n helpers;\n}\n" - /home/src/projects/project/app/Component.ts Text-1 "export const Component = () => {}\n" - - - ../../../../a/lib/lib.d.ts - Default library for target 'es5' - demos/helpers.ts - Imported via 'demos/helpers' from file 'app/Component-demos.ts' - Matched by default include pattern '**/*' - app/Component-demos.ts - Matched by default include pattern '**/*' - app/Component.ts - Matched by default include pattern '**/*' - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "projectLoadingFinish", - "body": { - "projectName": "/home/src/projects/project/tsconfig.json" - } - } -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "telemetry", - "body": { - "telemetryEventName": "projectInfo", - "payload": { - "projectId": "1097a5f82e8323ba7aba7567ec06402f7ad4ea74abce44ec5efd223ac77ff169", - "fileStats": { - "js": 0, - "jsSize": 0, - "jsx": 0, - "jsxSize": 0, - "ts": 3, - "tsSize": 141, - "tsx": 0, - "tsxSize": 0, - "dts": 1, - "dtsSize": 334, - "deferred": 0, - "deferredSize": 0 - }, - "compilerOptions": { - "outDir": "" - }, - "typeAcquisition": { - "enable": false, - "include": false, - "exclude": false - }, - "extends": false, - "files": false, - "include": false, - "exclude": false, - "compileOnSave": false, - "configFileName": "tsconfig.json", - "projectType": "configured", - "languageServiceEnabled": true, - "version": "FakeVersion" - } - } - } -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "configFileDiag", - "body": { - "triggerFile": "/home/src/projects/project/app/Component-demos.ts", - "configFile": "/home/src/projects/project/tsconfig.json", - "diagnostics": [] - } - } -Info seq [hh:mm:ss:mss] Creating configuration project /home/src/projects/project/demos/tsconfig.json -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "projectLoadingStart", - "body": { - "projectName": "/home/src/projects/project/demos/tsconfig.json", - "reason": "Creating project referenced in solution /home/src/projects/project/tsconfig.json to find possible configured project for /home/src/projects/project/app/Component-demos.ts to open" - } - } -Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /home/src/projects/project/demos/tsconfig.json -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/demos/node_modules/@types 1 undefined Project: /home/src/projects/project/demos/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/demos/node_modules/@types 1 undefined Project: /home/src/projects/project/demos/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/node_modules/@types 1 undefined Project: /home/src/projects/project/demos/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/node_modules/@types 1 undefined Project: /home/src/projects/project/demos/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/node_modules/@types 1 undefined Project: /home/src/projects/project/demos/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/node_modules/@types 1 undefined Project: /home/src/projects/project/demos/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /home/src/projects/project/demos/tsconfig.json projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/demos/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (3) +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/projects/project/app/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/projects/project/tsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/projects/project/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/app/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/app/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/app/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/app/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (2) /a/lib/lib.d.ts Text-1 "/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }" - /home/src/projects/project/demos/helpers.ts Text-1 "export const foo = 1;\n" /home/src/projects/project/app/Component-demos.ts SVC-1-0 "import * as helpers from 'demos/helpers';\nexport const demo = () => {\n helpers;\n}\n" ../../../../../a/lib/lib.d.ts Default library for target 'es5' - helpers.ts - Matched by include pattern '**/*' in 'tsconfig.json' - Imported via 'demos/helpers' from file '../app/Component-demos.ts' - ../app/Component-demos.ts - Matched by include pattern '../app/**/*-demos.*' in 'tsconfig.json' + Component-demos.ts + Root file specified for compilation Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "projectLoadingFinish", - "body": { - "projectName": "/home/src/projects/project/demos/tsconfig.json" - } - } -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "telemetry", - "body": { - "telemetryEventName": "projectInfo", - "payload": { - "projectId": "528692a1575f61fd3bf7069493cc100a7cad975f6cd24c47b7a63b99928a8171", - "fileStats": { - "js": 0, - "jsSize": 0, - "jsx": 0, - "jsxSize": 0, - "ts": 2, - "tsSize": 107, - "tsx": 0, - "tsxSize": 0, - "dts": 1, - "dtsSize": 334, - "deferred": 0, - "deferredSize": 0 - }, - "compilerOptions": { - "composite": true, - "rootDir": "", - "outDir": "", - "paths": "" - }, - "typeAcquisition": { - "enable": false, - "include": false, - "exclude": false - }, - "extends": false, - "files": false, - "include": true, - "exclude": false, - "compileOnSave": false, - "configFileName": "tsconfig.json", - "projectType": "configured", - "languageServiceEnabled": true, - "version": "FakeVersion" - } - } - } -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "configFileDiag", - "body": { - "triggerFile": "/home/src/projects/project/app/Component-demos.ts", - "configFile": "/home/src/projects/project/demos/tsconfig.json", - "diagnostics": [] - } - } -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /home/src/projects/project/demos/tsconfig.json ProjectRootPath: undefined:: Result: /home/src/projects/project/tsconfig.json Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/app/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (4) - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/demos/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (3) +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: Info seq [hh:mm:ss:mss] FileName: /home/src/projects/project/app/Component-demos.ts ProjectRootPath: undefined -Info seq [hh:mm:ss:mss] Projects: /home/src/projects/project/tsconfig.json,/home/src/projects/project/demos/tsconfig.json +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* Info seq [hh:mm:ss:mss] response: { "seq": 0, @@ -482,11 +257,19 @@ Info seq [hh:mm:ss:mss] response: After request PolledWatches:: +/home/src/projects/node_modules: *new* + {"pollingInterval":500} /home/src/projects/node_modules/@types: *new* {"pollingInterval":500} +/home/src/projects/project/app/jsconfig.json: *new* + {"pollingInterval":2000} +/home/src/projects/project/app/node_modules: *new* + {"pollingInterval":500} /home/src/projects/project/app/node_modules/@types: *new* {"pollingInterval":500} -/home/src/projects/project/demos/node_modules/@types: *new* +/home/src/projects/project/jsconfig.json: *new* + {"pollingInterval":2000} +/home/src/projects/project/node_modules: *new* {"pollingInterval":500} /home/src/projects/project/node_modules/@types: *new* {"pollingInterval":500} @@ -498,62 +281,41 @@ FsWatches:: {} /home/src/projects/project/app/tsconfig.json: *new* {} -/home/src/projects/project/demos/helpers.ts: *new* - {} -/home/src/projects/project/demos/tsconfig.json: *new* - {} /home/src/projects/project/tsconfig.json: *new* {} FsWatchesRecursive:: -/home/src/projects/project: *new* - {} /home/src/projects/project/app: *new* {} -/home/src/projects/project/demos: *new* - {} Projects:: -/home/src/projects/project/app/tsconfig.json (Configured) *new* +/dev/null/inferredProject1* (Inferred) *new* projectStateVersion: 1 projectProgramVersion: 1 -/home/src/projects/project/demos/tsconfig.json (Configured) *new* - projectStateVersion: 1 - projectProgramVersion: 1 -/home/src/projects/project/tsconfig.json (Configured) *new* +/home/src/projects/project/app/tsconfig.json (Configured) *new* projectStateVersion: 1 projectProgramVersion: 1 + noOpenRef: true ScriptInfos:: /a/lib/lib.d.ts *new* version: Text-1 - containingProjects: 3 + containingProjects: 2 /home/src/projects/project/app/tsconfig.json - /home/src/projects/project/tsconfig.json - /home/src/projects/project/demos/tsconfig.json + /dev/null/inferredProject1* /home/src/projects/project/app/Component-demos.ts (Open) *new* version: SVC-1-0 - containingProjects: 2 - /home/src/projects/project/tsconfig.json - /home/src/projects/project/demos/tsconfig.json *default* + containingProjects: 1 + /dev/null/inferredProject1* *default* /home/src/projects/project/app/Component.ts *new* version: Text-1 - containingProjects: 2 + containingProjects: 1 /home/src/projects/project/app/tsconfig.json - /home/src/projects/project/tsconfig.json -/home/src/projects/project/demos/helpers.ts *new* - version: Text-1 - containingProjects: 2 - /home/src/projects/project/tsconfig.json - /home/src/projects/project/demos/tsconfig.json -Info seq [hh:mm:ss:mss] FileWatcher:: Triggered with /home/src/projects/project/tsconfig.json 2:: WatchInfo: /home/src/projects/project/tsconfig.json 2000 undefined Project: /home/src/projects/project/tsconfig.json WatchType: Config file +Info seq [hh:mm:ss:mss] FileWatcher:: Triggered with /home/src/projects/project/tsconfig.json 2:: WatchInfo: /home/src/projects/project/tsconfig.json 2000 undefined WatchType: Config file for the inferred project root Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /home/src/projects/project/app/Component-demos.ts ProjectRootPath: undefined:: Result: /home/src/projects/project/app/tsconfig.json Info seq [hh:mm:ss:mss] Scheduled: *ensureProjectForOpenFiles* -Info seq [hh:mm:ss:mss] Elapsed:: *ms FileWatcher:: Triggered with /home/src/projects/project/tsconfig.json 2:: WatchInfo: /home/src/projects/project/tsconfig.json 2000 undefined Project: /home/src/projects/project/tsconfig.json WatchType: Config file -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Triggered with /home/src/projects/project/tsconfig.json :: WatchInfo: /home/src/projects/project 1 undefined Config: /home/src/projects/project/tsconfig.json WatchType: Wild card directory -Info seq [hh:mm:ss:mss] Project: /home/src/projects/project/tsconfig.json Detected file add/remove of non supported extension: /home/src/projects/project/tsconfig.json -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Triggered with /home/src/projects/project/tsconfig.json :: WatchInfo: /home/src/projects/project 1 undefined Config: /home/src/projects/project/tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] Elapsed:: *ms FileWatcher:: Triggered with /home/src/projects/project/tsconfig.json 2:: WatchInfo: /home/src/projects/project/tsconfig.json 2000 undefined WatchType: Config file for the inferred project root Before running Timeout callback:: count: 1 1: *ensureProjectForOpenFiles* //// [/home/src/projects/project/tsconfig.json] deleted @@ -561,53 +323,32 @@ Before running Timeout callback:: count: 1 Timeout callback:: count: 1 1: *ensureProjectForOpenFiles* *new* -Projects:: -/home/src/projects/project/app/tsconfig.json (Configured) - projectStateVersion: 1 - projectProgramVersion: 1 -/home/src/projects/project/demos/tsconfig.json (Configured) - projectStateVersion: 1 - projectProgramVersion: 1 -/home/src/projects/project/tsconfig.json (Configured) *changed* - projectStateVersion: 1 - projectProgramVersion: 1 - isOrphan: true *changed* - deferredClose: true *changed* - +Host is moving to new time Info seq [hh:mm:ss:mss] Running: *ensureProjectForOpenFiles* Info seq [hh:mm:ss:mss] Before ensureProjectForOpenFiles: Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/app/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (4) - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/demos/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (3) +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: Info seq [hh:mm:ss:mss] FileName: /home/src/projects/project/app/Component-demos.ts ProjectRootPath: undefined -Info seq [hh:mm:ss:mss] Projects: /home/src/projects/project/tsconfig.json,/home/src/projects/project/demos/tsconfig.json -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /home/src/projects/project/app/tsconfig.json ProjectRootPath: undefined:: Result: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* Info seq [hh:mm:ss:mss] After ensureProjectForOpenFiles: Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/app/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (4) - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/demos/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (3) +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: Info seq [hh:mm:ss:mss] FileName: /home/src/projects/project/app/Component-demos.ts ProjectRootPath: undefined -Info seq [hh:mm:ss:mss] Projects: /home/src/projects/project/tsconfig.json,/home/src/projects/project/demos/tsconfig.json +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* Info seq [hh:mm:ss:mss] got projects updated in background /home/src/projects/project/app/Component-demos.ts Info seq [hh:mm:ss:mss] event: { @@ -624,20 +365,15 @@ After running Timeout callback:: count: 0 Info seq [hh:mm:ss:mss] File: /home/src/projects/project/app/Component-demos.ts: getDefaultProjectForFile: - /home/src/projects/project/demos/tsconfig.json + /dev/null/inferredProject1* findDefaultConfiguredProject: undefined -Info seq [hh:mm:ss:mss] FileWatcher:: Triggered with /home/src/projects/project/tsconfig.json 0:: WatchInfo: /home/src/projects/project/tsconfig.json 2000 undefined Project: /home/src/projects/project/tsconfig.json WatchType: Config file -Info seq [hh:mm:ss:mss] Scheduled: /home/src/projects/project/tsconfig.json +Info seq [hh:mm:ss:mss] FileWatcher:: Triggered with /home/src/projects/project/tsconfig.json 0:: WatchInfo: /home/src/projects/project/tsconfig.json 2000 undefined WatchType: Config file for the inferred project root Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /home/src/projects/project/app/Component-demos.ts ProjectRootPath: undefined:: Result: /home/src/projects/project/app/tsconfig.json Info seq [hh:mm:ss:mss] Scheduled: *ensureProjectForOpenFiles* -Info seq [hh:mm:ss:mss] Elapsed:: *ms FileWatcher:: Triggered with /home/src/projects/project/tsconfig.json 0:: WatchInfo: /home/src/projects/project/tsconfig.json 2000 undefined Project: /home/src/projects/project/tsconfig.json WatchType: Config file -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Triggered with /home/src/projects/project/tsconfig.json :: WatchInfo: /home/src/projects/project 1 undefined Config: /home/src/projects/project/tsconfig.json WatchType: Wild card directory -Info seq [hh:mm:ss:mss] Project: /home/src/projects/project/tsconfig.json Detected file add/remove of non supported extension: /home/src/projects/project/tsconfig.json -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Triggered with /home/src/projects/project/tsconfig.json :: WatchInfo: /home/src/projects/project 1 undefined Config: /home/src/projects/project/tsconfig.json WatchType: Wild card directory -Before running Timeout callback:: count: 2 -2: /home/src/projects/project/tsconfig.json -3: *ensureProjectForOpenFiles* +Info seq [hh:mm:ss:mss] Elapsed:: *ms FileWatcher:: Triggered with /home/src/projects/project/tsconfig.json 0:: WatchInfo: /home/src/projects/project/tsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Before running Timeout callback:: count: 1 +2: *ensureProjectForOpenFiles* //// [/home/src/projects/project/tsconfig.json] { "compilerOptions": { @@ -654,114 +390,35 @@ Before running Timeout callback:: count: 2 } -Timeout callback:: count: 2 -2: /home/src/projects/project/tsconfig.json *new* -3: *ensureProjectForOpenFiles* *new* - -Projects:: -/home/src/projects/project/app/tsconfig.json (Configured) - projectStateVersion: 1 - projectProgramVersion: 1 -/home/src/projects/project/demos/tsconfig.json (Configured) - projectStateVersion: 1 - projectProgramVersion: 1 -/home/src/projects/project/tsconfig.json (Configured) *changed* - projectStateVersion: 2 *changed* - projectProgramVersion: 1 - dirty: true *changed* - isOrphan: false *changed* - deferredClose: undefined *changed* +Timeout callback:: count: 1 +2: *ensureProjectForOpenFiles* *new* -Info seq [hh:mm:ss:mss] Running: /home/src/projects/project/tsconfig.json -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "projectLoadingStart", - "body": { - "projectName": "/home/src/projects/project/tsconfig.json", - "reason": "Change in config file detected" - } - } -Info seq [hh:mm:ss:mss] Config: /home/src/projects/project/tsconfig.json : { - "rootNames": [ - "/home/src/projects/project/app/Component-demos.ts", - "/home/src/projects/project/app/Component.ts", - "/home/src/projects/project/demos/helpers.ts" - ], - "options": { - "outDir": "/home/src/projects/project/dist", - "configFilePath": "/home/src/projects/project/tsconfig.json" - }, - "projectReferences": [ - { - "path": "/home/src/projects/project/demos/tsconfig.json", - "originalPath": "./demos/tsconfig.json" - }, - { - "path": "/home/src/projects/project/app/tsconfig.json", - "originalPath": "./app/tsconfig.json" - } - ] -} -Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /home/src/projects/project/tsconfig.json -Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /home/src/projects/project/tsconfig.json projectStateVersion: 2 projectProgramVersion: 1 structureChanged: false structureIsReused:: Not Elapsed:: *ms -Info seq [hh:mm:ss:mss] Same program as before -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "projectLoadingFinish", - "body": { - "projectName": "/home/src/projects/project/tsconfig.json" - } - } -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "configFileDiag", - "body": { - "triggerFile": "/home/src/projects/project/tsconfig.json", - "configFile": "/home/src/projects/project/tsconfig.json", - "diagnostics": [] - } - } +Host is moving to new time Info seq [hh:mm:ss:mss] Running: *ensureProjectForOpenFiles* Info seq [hh:mm:ss:mss] Before ensureProjectForOpenFiles: Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/app/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (4) - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/demos/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (3) +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: Info seq [hh:mm:ss:mss] FileName: /home/src/projects/project/app/Component-demos.ts ProjectRootPath: undefined -Info seq [hh:mm:ss:mss] Projects: /home/src/projects/project/tsconfig.json,/home/src/projects/project/demos/tsconfig.json -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /home/src/projects/project/app/tsconfig.json ProjectRootPath: undefined:: Result: /home/src/projects/project/tsconfig.json -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /home/src/projects/project/demos/tsconfig.json ProjectRootPath: undefined:: Result: /home/src/projects/project/tsconfig.json +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* Info seq [hh:mm:ss:mss] After ensureProjectForOpenFiles: Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/app/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (4) - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/demos/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (3) +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: Info seq [hh:mm:ss:mss] FileName: /home/src/projects/project/app/Component-demos.ts ProjectRootPath: undefined -Info seq [hh:mm:ss:mss] Projects: /home/src/projects/project/tsconfig.json,/home/src/projects/project/demos/tsconfig.json +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* Info seq [hh:mm:ss:mss] got projects updated in background /home/src/projects/project/app/Component-demos.ts Info seq [hh:mm:ss:mss] event: { @@ -776,23 +433,11 @@ Info seq [hh:mm:ss:mss] event: } After running Timeout callback:: count: 0 -Projects:: -/home/src/projects/project/app/tsconfig.json (Configured) - projectStateVersion: 1 - projectProgramVersion: 1 -/home/src/projects/project/demos/tsconfig.json (Configured) - projectStateVersion: 1 - projectProgramVersion: 1 -/home/src/projects/project/tsconfig.json (Configured) *changed* - projectStateVersion: 2 - projectProgramVersion: 1 - dirty: false *changed* - Info seq [hh:mm:ss:mss] File: /home/src/projects/project/app/Component-demos.ts: getDefaultProjectForFile: - /home/src/projects/project/demos/tsconfig.json + /dev/null/inferredProject1* findDefaultConfiguredProject: - /home/src/projects/project/demos/tsconfig.json + undefined Before request Info seq [hh:mm:ss:mss] request: @@ -906,25 +551,39 @@ Info seq [hh:mm:ss:mss] event: "diagnostics": [] } } +Info seq [hh:mm:ss:mss] `remove Project:: Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/app/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (2) + /a/lib/lib.d.ts + /home/src/projects/project/app/Component.ts + + + ../../../../../a/lib/lib.d.ts + Default library for target 'es5' + Component.ts + Matched by include pattern '**/*' in 'tsconfig.json' Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (4) - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/demos/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (3) +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/project/app 1 undefined Config: /home/src/projects/project/app/tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/project/app 1 undefined Config: /home/src/projects/project/app/tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/project/app/node_modules/@types 1 undefined Project: /home/src/projects/project/app/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/project/app/node_modules/@types 1 undefined Project: /home/src/projects/project/app/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/project/node_modules/@types 1 undefined Project: /home/src/projects/project/app/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/project/node_modules/@types 1 undefined Project: /home/src/projects/project/app/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/node_modules/@types 1 undefined Project: /home/src/projects/project/app/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/node_modules/@types 1 undefined Project: /home/src/projects/project/app/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /home/src/projects/project/app/Component.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Project '/home/src/projects/random/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/home/src/projects/random/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: Info seq [hh:mm:ss:mss] FileName: /home/src/projects/project/app/Component-demos.ts ProjectRootPath: undefined -Info seq [hh:mm:ss:mss] Projects: /home/src/projects/project/tsconfig.json,/home/src/projects/project/demos/tsconfig.json +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* Info seq [hh:mm:ss:mss] FileName: /home/src/projects/random/random.ts ProjectRootPath: undefined Info seq [hh:mm:ss:mss] Projects: /home/src/projects/random/tsconfig.json Info seq [hh:mm:ss:mss] response: @@ -941,11 +600,19 @@ Info seq [hh:mm:ss:mss] response: After request PolledWatches:: +/home/src/projects/node_modules: + {"pollingInterval":500} /home/src/projects/node_modules/@types: {"pollingInterval":500} +/home/src/projects/project/app/jsconfig.json: + {"pollingInterval":2000} +/home/src/projects/project/app/node_modules: + {"pollingInterval":500} /home/src/projects/project/app/node_modules/@types: {"pollingInterval":500} -/home/src/projects/project/demos/node_modules/@types: +/home/src/projects/project/jsconfig.json: + {"pollingInterval":2000} +/home/src/projects/project/node_modules: {"pollingInterval":500} /home/src/projects/project/node_modules/@types: {"pollingInterval":500} @@ -955,39 +622,34 @@ PolledWatches:: FsWatches:: /a/lib/lib.d.ts: {} -/home/src/projects/project/app/Component.ts: - {} /home/src/projects/project/app/tsconfig.json: {} -/home/src/projects/project/demos/helpers.ts: - {} -/home/src/projects/project/demos/tsconfig.json: - {} /home/src/projects/project/tsconfig.json: {} /home/src/projects/random/tsconfig.json: *new* {} +FsWatches *deleted*:: +/home/src/projects/project/app/Component.ts: + {} + FsWatchesRecursive:: -/home/src/projects/project: +/home/src/projects/random: *new* {} + +FsWatchesRecursive *deleted*:: /home/src/projects/project/app: {} -/home/src/projects/project/demos: - {} -/home/src/projects/random: *new* - {} Projects:: -/home/src/projects/project/app/tsconfig.json (Configured) +/dev/null/inferredProject1* (Inferred) projectStateVersion: 1 projectProgramVersion: 1 -/home/src/projects/project/demos/tsconfig.json (Configured) +/home/src/projects/project/app/tsconfig.json (Configured) *deleted* projectStateVersion: 1 projectProgramVersion: 1 -/home/src/projects/project/tsconfig.json (Configured) - projectStateVersion: 2 - projectProgramVersion: 1 + isClosed: true *changed* + noOpenRef: true /home/src/projects/random/tsconfig.json (Configured) *new* projectStateVersion: 1 projectProgramVersion: 1 @@ -995,26 +657,18 @@ Projects:: ScriptInfos:: /a/lib/lib.d.ts *changed* version: Text-1 - containingProjects: 4 *changed* - /home/src/projects/project/app/tsconfig.json - /home/src/projects/project/tsconfig.json - /home/src/projects/project/demos/tsconfig.json + containingProjects: 2 *changed* + /dev/null/inferredProject1* /home/src/projects/random/tsconfig.json *new* + /home/src/projects/project/app/tsconfig.json *deleted* /home/src/projects/project/app/Component-demos.ts (Open) version: SVC-1-0 - containingProjects: 2 - /home/src/projects/project/tsconfig.json - /home/src/projects/project/demos/tsconfig.json *default* -/home/src/projects/project/app/Component.ts - version: Text-1 - containingProjects: 2 - /home/src/projects/project/app/tsconfig.json - /home/src/projects/project/tsconfig.json -/home/src/projects/project/demos/helpers.ts + containingProjects: 1 + /dev/null/inferredProject1* *default* +/home/src/projects/project/app/Component.ts *deleted* version: Text-1 - containingProjects: 2 - /home/src/projects/project/tsconfig.json - /home/src/projects/project/demos/tsconfig.json + containingProjects: 0 *changed* + /home/src/projects/project/app/tsconfig.json *deleted* /home/src/projects/random/random.ts (Open) *new* version: SVC-1-0 containingProjects: 1 @@ -1032,25 +686,17 @@ Info seq [hh:mm:ss:mss] request: "type": "request" } Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/projects/random/random.ts 500 undefined WatchType: Closed Script info -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/app/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Project '/home/src/projects/random/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (4) - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/demos/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (3) - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/home/src/projects/random/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: Info seq [hh:mm:ss:mss] FileName: /home/src/projects/project/app/Component-demos.ts ProjectRootPath: undefined -Info seq [hh:mm:ss:mss] Projects: /home/src/projects/project/tsconfig.json,/home/src/projects/project/demos/tsconfig.json +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* Info seq [hh:mm:ss:mss] response: { "seq": 0, @@ -1062,11 +708,19 @@ Info seq [hh:mm:ss:mss] response: After request PolledWatches:: +/home/src/projects/node_modules: + {"pollingInterval":500} /home/src/projects/node_modules/@types: {"pollingInterval":500} +/home/src/projects/project/app/jsconfig.json: + {"pollingInterval":2000} +/home/src/projects/project/app/node_modules: + {"pollingInterval":500} /home/src/projects/project/app/node_modules/@types: {"pollingInterval":500} -/home/src/projects/project/demos/node_modules/@types: +/home/src/projects/project/jsconfig.json: + {"pollingInterval":2000} +/home/src/projects/project/node_modules: {"pollingInterval":500} /home/src/projects/project/node_modules/@types: {"pollingInterval":500} @@ -1076,14 +730,8 @@ PolledWatches:: FsWatches:: /a/lib/lib.d.ts: {} -/home/src/projects/project/app/Component.ts: - {} /home/src/projects/project/app/tsconfig.json: {} -/home/src/projects/project/demos/helpers.ts: - {} -/home/src/projects/project/demos/tsconfig.json: - {} /home/src/projects/project/tsconfig.json: {} /home/src/projects/random/random.ts: *new* @@ -1092,25 +740,13 @@ FsWatches:: {} FsWatchesRecursive:: -/home/src/projects/project: - {} -/home/src/projects/project/app: - {} -/home/src/projects/project/demos: - {} /home/src/projects/random: {} Projects:: -/home/src/projects/project/app/tsconfig.json (Configured) +/dev/null/inferredProject1* (Inferred) projectStateVersion: 1 projectProgramVersion: 1 -/home/src/projects/project/demos/tsconfig.json (Configured) - projectStateVersion: 1 - projectProgramVersion: 1 -/home/src/projects/project/tsconfig.json (Configured) - projectStateVersion: 2 - projectProgramVersion: 1 /home/src/projects/random/tsconfig.json (Configured) *changed* projectStateVersion: 1 projectProgramVersion: 1 @@ -1119,26 +755,13 @@ Projects:: ScriptInfos:: /a/lib/lib.d.ts version: Text-1 - containingProjects: 4 - /home/src/projects/project/app/tsconfig.json - /home/src/projects/project/tsconfig.json - /home/src/projects/project/demos/tsconfig.json + containingProjects: 2 + /dev/null/inferredProject1* /home/src/projects/random/tsconfig.json /home/src/projects/project/app/Component-demos.ts (Open) version: SVC-1-0 - containingProjects: 2 - /home/src/projects/project/tsconfig.json - /home/src/projects/project/demos/tsconfig.json *default* -/home/src/projects/project/app/Component.ts - version: Text-1 - containingProjects: 2 - /home/src/projects/project/app/tsconfig.json - /home/src/projects/project/tsconfig.json -/home/src/projects/project/demos/helpers.ts - version: Text-1 - containingProjects: 2 - /home/src/projects/project/tsconfig.json - /home/src/projects/project/demos/tsconfig.json + containingProjects: 1 + /dev/null/inferredProject1* *default* /home/src/projects/random/random.ts *changed* open: false *changed* version: SVC-1-0 @@ -1147,6 +770,6 @@ ScriptInfos:: Info seq [hh:mm:ss:mss] File: /home/src/projects/project/app/Component-demos.ts: getDefaultProjectForFile: - /home/src/projects/project/demos/tsconfig.json + /dev/null/inferredProject1* findDefaultConfiguredProject: - /home/src/projects/project/demos/tsconfig.json \ No newline at end of file + undefined \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/projectReferences/when-file-is-not-part-of-first-config-tree-found-solutionConfig-without-reference-to-demo-with-file-open-before-revert.js b/tests/baselines/reference/tsserver/projectReferences/when-file-is-not-part-of-first-config-tree-found-solutionConfig-without-reference-to-demo-with-file-open-before-revert.js index dddd9bd01f356..bba710901b933 100644 --- a/tests/baselines/reference/tsserver/projectReferences/when-file-is-not-part-of-first-config-tree-found-solutionConfig-without-reference-to-demo-with-file-open-before-revert.js +++ b/tests/baselines/reference/tsserver/projectReferences/when-file-is-not-part-of-first-config-tree-found-solutionConfig-without-reference-to-demo-with-file-open-before-revert.js @@ -203,271 +203,46 @@ Info seq [hh:mm:ss:mss] event: "diagnostics": [] } } -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /home/src/projects/project/app/tsconfig.json ProjectRootPath: undefined:: Result: /home/src/projects/project/tsconfig.json -Info seq [hh:mm:ss:mss] Creating configuration project /home/src/projects/project/tsconfig.json -Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/projects/project/tsconfig.json 2000 undefined Project: /home/src/projects/project/tsconfig.json WatchType: Config file -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "projectLoadingStart", - "body": { - "projectName": "/home/src/projects/project/tsconfig.json", - "reason": "Creating possible configured project for /home/src/projects/project/app/Component-demos.ts to open" - } - } -Info seq [hh:mm:ss:mss] Config: /home/src/projects/project/tsconfig.json : { - "rootNames": [ - "/home/src/projects/project/app/Component-demos.ts", - "/home/src/projects/project/app/Component.ts", - "/home/src/projects/project/demos/helpers.ts" - ], - "options": { - "outDir": "/home/src/projects/project/dist", - "configFilePath": "/home/src/projects/project/tsconfig.json" - }, - "projectReferences": [ - { - "path": "/home/src/projects/project/demos/tsconfig.json", - "originalPath": "./demos/tsconfig.json" - }, - { - "path": "/home/src/projects/project/app/tsconfig.json", - "originalPath": "./app/tsconfig.json" - } - ] -} -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project 1 undefined Config: /home/src/projects/project/tsconfig.json WatchType: Wild card directory -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project 1 undefined Config: /home/src/projects/project/tsconfig.json WatchType: Wild card directory -Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/projects/project/demos/helpers.ts 500 undefined WatchType: Closed Script info -Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /home/src/projects/project/tsconfig.json -Info seq [hh:mm:ss:mss] Config: /home/src/projects/project/demos/tsconfig.json : { - "rootNames": [ - "/home/src/projects/project/demos/helpers.ts", - "/home/src/projects/project/app/Component-demos.ts" - ], - "options": { - "composite": true, - "rootDir": "/home/src/projects/project", - "outDir": "/home/src/projects/project/demos-dist", - "paths": { - "demos/*": [ - "./*" - ] - }, - "pathsBasePath": "/home/src/projects/project/demos", - "configFilePath": "/home/src/projects/project/demos/tsconfig.json" - } -} -Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/projects/project/demos/tsconfig.json 2000 undefined Project: /home/src/projects/project/tsconfig.json WatchType: Config file -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/demos 1 undefined Config: /home/src/projects/project/demos/tsconfig.json WatchType: Wild card directory -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/demos 1 undefined Config: /home/src/projects/project/demos/tsconfig.json WatchType: Wild card directory -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/app 1 undefined Config: /home/src/projects/project/demos/tsconfig.json WatchType: Wild card directory -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/app 1 undefined Config: /home/src/projects/project/demos/tsconfig.json WatchType: Wild card directory -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/node_modules/@types 1 undefined Project: /home/src/projects/project/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/node_modules/@types 1 undefined Project: /home/src/projects/project/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/node_modules/@types 1 undefined Project: /home/src/projects/project/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/node_modules/@types 1 undefined Project: /home/src/projects/project/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /home/src/projects/project/tsconfig.json projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (4) - /a/lib/lib.d.ts Text-1 "/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }" - /home/src/projects/project/demos/helpers.ts Text-1 "export const foo = 1;\n" - /home/src/projects/project/app/Component-demos.ts SVC-1-0 "import * as helpers from 'demos/helpers';\nexport const demo = () => {\n helpers;\n}\n" - /home/src/projects/project/app/Component.ts Text-1 "export const Component = () => {}\n" - - - ../../../../a/lib/lib.d.ts - Default library for target 'es5' - demos/helpers.ts - Imported via 'demos/helpers' from file 'app/Component-demos.ts' - Matched by default include pattern '**/*' - app/Component-demos.ts - Matched by default include pattern '**/*' - app/Component.ts - Matched by default include pattern '**/*' - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "projectLoadingFinish", - "body": { - "projectName": "/home/src/projects/project/tsconfig.json" - } - } -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "telemetry", - "body": { - "telemetryEventName": "projectInfo", - "payload": { - "projectId": "1097a5f82e8323ba7aba7567ec06402f7ad4ea74abce44ec5efd223ac77ff169", - "fileStats": { - "js": 0, - "jsSize": 0, - "jsx": 0, - "jsxSize": 0, - "ts": 3, - "tsSize": 141, - "tsx": 0, - "tsxSize": 0, - "dts": 1, - "dtsSize": 334, - "deferred": 0, - "deferredSize": 0 - }, - "compilerOptions": { - "outDir": "" - }, - "typeAcquisition": { - "enable": false, - "include": false, - "exclude": false - }, - "extends": false, - "files": false, - "include": false, - "exclude": false, - "compileOnSave": false, - "configFileName": "tsconfig.json", - "projectType": "configured", - "languageServiceEnabled": true, - "version": "FakeVersion" - } - } - } -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "configFileDiag", - "body": { - "triggerFile": "/home/src/projects/project/app/Component-demos.ts", - "configFile": "/home/src/projects/project/tsconfig.json", - "diagnostics": [] - } - } -Info seq [hh:mm:ss:mss] Creating configuration project /home/src/projects/project/demos/tsconfig.json -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "projectLoadingStart", - "body": { - "projectName": "/home/src/projects/project/demos/tsconfig.json", - "reason": "Creating project referenced in solution /home/src/projects/project/tsconfig.json to find possible configured project for /home/src/projects/project/app/Component-demos.ts to open" - } - } -Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /home/src/projects/project/demos/tsconfig.json -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/demos/node_modules/@types 1 undefined Project: /home/src/projects/project/demos/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/demos/node_modules/@types 1 undefined Project: /home/src/projects/project/demos/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/node_modules/@types 1 undefined Project: /home/src/projects/project/demos/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/node_modules/@types 1 undefined Project: /home/src/projects/project/demos/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/node_modules/@types 1 undefined Project: /home/src/projects/project/demos/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/node_modules/@types 1 undefined Project: /home/src/projects/project/demos/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /home/src/projects/project/demos/tsconfig.json projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/demos/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (3) +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/projects/project/app/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/projects/project/tsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/projects/project/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/app/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/app/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/app/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/app/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (2) /a/lib/lib.d.ts Text-1 "/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }" - /home/src/projects/project/demos/helpers.ts Text-1 "export const foo = 1;\n" /home/src/projects/project/app/Component-demos.ts SVC-1-0 "import * as helpers from 'demos/helpers';\nexport const demo = () => {\n helpers;\n}\n" ../../../../../a/lib/lib.d.ts Default library for target 'es5' - helpers.ts - Matched by include pattern '**/*' in 'tsconfig.json' - Imported via 'demos/helpers' from file '../app/Component-demos.ts' - ../app/Component-demos.ts - Matched by include pattern '../app/**/*-demos.*' in 'tsconfig.json' + Component-demos.ts + Root file specified for compilation Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "projectLoadingFinish", - "body": { - "projectName": "/home/src/projects/project/demos/tsconfig.json" - } - } -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "telemetry", - "body": { - "telemetryEventName": "projectInfo", - "payload": { - "projectId": "528692a1575f61fd3bf7069493cc100a7cad975f6cd24c47b7a63b99928a8171", - "fileStats": { - "js": 0, - "jsSize": 0, - "jsx": 0, - "jsxSize": 0, - "ts": 2, - "tsSize": 107, - "tsx": 0, - "tsxSize": 0, - "dts": 1, - "dtsSize": 334, - "deferred": 0, - "deferredSize": 0 - }, - "compilerOptions": { - "composite": true, - "rootDir": "", - "outDir": "", - "paths": "" - }, - "typeAcquisition": { - "enable": false, - "include": false, - "exclude": false - }, - "extends": false, - "files": false, - "include": true, - "exclude": false, - "compileOnSave": false, - "configFileName": "tsconfig.json", - "projectType": "configured", - "languageServiceEnabled": true, - "version": "FakeVersion" - } - } - } -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "configFileDiag", - "body": { - "triggerFile": "/home/src/projects/project/app/Component-demos.ts", - "configFile": "/home/src/projects/project/demos/tsconfig.json", - "diagnostics": [] - } - } -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /home/src/projects/project/demos/tsconfig.json ProjectRootPath: undefined:: Result: /home/src/projects/project/tsconfig.json Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/app/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (4) - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/demos/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (3) +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: Info seq [hh:mm:ss:mss] FileName: /home/src/projects/project/app/Component-demos.ts ProjectRootPath: undefined -Info seq [hh:mm:ss:mss] Projects: /home/src/projects/project/tsconfig.json,/home/src/projects/project/demos/tsconfig.json +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* Info seq [hh:mm:ss:mss] response: { "seq": 0, @@ -482,11 +257,19 @@ Info seq [hh:mm:ss:mss] response: After request PolledWatches:: +/home/src/projects/node_modules: *new* + {"pollingInterval":500} /home/src/projects/node_modules/@types: *new* {"pollingInterval":500} +/home/src/projects/project/app/jsconfig.json: *new* + {"pollingInterval":2000} +/home/src/projects/project/app/node_modules: *new* + {"pollingInterval":500} /home/src/projects/project/app/node_modules/@types: *new* {"pollingInterval":500} -/home/src/projects/project/demos/node_modules/@types: *new* +/home/src/projects/project/jsconfig.json: *new* + {"pollingInterval":2000} +/home/src/projects/project/node_modules: *new* {"pollingInterval":500} /home/src/projects/project/node_modules/@types: *new* {"pollingInterval":500} @@ -498,63 +281,43 @@ FsWatches:: {} /home/src/projects/project/app/tsconfig.json: *new* {} -/home/src/projects/project/demos/helpers.ts: *new* - {} -/home/src/projects/project/demos/tsconfig.json: *new* - {} /home/src/projects/project/tsconfig.json: *new* {} FsWatchesRecursive:: -/home/src/projects/project: *new* - {} /home/src/projects/project/app: *new* {} -/home/src/projects/project/demos: *new* - {} Projects:: -/home/src/projects/project/app/tsconfig.json (Configured) *new* - projectStateVersion: 1 - projectProgramVersion: 1 -/home/src/projects/project/demos/tsconfig.json (Configured) *new* +/dev/null/inferredProject1* (Inferred) *new* projectStateVersion: 1 projectProgramVersion: 1 -/home/src/projects/project/tsconfig.json (Configured) *new* +/home/src/projects/project/app/tsconfig.json (Configured) *new* projectStateVersion: 1 projectProgramVersion: 1 + noOpenRef: true ScriptInfos:: /a/lib/lib.d.ts *new* version: Text-1 - containingProjects: 3 + containingProjects: 2 /home/src/projects/project/app/tsconfig.json - /home/src/projects/project/tsconfig.json - /home/src/projects/project/demos/tsconfig.json + /dev/null/inferredProject1* /home/src/projects/project/app/Component-demos.ts (Open) *new* version: SVC-1-0 - containingProjects: 2 - /home/src/projects/project/tsconfig.json - /home/src/projects/project/demos/tsconfig.json *default* + containingProjects: 1 + /dev/null/inferredProject1* *default* /home/src/projects/project/app/Component.ts *new* version: Text-1 - containingProjects: 2 + containingProjects: 1 /home/src/projects/project/app/tsconfig.json - /home/src/projects/project/tsconfig.json -/home/src/projects/project/demos/helpers.ts *new* - version: Text-1 - containingProjects: 2 - /home/src/projects/project/tsconfig.json - /home/src/projects/project/demos/tsconfig.json -Info seq [hh:mm:ss:mss] FileWatcher:: Triggered with /home/src/projects/project/tsconfig.json 1:: WatchInfo: /home/src/projects/project/tsconfig.json 2000 undefined Project: /home/src/projects/project/tsconfig.json WatchType: Config file -Info seq [hh:mm:ss:mss] Scheduled: /home/src/projects/project/tsconfig.json +Info seq [hh:mm:ss:mss] FileWatcher:: Triggered with /home/src/projects/project/tsconfig.json 1:: WatchInfo: /home/src/projects/project/tsconfig.json 2000 undefined WatchType: Config file for the inferred project root Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /home/src/projects/project/app/Component-demos.ts ProjectRootPath: undefined:: Result: /home/src/projects/project/app/tsconfig.json Info seq [hh:mm:ss:mss] Scheduled: *ensureProjectForOpenFiles* -Info seq [hh:mm:ss:mss] Elapsed:: *ms FileWatcher:: Triggered with /home/src/projects/project/tsconfig.json 1:: WatchInfo: /home/src/projects/project/tsconfig.json 2000 undefined Project: /home/src/projects/project/tsconfig.json WatchType: Config file -Before running Timeout callback:: count: 2 -1: /home/src/projects/project/tsconfig.json -2: *ensureProjectForOpenFiles* +Info seq [hh:mm:ss:mss] Elapsed:: *ms FileWatcher:: Triggered with /home/src/projects/project/tsconfig.json 1:: WatchInfo: /home/src/projects/project/tsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Before running Timeout callback:: count: 1 +1: *ensureProjectForOpenFiles* //// [/home/src/projects/project/tsconfig.json] { "compilerOptions": { @@ -568,120 +331,35 @@ Before running Timeout callback:: count: 2 } -Timeout callback:: count: 2 -1: /home/src/projects/project/tsconfig.json *new* -2: *ensureProjectForOpenFiles* *new* +Timeout callback:: count: 1 +1: *ensureProjectForOpenFiles* *new* -Projects:: -/home/src/projects/project/app/tsconfig.json (Configured) - projectStateVersion: 1 - projectProgramVersion: 1 -/home/src/projects/project/demos/tsconfig.json (Configured) - projectStateVersion: 1 - projectProgramVersion: 1 -/home/src/projects/project/tsconfig.json (Configured) *changed* - projectStateVersion: 2 *changed* - projectProgramVersion: 1 - dirty: true *changed* - -Info seq [hh:mm:ss:mss] Running: /home/src/projects/project/tsconfig.json -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "projectLoadingStart", - "body": { - "projectName": "/home/src/projects/project/tsconfig.json", - "reason": "Change in config file detected" - } - } -Info seq [hh:mm:ss:mss] Config: /home/src/projects/project/tsconfig.json : { - "rootNames": [ - "/home/src/projects/project/app/Component-demos.ts", - "/home/src/projects/project/app/Component.ts", - "/home/src/projects/project/demos/helpers.ts" - ], - "options": { - "outDir": "/home/src/projects/project/dist", - "configFilePath": "/home/src/projects/project/tsconfig.json" - }, - "projectReferences": [ - { - "path": "/home/src/projects/project/app/tsconfig.json", - "originalPath": "./app/tsconfig.json" - } - ] -} -Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /home/src/projects/project/tsconfig.json -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/app 1 undefined Project: /home/src/projects/project/tsconfig.json WatchType: Failed Lookup Locations -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/app 1 undefined Project: /home/src/projects/project/tsconfig.json WatchType: Failed Lookup Locations -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/node_modules 1 undefined Project: /home/src/projects/project/tsconfig.json WatchType: Failed Lookup Locations -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/node_modules 1 undefined Project: /home/src/projects/project/tsconfig.json WatchType: Failed Lookup Locations -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/node_modules 1 undefined Project: /home/src/projects/project/tsconfig.json WatchType: Failed Lookup Locations -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/node_modules 1 undefined Project: /home/src/projects/project/tsconfig.json WatchType: Failed Lookup Locations -Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /home/src/projects/project/tsconfig.json projectStateVersion: 2 projectProgramVersion: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (4) - /a/lib/lib.d.ts Text-1 "/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }" - /home/src/projects/project/app/Component-demos.ts SVC-1-0 "import * as helpers from 'demos/helpers';\nexport const demo = () => {\n helpers;\n}\n" - /home/src/projects/project/app/Component.ts Text-1 "export const Component = () => {}\n" - /home/src/projects/project/demos/helpers.ts Text-1 "export const foo = 1;\n" - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "projectLoadingFinish", - "body": { - "projectName": "/home/src/projects/project/tsconfig.json" - } - } -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "configFileDiag", - "body": { - "triggerFile": "/home/src/projects/project/tsconfig.json", - "configFile": "/home/src/projects/project/tsconfig.json", - "diagnostics": [] - } - } +Host is moving to new time Info seq [hh:mm:ss:mss] Running: *ensureProjectForOpenFiles* Info seq [hh:mm:ss:mss] Before ensureProjectForOpenFiles: Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/app/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (4) - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/demos/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (3) +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: Info seq [hh:mm:ss:mss] FileName: /home/src/projects/project/app/Component-demos.ts ProjectRootPath: undefined -Info seq [hh:mm:ss:mss] Projects: /home/src/projects/project/tsconfig.json,/home/src/projects/project/demos/tsconfig.json -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /home/src/projects/project/app/tsconfig.json ProjectRootPath: undefined:: Result: /home/src/projects/project/tsconfig.json +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* Info seq [hh:mm:ss:mss] After ensureProjectForOpenFiles: Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/app/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (4) - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/demos/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (3) +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: Info seq [hh:mm:ss:mss] FileName: /home/src/projects/project/app/Component-demos.ts ProjectRootPath: undefined -Info seq [hh:mm:ss:mss] Projects: /home/src/projects/project/tsconfig.json,/home/src/projects/project/demos/tsconfig.json +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* Info seq [hh:mm:ss:mss] got projects updated in background /home/src/projects/project/app/Component-demos.ts Info seq [hh:mm:ss:mss] event: { @@ -696,60 +374,11 @@ Info seq [hh:mm:ss:mss] event: } After running Timeout callback:: count: 0 -PolledWatches:: -/home/src/projects/node_modules: *new* - {"pollingInterval":500} -/home/src/projects/node_modules/@types: - {"pollingInterval":500} -/home/src/projects/project/app/node_modules/@types: - {"pollingInterval":500} -/home/src/projects/project/demos/node_modules/@types: - {"pollingInterval":500} -/home/src/projects/project/node_modules: *new* - {"pollingInterval":500} -/home/src/projects/project/node_modules/@types: - {"pollingInterval":500} - -FsWatches:: -/a/lib/lib.d.ts: - {} -/home/src/projects/project/app/Component.ts: - {} -/home/src/projects/project/app/tsconfig.json: - {} -/home/src/projects/project/demos/helpers.ts: - {} -/home/src/projects/project/demos/tsconfig.json: - {} -/home/src/projects/project/tsconfig.json: - {} - -FsWatchesRecursive:: -/home/src/projects/project: - {} -/home/src/projects/project/app: - {} -/home/src/projects/project/demos: - {} - -Projects:: -/home/src/projects/project/app/tsconfig.json (Configured) - projectStateVersion: 1 - projectProgramVersion: 1 -/home/src/projects/project/demos/tsconfig.json (Configured) *changed* - projectStateVersion: 1 - projectProgramVersion: 1 - noOpenRef: true *changed* -/home/src/projects/project/tsconfig.json (Configured) *changed* - projectStateVersion: 2 - projectProgramVersion: 2 *changed* - dirty: false *changed* - Info seq [hh:mm:ss:mss] File: /home/src/projects/project/app/Component-demos.ts: getDefaultProjectForFile: - /home/src/projects/project/tsconfig.json + /dev/null/inferredProject1* findDefaultConfiguredProject: - /home/src/projects/project/tsconfig.json + undefined Before request Info seq [hh:mm:ss:mss] request: @@ -864,48 +493,38 @@ Info seq [hh:mm:ss:mss] event: } } Info seq [hh:mm:ss:mss] `remove Project:: -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/demos/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (3) +Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/app/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (2) /a/lib/lib.d.ts - /home/src/projects/project/demos/helpers.ts - /home/src/projects/project/app/Component-demos.ts + /home/src/projects/project/app/Component.ts ../../../../../a/lib/lib.d.ts Default library for target 'es5' - helpers.ts + Component.ts Matched by include pattern '**/*' in 'tsconfig.json' - Imported via 'demos/helpers' from file '../app/Component-demos.ts' - ../app/Component-demos.ts - Matched by include pattern '../app/**/*-demos.*' in 'tsconfig.json' Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/project/demos 1 undefined Config: /home/src/projects/project/demos/tsconfig.json WatchType: Wild card directory -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/project/demos 1 undefined Config: /home/src/projects/project/demos/tsconfig.json WatchType: Wild card directory -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/project/app 1 undefined Config: /home/src/projects/project/demos/tsconfig.json WatchType: Wild card directory -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/project/app 1 undefined Config: /home/src/projects/project/demos/tsconfig.json WatchType: Wild card directory -Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /home/src/projects/project/demos/tsconfig.json 2000 undefined Project: /home/src/projects/project/tsconfig.json WatchType: Config file -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/project/demos/node_modules/@types 1 undefined Project: /home/src/projects/project/demos/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/project/demos/node_modules/@types 1 undefined Project: /home/src/projects/project/demos/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/project/node_modules/@types 1 undefined Project: /home/src/projects/project/demos/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/project/node_modules/@types 1 undefined Project: /home/src/projects/project/demos/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/node_modules/@types 1 undefined Project: /home/src/projects/project/demos/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/node_modules/@types 1 undefined Project: /home/src/projects/project/demos/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/app/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/project/app 1 undefined Config: /home/src/projects/project/app/tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/project/app 1 undefined Config: /home/src/projects/project/app/tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/project/app/node_modules/@types 1 undefined Project: /home/src/projects/project/app/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/project/app/node_modules/@types 1 undefined Project: /home/src/projects/project/app/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/project/node_modules/@types 1 undefined Project: /home/src/projects/project/app/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/project/node_modules/@types 1 undefined Project: /home/src/projects/project/app/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/node_modules/@types 1 undefined Project: /home/src/projects/project/app/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/node_modules/@types 1 undefined Project: /home/src/projects/project/app/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /home/src/projects/project/app/Component.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Project '/home/src/projects/random/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (4) - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/home/src/projects/random/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: Info seq [hh:mm:ss:mss] FileName: /home/src/projects/project/app/Component-demos.ts ProjectRootPath: undefined -Info seq [hh:mm:ss:mss] Projects: /home/src/projects/project/tsconfig.json +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* Info seq [hh:mm:ss:mss] FileName: /home/src/projects/random/random.ts ProjectRootPath: undefined Info seq [hh:mm:ss:mss] Projects: /home/src/projects/random/tsconfig.json Info seq [hh:mm:ss:mss] response: @@ -926,8 +545,14 @@ PolledWatches:: {"pollingInterval":500} /home/src/projects/node_modules/@types: {"pollingInterval":500} +/home/src/projects/project/app/jsconfig.json: + {"pollingInterval":2000} +/home/src/projects/project/app/node_modules: + {"pollingInterval":500} /home/src/projects/project/app/node_modules/@types: {"pollingInterval":500} +/home/src/projects/project/jsconfig.json: + {"pollingInterval":2000} /home/src/projects/project/node_modules: {"pollingInterval":500} /home/src/projects/project/node_modules/@types: @@ -935,52 +560,37 @@ PolledWatches:: /home/src/projects/random/node_modules/@types: *new* {"pollingInterval":500} -PolledWatches *deleted*:: -/home/src/projects/project/demos/node_modules/@types: - {"pollingInterval":500} - FsWatches:: /a/lib/lib.d.ts: {} -/home/src/projects/project/app/Component.ts: - {} /home/src/projects/project/app/tsconfig.json: {} -/home/src/projects/project/demos/helpers.ts: - {} /home/src/projects/project/tsconfig.json: {} /home/src/projects/random/tsconfig.json: *new* {} FsWatches *deleted*:: -/home/src/projects/project/demos/tsconfig.json: +/home/src/projects/project/app/Component.ts: {} FsWatchesRecursive:: -/home/src/projects/project: - {} -/home/src/projects/project/app: - {} /home/src/projects/random: *new* {} FsWatchesRecursive *deleted*:: -/home/src/projects/project/demos: +/home/src/projects/project/app: {} Projects:: -/home/src/projects/project/app/tsconfig.json (Configured) +/dev/null/inferredProject1* (Inferred) projectStateVersion: 1 projectProgramVersion: 1 -/home/src/projects/project/demos/tsconfig.json (Configured) *deleted* +/home/src/projects/project/app/tsconfig.json (Configured) *deleted* projectStateVersion: 1 projectProgramVersion: 1 isClosed: true *changed* noOpenRef: true -/home/src/projects/project/tsconfig.json (Configured) - projectStateVersion: 2 - projectProgramVersion: 2 /home/src/projects/random/tsconfig.json (Configured) *new* projectStateVersion: 1 projectProgramVersion: 1 @@ -988,26 +598,18 @@ Projects:: ScriptInfos:: /a/lib/lib.d.ts *changed* version: Text-1 - containingProjects: 3 *changed* - /home/src/projects/project/app/tsconfig.json - /home/src/projects/project/tsconfig.json + containingProjects: 2 *changed* + /dev/null/inferredProject1* /home/src/projects/random/tsconfig.json *new* - /home/src/projects/project/demos/tsconfig.json *deleted* -/home/src/projects/project/app/Component-demos.ts (Open) *changed* + /home/src/projects/project/app/tsconfig.json *deleted* +/home/src/projects/project/app/Component-demos.ts (Open) version: SVC-1-0 - containingProjects: 1 *changed* - /home/src/projects/project/tsconfig.json *default* - /home/src/projects/project/demos/tsconfig.json *deleted* -/home/src/projects/project/app/Component.ts - version: Text-1 - containingProjects: 2 - /home/src/projects/project/app/tsconfig.json - /home/src/projects/project/tsconfig.json -/home/src/projects/project/demos/helpers.ts *changed* + containingProjects: 1 + /dev/null/inferredProject1* *default* +/home/src/projects/project/app/Component.ts *deleted* version: Text-1 - containingProjects: 1 *changed* - /home/src/projects/project/tsconfig.json - /home/src/projects/project/demos/tsconfig.json *deleted* + containingProjects: 0 *changed* + /home/src/projects/project/app/tsconfig.json *deleted* /home/src/projects/random/random.ts (Open) *new* version: SVC-1-0 containingProjects: 1 @@ -1025,21 +627,17 @@ Info seq [hh:mm:ss:mss] request: "type": "request" } Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/projects/random/random.ts 500 undefined WatchType: Closed Script info -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/app/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Project '/home/src/projects/random/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (4) - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/home/src/projects/random/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: Info seq [hh:mm:ss:mss] FileName: /home/src/projects/project/app/Component-demos.ts ProjectRootPath: undefined -Info seq [hh:mm:ss:mss] Projects: /home/src/projects/project/tsconfig.json +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* Info seq [hh:mm:ss:mss] response: { "seq": 0, @@ -1055,8 +653,14 @@ PolledWatches:: {"pollingInterval":500} /home/src/projects/node_modules/@types: {"pollingInterval":500} +/home/src/projects/project/app/jsconfig.json: + {"pollingInterval":2000} +/home/src/projects/project/app/node_modules: + {"pollingInterval":500} /home/src/projects/project/app/node_modules/@types: {"pollingInterval":500} +/home/src/projects/project/jsconfig.json: + {"pollingInterval":2000} /home/src/projects/project/node_modules: {"pollingInterval":500} /home/src/projects/project/node_modules/@types: @@ -1067,12 +671,8 @@ PolledWatches:: FsWatches:: /a/lib/lib.d.ts: {} -/home/src/projects/project/app/Component.ts: - {} /home/src/projects/project/app/tsconfig.json: {} -/home/src/projects/project/demos/helpers.ts: - {} /home/src/projects/project/tsconfig.json: {} /home/src/projects/random/random.ts: *new* @@ -1081,20 +681,13 @@ FsWatches:: {} FsWatchesRecursive:: -/home/src/projects/project: - {} -/home/src/projects/project/app: - {} /home/src/projects/random: {} Projects:: -/home/src/projects/project/app/tsconfig.json (Configured) +/dev/null/inferredProject1* (Inferred) projectStateVersion: 1 projectProgramVersion: 1 -/home/src/projects/project/tsconfig.json (Configured) - projectStateVersion: 2 - projectProgramVersion: 2 /home/src/projects/random/tsconfig.json (Configured) *changed* projectStateVersion: 1 projectProgramVersion: 1 @@ -1103,23 +696,13 @@ Projects:: ScriptInfos:: /a/lib/lib.d.ts version: Text-1 - containingProjects: 3 - /home/src/projects/project/app/tsconfig.json - /home/src/projects/project/tsconfig.json + containingProjects: 2 + /dev/null/inferredProject1* /home/src/projects/random/tsconfig.json /home/src/projects/project/app/Component-demos.ts (Open) version: SVC-1-0 containingProjects: 1 - /home/src/projects/project/tsconfig.json *default* -/home/src/projects/project/app/Component.ts - version: Text-1 - containingProjects: 2 - /home/src/projects/project/app/tsconfig.json - /home/src/projects/project/tsconfig.json -/home/src/projects/project/demos/helpers.ts - version: Text-1 - containingProjects: 1 - /home/src/projects/project/tsconfig.json + /dev/null/inferredProject1* *default* /home/src/projects/random/random.ts *changed* open: false *changed* version: SVC-1-0 @@ -1128,17 +711,18 @@ ScriptInfos:: Info seq [hh:mm:ss:mss] File: /home/src/projects/project/app/Component-demos.ts: getDefaultProjectForFile: - /home/src/projects/project/tsconfig.json + /dev/null/inferredProject1* findDefaultConfiguredProject: - /home/src/projects/project/tsconfig.json -Info seq [hh:mm:ss:mss] FileWatcher:: Triggered with /home/src/projects/project/tsconfig.json 1:: WatchInfo: /home/src/projects/project/tsconfig.json 2000 undefined Project: /home/src/projects/project/tsconfig.json WatchType: Config file -Info seq [hh:mm:ss:mss] Scheduled: /home/src/projects/project/tsconfig.json + undefined +Info seq [hh:mm:ss:mss] FileWatcher:: Triggered with /home/src/projects/project/tsconfig.json 1:: WatchInfo: /home/src/projects/project/tsconfig.json 2000 undefined WatchType: Config file for the inferred project root Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /home/src/projects/project/app/Component-demos.ts ProjectRootPath: undefined:: Result: /home/src/projects/project/app/tsconfig.json +Info seq [hh:mm:ss:mss] Creating configuration project /home/src/projects/project/app/tsconfig.json +Info seq [hh:mm:ss:mss] Scheduled: /home/src/projects/project/app/tsconfig.json Info seq [hh:mm:ss:mss] Scheduled: *ensureProjectForOpenFiles* -Info seq [hh:mm:ss:mss] Elapsed:: *ms FileWatcher:: Triggered with /home/src/projects/project/tsconfig.json 1:: WatchInfo: /home/src/projects/project/tsconfig.json 2000 undefined Project: /home/src/projects/project/tsconfig.json WatchType: Config file +Info seq [hh:mm:ss:mss] Elapsed:: *ms FileWatcher:: Triggered with /home/src/projects/project/tsconfig.json 1:: WatchInfo: /home/src/projects/project/tsconfig.json 2000 undefined WatchType: Config file for the inferred project root Before running Timeout callback:: count: 2 -3: /home/src/projects/project/tsconfig.json -4: *ensureProjectForOpenFiles* +2: /home/src/projects/project/app/tsconfig.json +3: *ensureProjectForOpenFiles* //// [/home/src/projects/project/tsconfig.json] { "compilerOptions": { @@ -1156,91 +740,64 @@ Before running Timeout callback:: count: 2 Timeout callback:: count: 2 -3: /home/src/projects/project/tsconfig.json *new* -4: *ensureProjectForOpenFiles* *new* +2: /home/src/projects/project/app/tsconfig.json *new* +3: *ensureProjectForOpenFiles* *new* Projects:: -/home/src/projects/project/app/tsconfig.json (Configured) +/dev/null/inferredProject1* (Inferred) projectStateVersion: 1 projectProgramVersion: 1 -/home/src/projects/project/tsconfig.json (Configured) *changed* - projectStateVersion: 3 *changed* - projectProgramVersion: 2 - dirty: true *changed* +/home/src/projects/project/app/tsconfig.json (Configured) *new* + projectStateVersion: 1 + projectProgramVersion: 0 + dirty: true /home/src/projects/random/tsconfig.json (Configured) projectStateVersion: 1 projectProgramVersion: 1 noOpenRef: true -Info seq [hh:mm:ss:mss] Running: /home/src/projects/project/tsconfig.json +Info seq [hh:mm:ss:mss] Running: /home/src/projects/project/app/tsconfig.json Info seq [hh:mm:ss:mss] event: { "seq": 0, "type": "event", "event": "projectLoadingStart", "body": { - "projectName": "/home/src/projects/project/tsconfig.json", - "reason": "Change in config file detected" + "projectName": "/home/src/projects/project/app/tsconfig.json", + "reason": "Change in config file /home/src/projects/project/tsconfig.json detected, Creating possible configured project for /home/src/projects/project/app/Component-demos.ts to open" } } -Info seq [hh:mm:ss:mss] Config: /home/src/projects/project/tsconfig.json : { - "rootNames": [ - "/home/src/projects/project/app/Component-demos.ts", - "/home/src/projects/project/app/Component.ts", - "/home/src/projects/project/demos/helpers.ts" - ], - "options": { - "outDir": "/home/src/projects/project/dist", - "configFilePath": "/home/src/projects/project/tsconfig.json" - }, - "projectReferences": [ - { - "path": "/home/src/projects/project/demos/tsconfig.json", - "originalPath": "./demos/tsconfig.json" - }, - { - "path": "/home/src/projects/project/app/tsconfig.json", - "originalPath": "./app/tsconfig.json" - } - ] -} -Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /home/src/projects/project/tsconfig.json -Info seq [hh:mm:ss:mss] Config: /home/src/projects/project/demos/tsconfig.json : { +Info seq [hh:mm:ss:mss] Config: /home/src/projects/project/app/tsconfig.json : { "rootNames": [ - "/home/src/projects/project/demos/helpers.ts", - "/home/src/projects/project/app/Component-demos.ts" + "/home/src/projects/project/app/Component.ts" ], "options": { "composite": true, - "rootDir": "/home/src/projects/project", - "outDir": "/home/src/projects/project/demos-dist", - "paths": { - "demos/*": [ - "./*" - ] - }, - "pathsBasePath": "/home/src/projects/project/demos", - "configFilePath": "/home/src/projects/project/demos/tsconfig.json" + "outDir": "/home/src/projects/project/app-dist", + "configFilePath": "/home/src/projects/project/app/tsconfig.json" } } -Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/projects/project/demos/tsconfig.json 2000 undefined Project: /home/src/projects/project/tsconfig.json WatchType: Config file -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/demos 1 undefined Config: /home/src/projects/project/demos/tsconfig.json WatchType: Wild card directory -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/demos 1 undefined Config: /home/src/projects/project/demos/tsconfig.json WatchType: Wild card directory -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/app 1 undefined Config: /home/src/projects/project/demos/tsconfig.json WatchType: Wild card directory -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/app 1 undefined Config: /home/src/projects/project/demos/tsconfig.json WatchType: Wild card directory -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/project/app 1 undefined Project: /home/src/projects/project/tsconfig.json WatchType: Failed Lookup Locations -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/project/app 1 undefined Project: /home/src/projects/project/tsconfig.json WatchType: Failed Lookup Locations -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/project/node_modules 1 undefined Project: /home/src/projects/project/tsconfig.json WatchType: Failed Lookup Locations -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/project/node_modules 1 undefined Project: /home/src/projects/project/tsconfig.json WatchType: Failed Lookup Locations -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/node_modules 1 undefined Project: /home/src/projects/project/tsconfig.json WatchType: Failed Lookup Locations -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/node_modules 1 undefined Project: /home/src/projects/project/tsconfig.json WatchType: Failed Lookup Locations -Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /home/src/projects/project/tsconfig.json projectStateVersion: 3 projectProgramVersion: 2 structureChanged: true structureIsReused:: Not Elapsed:: *ms -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (4) +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/app 1 undefined Config: /home/src/projects/project/app/tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/app 1 undefined Config: /home/src/projects/project/app/tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/projects/project/app/Component.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /home/src/projects/project/app/tsconfig.json +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/app/node_modules/@types 1 undefined Project: /home/src/projects/project/app/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/app/node_modules/@types 1 undefined Project: /home/src/projects/project/app/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/node_modules/@types 1 undefined Project: /home/src/projects/project/app/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/node_modules/@types 1 undefined Project: /home/src/projects/project/app/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/node_modules/@types 1 undefined Project: /home/src/projects/project/app/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/node_modules/@types 1 undefined Project: /home/src/projects/project/app/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /home/src/projects/project/app/tsconfig.json projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/app/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (2) /a/lib/lib.d.ts Text-1 "/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }" - /home/src/projects/project/demos/helpers.ts Text-1 "export const foo = 1;\n" - /home/src/projects/project/app/Component-demos.ts SVC-1-0 "import * as helpers from 'demos/helpers';\nexport const demo = () => {\n helpers;\n}\n" - /home/src/projects/project/app/Component.ts Text-1 "export const Component = () => {}\n" + /home/src/projects/project/app/Component.ts Text-2 "export const Component = () => {}\n" + + + ../../../../../a/lib/lib.d.ts + Default library for target 'es5' + Component.ts + Matched by include pattern '**/*' in 'tsconfig.json' Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] event: @@ -1249,7 +806,7 @@ Info seq [hh:mm:ss:mss] event: "type": "event", "event": "projectLoadingFinish", "body": { - "projectName": "/home/src/projects/project/tsconfig.json" + "projectName": "/home/src/projects/project/app/tsconfig.json" } } Info seq [hh:mm:ss:mss] event: @@ -1258,105 +815,44 @@ Info seq [hh:mm:ss:mss] event: "type": "event", "event": "configFileDiag", "body": { - "triggerFile": "/home/src/projects/project/tsconfig.json", - "configFile": "/home/src/projects/project/tsconfig.json", + "triggerFile": "/home/src/projects/project/app/tsconfig.json", + "configFile": "/home/src/projects/project/app/tsconfig.json", "diagnostics": [] } } Info seq [hh:mm:ss:mss] Running: *ensureProjectForOpenFiles* Info seq [hh:mm:ss:mss] Before ensureProjectForOpenFiles: -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/app/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Project '/home/src/projects/random/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (4) +Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/app/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/home/src/projects/random/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: Info seq [hh:mm:ss:mss] FileName: /home/src/projects/project/app/Component-demos.ts ProjectRootPath: undefined -Info seq [hh:mm:ss:mss] Projects: /home/src/projects/project/tsconfig.json -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /home/src/projects/project/app/tsconfig.json ProjectRootPath: undefined:: Result: /home/src/projects/project/tsconfig.json -Info seq [hh:mm:ss:mss] Creating configuration project /home/src/projects/project/demos/tsconfig.json -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "projectLoadingStart", - "body": { - "projectName": "/home/src/projects/project/demos/tsconfig.json", - "reason": "Creating project referenced in solution /home/src/projects/project/tsconfig.json to find possible configured project for /home/src/projects/project/app/Component-demos.ts to open" - } - } -Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /home/src/projects/project/demos/tsconfig.json -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/demos/node_modules/@types 1 undefined Project: /home/src/projects/project/demos/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/demos/node_modules/@types 1 undefined Project: /home/src/projects/project/demos/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/node_modules/@types 1 undefined Project: /home/src/projects/project/demos/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/node_modules/@types 1 undefined Project: /home/src/projects/project/demos/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/node_modules/@types 1 undefined Project: /home/src/projects/project/demos/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/node_modules/@types 1 undefined Project: /home/src/projects/project/demos/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /home/src/projects/project/demos/tsconfig.json projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/demos/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (3) - /a/lib/lib.d.ts Text-1 "/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }" - /home/src/projects/project/demos/helpers.ts Text-1 "export const foo = 1;\n" - /home/src/projects/project/app/Component-demos.ts SVC-1-0 "import * as helpers from 'demos/helpers';\nexport const demo = () => {\n helpers;\n}\n" - - - ../../../../../a/lib/lib.d.ts - Default library for target 'es5' - helpers.ts - Matched by include pattern '**/*' in 'tsconfig.json' - Imported via 'demos/helpers' from file '../app/Component-demos.ts' - ../app/Component-demos.ts - Matched by include pattern '../app/**/*-demos.*' in 'tsconfig.json' - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "projectLoadingFinish", - "body": { - "projectName": "/home/src/projects/project/demos/tsconfig.json" - } - } -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "configFileDiag", - "body": { - "triggerFile": "/home/src/projects/project/app/Component-demos.ts", - "configFile": "/home/src/projects/project/demos/tsconfig.json", - "diagnostics": [] - } - } -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /home/src/projects/project/demos/tsconfig.json ProjectRootPath: undefined:: Result: /home/src/projects/project/tsconfig.json +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* Info seq [hh:mm:ss:mss] After ensureProjectForOpenFiles: -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/app/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Project '/home/src/projects/random/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (4) - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/home/src/projects/random/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/app/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/demos/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (3) +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: Info seq [hh:mm:ss:mss] FileName: /home/src/projects/project/app/Component-demos.ts ProjectRootPath: undefined -Info seq [hh:mm:ss:mss] Projects: /home/src/projects/project/tsconfig.json,/home/src/projects/project/demos/tsconfig.json +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* Info seq [hh:mm:ss:mss] got projects updated in background /home/src/projects/project/app/Component-demos.ts Info seq [hh:mm:ss:mss] event: { @@ -1372,34 +868,32 @@ Info seq [hh:mm:ss:mss] event: After running Timeout callback:: count: 0 PolledWatches:: +/home/src/projects/node_modules: + {"pollingInterval":500} /home/src/projects/node_modules/@types: {"pollingInterval":500} +/home/src/projects/project/app/jsconfig.json: + {"pollingInterval":2000} +/home/src/projects/project/app/node_modules: + {"pollingInterval":500} /home/src/projects/project/app/node_modules/@types: {"pollingInterval":500} -/home/src/projects/project/demos/node_modules/@types: *new* +/home/src/projects/project/jsconfig.json: + {"pollingInterval":2000} +/home/src/projects/project/node_modules: {"pollingInterval":500} /home/src/projects/project/node_modules/@types: {"pollingInterval":500} /home/src/projects/random/node_modules/@types: {"pollingInterval":500} -PolledWatches *deleted*:: -/home/src/projects/node_modules: - {"pollingInterval":500} -/home/src/projects/project/node_modules: - {"pollingInterval":500} - FsWatches:: /a/lib/lib.d.ts: {} -/home/src/projects/project/app/Component.ts: +/home/src/projects/project/app/Component.ts: *new* {} /home/src/projects/project/app/tsconfig.json: {} -/home/src/projects/project/demos/helpers.ts: - {} -/home/src/projects/project/demos/tsconfig.json: *new* - {} /home/src/projects/project/tsconfig.json: {} /home/src/projects/random/random.ts: @@ -1408,26 +902,20 @@ FsWatches:: {} FsWatchesRecursive:: -/home/src/projects/project: - {} -/home/src/projects/project/app: - {} -/home/src/projects/project/demos: *new* +/home/src/projects/project/app: *new* {} /home/src/projects/random: {} Projects:: -/home/src/projects/project/app/tsconfig.json (Configured) +/dev/null/inferredProject1* (Inferred) projectStateVersion: 1 projectProgramVersion: 1 -/home/src/projects/project/demos/tsconfig.json (Configured) *new* +/home/src/projects/project/app/tsconfig.json (Configured) *changed* projectStateVersion: 1 - projectProgramVersion: 1 -/home/src/projects/project/tsconfig.json (Configured) *changed* - projectStateVersion: 3 - projectProgramVersion: 3 *changed* + projectProgramVersion: 1 *changed* dirty: false *changed* + noOpenRef: true *changed* /home/src/projects/random/tsconfig.json (Configured) projectStateVersion: 1 projectProgramVersion: 1 @@ -1436,26 +924,18 @@ Projects:: ScriptInfos:: /a/lib/lib.d.ts *changed* version: Text-1 - containingProjects: 4 *changed* - /home/src/projects/project/app/tsconfig.json - /home/src/projects/project/tsconfig.json + containingProjects: 3 *changed* + /dev/null/inferredProject1* /home/src/projects/random/tsconfig.json - /home/src/projects/project/demos/tsconfig.json *new* -/home/src/projects/project/app/Component-demos.ts (Open) *changed* + /home/src/projects/project/app/tsconfig.json *new* +/home/src/projects/project/app/Component-demos.ts (Open) version: SVC-1-0 - containingProjects: 2 *changed* - /home/src/projects/project/tsconfig.json - /home/src/projects/project/demos/tsconfig.json *default* *new* -/home/src/projects/project/app/Component.ts - version: Text-1 - containingProjects: 2 + containingProjects: 1 + /dev/null/inferredProject1* *default* +/home/src/projects/project/app/Component.ts *new* + version: Text-2 + containingProjects: 1 /home/src/projects/project/app/tsconfig.json - /home/src/projects/project/tsconfig.json -/home/src/projects/project/demos/helpers.ts *changed* - version: Text-1 - containingProjects: 2 *changed* - /home/src/projects/project/tsconfig.json - /home/src/projects/project/demos/tsconfig.json *new* /home/src/projects/random/random.ts version: SVC-1-0 containingProjects: 1 @@ -1463,6 +943,6 @@ ScriptInfos:: Info seq [hh:mm:ss:mss] File: /home/src/projects/project/app/Component-demos.ts: getDefaultProjectForFile: - /home/src/projects/project/demos/tsconfig.json + /dev/null/inferredProject1* findDefaultConfiguredProject: - /home/src/projects/project/demos/tsconfig.json \ No newline at end of file + undefined \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/projectReferences/when-file-is-not-part-of-first-config-tree-found-solutionConfig-without-reference-to-demo.js b/tests/baselines/reference/tsserver/projectReferences/when-file-is-not-part-of-first-config-tree-found-solutionConfig-without-reference-to-demo.js index 27fd7faaffac9..02ced48851345 100644 --- a/tests/baselines/reference/tsserver/projectReferences/when-file-is-not-part-of-first-config-tree-found-solutionConfig-without-reference-to-demo.js +++ b/tests/baselines/reference/tsserver/projectReferences/when-file-is-not-part-of-first-config-tree-found-solutionConfig-without-reference-to-demo.js @@ -203,271 +203,46 @@ Info seq [hh:mm:ss:mss] event: "diagnostics": [] } } -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /home/src/projects/project/app/tsconfig.json ProjectRootPath: undefined:: Result: /home/src/projects/project/tsconfig.json -Info seq [hh:mm:ss:mss] Creating configuration project /home/src/projects/project/tsconfig.json -Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/projects/project/tsconfig.json 2000 undefined Project: /home/src/projects/project/tsconfig.json WatchType: Config file -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "projectLoadingStart", - "body": { - "projectName": "/home/src/projects/project/tsconfig.json", - "reason": "Creating possible configured project for /home/src/projects/project/app/Component-demos.ts to open" - } - } -Info seq [hh:mm:ss:mss] Config: /home/src/projects/project/tsconfig.json : { - "rootNames": [ - "/home/src/projects/project/app/Component-demos.ts", - "/home/src/projects/project/app/Component.ts", - "/home/src/projects/project/demos/helpers.ts" - ], - "options": { - "outDir": "/home/src/projects/project/dist", - "configFilePath": "/home/src/projects/project/tsconfig.json" - }, - "projectReferences": [ - { - "path": "/home/src/projects/project/demos/tsconfig.json", - "originalPath": "./demos/tsconfig.json" - }, - { - "path": "/home/src/projects/project/app/tsconfig.json", - "originalPath": "./app/tsconfig.json" - } - ] -} -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project 1 undefined Config: /home/src/projects/project/tsconfig.json WatchType: Wild card directory -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project 1 undefined Config: /home/src/projects/project/tsconfig.json WatchType: Wild card directory -Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/projects/project/demos/helpers.ts 500 undefined WatchType: Closed Script info -Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /home/src/projects/project/tsconfig.json -Info seq [hh:mm:ss:mss] Config: /home/src/projects/project/demos/tsconfig.json : { - "rootNames": [ - "/home/src/projects/project/demos/helpers.ts", - "/home/src/projects/project/app/Component-demos.ts" - ], - "options": { - "composite": true, - "rootDir": "/home/src/projects/project", - "outDir": "/home/src/projects/project/demos-dist", - "paths": { - "demos/*": [ - "./*" - ] - }, - "pathsBasePath": "/home/src/projects/project/demos", - "configFilePath": "/home/src/projects/project/demos/tsconfig.json" - } -} -Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/projects/project/demos/tsconfig.json 2000 undefined Project: /home/src/projects/project/tsconfig.json WatchType: Config file -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/demos 1 undefined Config: /home/src/projects/project/demos/tsconfig.json WatchType: Wild card directory -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/demos 1 undefined Config: /home/src/projects/project/demos/tsconfig.json WatchType: Wild card directory -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/app 1 undefined Config: /home/src/projects/project/demos/tsconfig.json WatchType: Wild card directory -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/app 1 undefined Config: /home/src/projects/project/demos/tsconfig.json WatchType: Wild card directory -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/node_modules/@types 1 undefined Project: /home/src/projects/project/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/node_modules/@types 1 undefined Project: /home/src/projects/project/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/node_modules/@types 1 undefined Project: /home/src/projects/project/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/node_modules/@types 1 undefined Project: /home/src/projects/project/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /home/src/projects/project/tsconfig.json projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (4) - /a/lib/lib.d.ts Text-1 "/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }" - /home/src/projects/project/demos/helpers.ts Text-1 "export const foo = 1;\n" - /home/src/projects/project/app/Component-demos.ts SVC-1-0 "import * as helpers from 'demos/helpers';\nexport const demo = () => {\n helpers;\n}\n" - /home/src/projects/project/app/Component.ts Text-1 "export const Component = () => {}\n" - - - ../../../../a/lib/lib.d.ts - Default library for target 'es5' - demos/helpers.ts - Imported via 'demos/helpers' from file 'app/Component-demos.ts' - Matched by default include pattern '**/*' - app/Component-demos.ts - Matched by default include pattern '**/*' - app/Component.ts - Matched by default include pattern '**/*' - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "projectLoadingFinish", - "body": { - "projectName": "/home/src/projects/project/tsconfig.json" - } - } -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "telemetry", - "body": { - "telemetryEventName": "projectInfo", - "payload": { - "projectId": "1097a5f82e8323ba7aba7567ec06402f7ad4ea74abce44ec5efd223ac77ff169", - "fileStats": { - "js": 0, - "jsSize": 0, - "jsx": 0, - "jsxSize": 0, - "ts": 3, - "tsSize": 141, - "tsx": 0, - "tsxSize": 0, - "dts": 1, - "dtsSize": 334, - "deferred": 0, - "deferredSize": 0 - }, - "compilerOptions": { - "outDir": "" - }, - "typeAcquisition": { - "enable": false, - "include": false, - "exclude": false - }, - "extends": false, - "files": false, - "include": false, - "exclude": false, - "compileOnSave": false, - "configFileName": "tsconfig.json", - "projectType": "configured", - "languageServiceEnabled": true, - "version": "FakeVersion" - } - } - } -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "configFileDiag", - "body": { - "triggerFile": "/home/src/projects/project/app/Component-demos.ts", - "configFile": "/home/src/projects/project/tsconfig.json", - "diagnostics": [] - } - } -Info seq [hh:mm:ss:mss] Creating configuration project /home/src/projects/project/demos/tsconfig.json -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "projectLoadingStart", - "body": { - "projectName": "/home/src/projects/project/demos/tsconfig.json", - "reason": "Creating project referenced in solution /home/src/projects/project/tsconfig.json to find possible configured project for /home/src/projects/project/app/Component-demos.ts to open" - } - } -Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /home/src/projects/project/demos/tsconfig.json -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/demos/node_modules/@types 1 undefined Project: /home/src/projects/project/demos/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/demos/node_modules/@types 1 undefined Project: /home/src/projects/project/demos/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/node_modules/@types 1 undefined Project: /home/src/projects/project/demos/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/node_modules/@types 1 undefined Project: /home/src/projects/project/demos/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/node_modules/@types 1 undefined Project: /home/src/projects/project/demos/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/node_modules/@types 1 undefined Project: /home/src/projects/project/demos/tsconfig.json WatchType: Type roots -Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /home/src/projects/project/demos/tsconfig.json projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/demos/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (3) +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/projects/project/app/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/projects/project/tsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/projects/project/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/app/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/app/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Failed Lookup Locations +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/app/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/app/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (2) /a/lib/lib.d.ts Text-1 "/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }" - /home/src/projects/project/demos/helpers.ts Text-1 "export const foo = 1;\n" /home/src/projects/project/app/Component-demos.ts SVC-1-0 "import * as helpers from 'demos/helpers';\nexport const demo = () => {\n helpers;\n}\n" ../../../../../a/lib/lib.d.ts Default library for target 'es5' - helpers.ts - Matched by include pattern '**/*' in 'tsconfig.json' - Imported via 'demos/helpers' from file '../app/Component-demos.ts' - ../app/Component-demos.ts - Matched by include pattern '../app/**/*-demos.*' in 'tsconfig.json' + Component-demos.ts + Root file specified for compilation Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "projectLoadingFinish", - "body": { - "projectName": "/home/src/projects/project/demos/tsconfig.json" - } - } -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "telemetry", - "body": { - "telemetryEventName": "projectInfo", - "payload": { - "projectId": "528692a1575f61fd3bf7069493cc100a7cad975f6cd24c47b7a63b99928a8171", - "fileStats": { - "js": 0, - "jsSize": 0, - "jsx": 0, - "jsxSize": 0, - "ts": 2, - "tsSize": 107, - "tsx": 0, - "tsxSize": 0, - "dts": 1, - "dtsSize": 334, - "deferred": 0, - "deferredSize": 0 - }, - "compilerOptions": { - "composite": true, - "rootDir": "", - "outDir": "", - "paths": "" - }, - "typeAcquisition": { - "enable": false, - "include": false, - "exclude": false - }, - "extends": false, - "files": false, - "include": true, - "exclude": false, - "compileOnSave": false, - "configFileName": "tsconfig.json", - "projectType": "configured", - "languageServiceEnabled": true, - "version": "FakeVersion" - } - } - } -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "configFileDiag", - "body": { - "triggerFile": "/home/src/projects/project/app/Component-demos.ts", - "configFile": "/home/src/projects/project/demos/tsconfig.json", - "diagnostics": [] - } - } -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /home/src/projects/project/demos/tsconfig.json ProjectRootPath: undefined:: Result: /home/src/projects/project/tsconfig.json Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/app/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (4) - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/demos/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (3) +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: Info seq [hh:mm:ss:mss] FileName: /home/src/projects/project/app/Component-demos.ts ProjectRootPath: undefined -Info seq [hh:mm:ss:mss] Projects: /home/src/projects/project/tsconfig.json,/home/src/projects/project/demos/tsconfig.json +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* Info seq [hh:mm:ss:mss] response: { "seq": 0, @@ -482,11 +257,19 @@ Info seq [hh:mm:ss:mss] response: After request PolledWatches:: +/home/src/projects/node_modules: *new* + {"pollingInterval":500} /home/src/projects/node_modules/@types: *new* {"pollingInterval":500} +/home/src/projects/project/app/jsconfig.json: *new* + {"pollingInterval":2000} +/home/src/projects/project/app/node_modules: *new* + {"pollingInterval":500} /home/src/projects/project/app/node_modules/@types: *new* {"pollingInterval":500} -/home/src/projects/project/demos/node_modules/@types: *new* +/home/src/projects/project/jsconfig.json: *new* + {"pollingInterval":2000} +/home/src/projects/project/node_modules: *new* {"pollingInterval":500} /home/src/projects/project/node_modules/@types: *new* {"pollingInterval":500} @@ -498,63 +281,43 @@ FsWatches:: {} /home/src/projects/project/app/tsconfig.json: *new* {} -/home/src/projects/project/demos/helpers.ts: *new* - {} -/home/src/projects/project/demos/tsconfig.json: *new* - {} /home/src/projects/project/tsconfig.json: *new* {} FsWatchesRecursive:: -/home/src/projects/project: *new* - {} /home/src/projects/project/app: *new* {} -/home/src/projects/project/demos: *new* - {} Projects:: -/home/src/projects/project/app/tsconfig.json (Configured) *new* - projectStateVersion: 1 - projectProgramVersion: 1 -/home/src/projects/project/demos/tsconfig.json (Configured) *new* +/dev/null/inferredProject1* (Inferred) *new* projectStateVersion: 1 projectProgramVersion: 1 -/home/src/projects/project/tsconfig.json (Configured) *new* +/home/src/projects/project/app/tsconfig.json (Configured) *new* projectStateVersion: 1 projectProgramVersion: 1 + noOpenRef: true ScriptInfos:: /a/lib/lib.d.ts *new* version: Text-1 - containingProjects: 3 + containingProjects: 2 /home/src/projects/project/app/tsconfig.json - /home/src/projects/project/tsconfig.json - /home/src/projects/project/demos/tsconfig.json + /dev/null/inferredProject1* /home/src/projects/project/app/Component-demos.ts (Open) *new* version: SVC-1-0 - containingProjects: 2 - /home/src/projects/project/tsconfig.json - /home/src/projects/project/demos/tsconfig.json *default* + containingProjects: 1 + /dev/null/inferredProject1* *default* /home/src/projects/project/app/Component.ts *new* version: Text-1 - containingProjects: 2 + containingProjects: 1 /home/src/projects/project/app/tsconfig.json - /home/src/projects/project/tsconfig.json -/home/src/projects/project/demos/helpers.ts *new* - version: Text-1 - containingProjects: 2 - /home/src/projects/project/tsconfig.json - /home/src/projects/project/demos/tsconfig.json -Info seq [hh:mm:ss:mss] FileWatcher:: Triggered with /home/src/projects/project/tsconfig.json 1:: WatchInfo: /home/src/projects/project/tsconfig.json 2000 undefined Project: /home/src/projects/project/tsconfig.json WatchType: Config file -Info seq [hh:mm:ss:mss] Scheduled: /home/src/projects/project/tsconfig.json +Info seq [hh:mm:ss:mss] FileWatcher:: Triggered with /home/src/projects/project/tsconfig.json 1:: WatchInfo: /home/src/projects/project/tsconfig.json 2000 undefined WatchType: Config file for the inferred project root Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /home/src/projects/project/app/Component-demos.ts ProjectRootPath: undefined:: Result: /home/src/projects/project/app/tsconfig.json Info seq [hh:mm:ss:mss] Scheduled: *ensureProjectForOpenFiles* -Info seq [hh:mm:ss:mss] Elapsed:: *ms FileWatcher:: Triggered with /home/src/projects/project/tsconfig.json 1:: WatchInfo: /home/src/projects/project/tsconfig.json 2000 undefined Project: /home/src/projects/project/tsconfig.json WatchType: Config file -Before running Timeout callback:: count: 2 -1: /home/src/projects/project/tsconfig.json -2: *ensureProjectForOpenFiles* +Info seq [hh:mm:ss:mss] Elapsed:: *ms FileWatcher:: Triggered with /home/src/projects/project/tsconfig.json 1:: WatchInfo: /home/src/projects/project/tsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Before running Timeout callback:: count: 1 +1: *ensureProjectForOpenFiles* //// [/home/src/projects/project/tsconfig.json] { "compilerOptions": { @@ -568,120 +331,35 @@ Before running Timeout callback:: count: 2 } -Timeout callback:: count: 2 -1: /home/src/projects/project/tsconfig.json *new* -2: *ensureProjectForOpenFiles* *new* - -Projects:: -/home/src/projects/project/app/tsconfig.json (Configured) - projectStateVersion: 1 - projectProgramVersion: 1 -/home/src/projects/project/demos/tsconfig.json (Configured) - projectStateVersion: 1 - projectProgramVersion: 1 -/home/src/projects/project/tsconfig.json (Configured) *changed* - projectStateVersion: 2 *changed* - projectProgramVersion: 1 - dirty: true *changed* - -Info seq [hh:mm:ss:mss] Running: /home/src/projects/project/tsconfig.json -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "projectLoadingStart", - "body": { - "projectName": "/home/src/projects/project/tsconfig.json", - "reason": "Change in config file detected" - } - } -Info seq [hh:mm:ss:mss] Config: /home/src/projects/project/tsconfig.json : { - "rootNames": [ - "/home/src/projects/project/app/Component-demos.ts", - "/home/src/projects/project/app/Component.ts", - "/home/src/projects/project/demos/helpers.ts" - ], - "options": { - "outDir": "/home/src/projects/project/dist", - "configFilePath": "/home/src/projects/project/tsconfig.json" - }, - "projectReferences": [ - { - "path": "/home/src/projects/project/app/tsconfig.json", - "originalPath": "./app/tsconfig.json" - } - ] -} -Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /home/src/projects/project/tsconfig.json -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/app 1 undefined Project: /home/src/projects/project/tsconfig.json WatchType: Failed Lookup Locations -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/app 1 undefined Project: /home/src/projects/project/tsconfig.json WatchType: Failed Lookup Locations -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/node_modules 1 undefined Project: /home/src/projects/project/tsconfig.json WatchType: Failed Lookup Locations -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/node_modules 1 undefined Project: /home/src/projects/project/tsconfig.json WatchType: Failed Lookup Locations -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/node_modules 1 undefined Project: /home/src/projects/project/tsconfig.json WatchType: Failed Lookup Locations -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/node_modules 1 undefined Project: /home/src/projects/project/tsconfig.json WatchType: Failed Lookup Locations -Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /home/src/projects/project/tsconfig.json projectStateVersion: 2 projectProgramVersion: 1 structureChanged: true structureIsReused:: Not Elapsed:: *ms -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (4) - /a/lib/lib.d.ts Text-1 "/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }" - /home/src/projects/project/app/Component-demos.ts SVC-1-0 "import * as helpers from 'demos/helpers';\nexport const demo = () => {\n helpers;\n}\n" - /home/src/projects/project/app/Component.ts Text-1 "export const Component = () => {}\n" - /home/src/projects/project/demos/helpers.ts Text-1 "export const foo = 1;\n" +Timeout callback:: count: 1 +1: *ensureProjectForOpenFiles* *new* -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "projectLoadingFinish", - "body": { - "projectName": "/home/src/projects/project/tsconfig.json" - } - } -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "configFileDiag", - "body": { - "triggerFile": "/home/src/projects/project/tsconfig.json", - "configFile": "/home/src/projects/project/tsconfig.json", - "diagnostics": [] - } - } +Host is moving to new time Info seq [hh:mm:ss:mss] Running: *ensureProjectForOpenFiles* Info seq [hh:mm:ss:mss] Before ensureProjectForOpenFiles: Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/app/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (4) - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/demos/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (3) +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: Info seq [hh:mm:ss:mss] FileName: /home/src/projects/project/app/Component-demos.ts ProjectRootPath: undefined -Info seq [hh:mm:ss:mss] Projects: /home/src/projects/project/tsconfig.json,/home/src/projects/project/demos/tsconfig.json -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /home/src/projects/project/app/tsconfig.json ProjectRootPath: undefined:: Result: /home/src/projects/project/tsconfig.json +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* Info seq [hh:mm:ss:mss] After ensureProjectForOpenFiles: Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/app/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (4) - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/demos/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (3) +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: Info seq [hh:mm:ss:mss] FileName: /home/src/projects/project/app/Component-demos.ts ProjectRootPath: undefined -Info seq [hh:mm:ss:mss] Projects: /home/src/projects/project/tsconfig.json,/home/src/projects/project/demos/tsconfig.json +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* Info seq [hh:mm:ss:mss] got projects updated in background /home/src/projects/project/app/Component-demos.ts Info seq [hh:mm:ss:mss] event: { @@ -696,68 +374,17 @@ Info seq [hh:mm:ss:mss] event: } After running Timeout callback:: count: 0 -PolledWatches:: -/home/src/projects/node_modules: *new* - {"pollingInterval":500} -/home/src/projects/node_modules/@types: - {"pollingInterval":500} -/home/src/projects/project/app/node_modules/@types: - {"pollingInterval":500} -/home/src/projects/project/demos/node_modules/@types: - {"pollingInterval":500} -/home/src/projects/project/node_modules: *new* - {"pollingInterval":500} -/home/src/projects/project/node_modules/@types: - {"pollingInterval":500} - -FsWatches:: -/a/lib/lib.d.ts: - {} -/home/src/projects/project/app/Component.ts: - {} -/home/src/projects/project/app/tsconfig.json: - {} -/home/src/projects/project/demos/helpers.ts: - {} -/home/src/projects/project/demos/tsconfig.json: - {} -/home/src/projects/project/tsconfig.json: - {} - -FsWatchesRecursive:: -/home/src/projects/project: - {} -/home/src/projects/project/app: - {} -/home/src/projects/project/demos: - {} - -Projects:: -/home/src/projects/project/app/tsconfig.json (Configured) - projectStateVersion: 1 - projectProgramVersion: 1 -/home/src/projects/project/demos/tsconfig.json (Configured) *changed* - projectStateVersion: 1 - projectProgramVersion: 1 - noOpenRef: true *changed* -/home/src/projects/project/tsconfig.json (Configured) *changed* - projectStateVersion: 2 - projectProgramVersion: 2 *changed* - dirty: false *changed* - Info seq [hh:mm:ss:mss] File: /home/src/projects/project/app/Component-demos.ts: getDefaultProjectForFile: - /home/src/projects/project/tsconfig.json + /dev/null/inferredProject1* findDefaultConfiguredProject: - /home/src/projects/project/tsconfig.json -Info seq [hh:mm:ss:mss] FileWatcher:: Triggered with /home/src/projects/project/tsconfig.json 1:: WatchInfo: /home/src/projects/project/tsconfig.json 2000 undefined Project: /home/src/projects/project/tsconfig.json WatchType: Config file -Info seq [hh:mm:ss:mss] Scheduled: /home/src/projects/project/tsconfig.json + undefined +Info seq [hh:mm:ss:mss] FileWatcher:: Triggered with /home/src/projects/project/tsconfig.json 1:: WatchInfo: /home/src/projects/project/tsconfig.json 2000 undefined WatchType: Config file for the inferred project root Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /home/src/projects/project/app/Component-demos.ts ProjectRootPath: undefined:: Result: /home/src/projects/project/app/tsconfig.json Info seq [hh:mm:ss:mss] Scheduled: *ensureProjectForOpenFiles* -Info seq [hh:mm:ss:mss] Elapsed:: *ms FileWatcher:: Triggered with /home/src/projects/project/tsconfig.json 1:: WatchInfo: /home/src/projects/project/tsconfig.json 2000 undefined Project: /home/src/projects/project/tsconfig.json WatchType: Config file -Before running Timeout callback:: count: 2 -3: /home/src/projects/project/tsconfig.json -4: *ensureProjectForOpenFiles* +Info seq [hh:mm:ss:mss] Elapsed:: *ms FileWatcher:: Triggered with /home/src/projects/project/tsconfig.json 1:: WatchInfo: /home/src/projects/project/tsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Before running Timeout callback:: count: 1 +2: *ensureProjectForOpenFiles* //// [/home/src/projects/project/tsconfig.json] { "compilerOptions": { @@ -774,126 +401,35 @@ Before running Timeout callback:: count: 2 } -Timeout callback:: count: 2 -3: /home/src/projects/project/tsconfig.json *new* -4: *ensureProjectForOpenFiles* *new* - -Projects:: -/home/src/projects/project/app/tsconfig.json (Configured) - projectStateVersion: 1 - projectProgramVersion: 1 -/home/src/projects/project/demos/tsconfig.json (Configured) - projectStateVersion: 1 - projectProgramVersion: 1 - noOpenRef: true -/home/src/projects/project/tsconfig.json (Configured) *changed* - projectStateVersion: 3 *changed* - projectProgramVersion: 2 - dirty: true *changed* - -Info seq [hh:mm:ss:mss] Running: /home/src/projects/project/tsconfig.json -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "projectLoadingStart", - "body": { - "projectName": "/home/src/projects/project/tsconfig.json", - "reason": "Change in config file detected" - } - } -Info seq [hh:mm:ss:mss] Config: /home/src/projects/project/tsconfig.json : { - "rootNames": [ - "/home/src/projects/project/app/Component-demos.ts", - "/home/src/projects/project/app/Component.ts", - "/home/src/projects/project/demos/helpers.ts" - ], - "options": { - "outDir": "/home/src/projects/project/dist", - "configFilePath": "/home/src/projects/project/tsconfig.json" - }, - "projectReferences": [ - { - "path": "/home/src/projects/project/demos/tsconfig.json", - "originalPath": "./demos/tsconfig.json" - }, - { - "path": "/home/src/projects/project/app/tsconfig.json", - "originalPath": "./app/tsconfig.json" - } - ] -} -Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /home/src/projects/project/tsconfig.json -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/project/app 1 undefined Project: /home/src/projects/project/tsconfig.json WatchType: Failed Lookup Locations -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/project/app 1 undefined Project: /home/src/projects/project/tsconfig.json WatchType: Failed Lookup Locations -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/project/node_modules 1 undefined Project: /home/src/projects/project/tsconfig.json WatchType: Failed Lookup Locations -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/project/node_modules 1 undefined Project: /home/src/projects/project/tsconfig.json WatchType: Failed Lookup Locations -Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/node_modules 1 undefined Project: /home/src/projects/project/tsconfig.json WatchType: Failed Lookup Locations -Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/node_modules 1 undefined Project: /home/src/projects/project/tsconfig.json WatchType: Failed Lookup Locations -Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /home/src/projects/project/tsconfig.json projectStateVersion: 3 projectProgramVersion: 2 structureChanged: true structureIsReused:: Not Elapsed:: *ms -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (4) - /a/lib/lib.d.ts Text-1 "/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }" - /home/src/projects/project/demos/helpers.ts Text-1 "export const foo = 1;\n" - /home/src/projects/project/app/Component-demos.ts SVC-1-0 "import * as helpers from 'demos/helpers';\nexport const demo = () => {\n helpers;\n}\n" - /home/src/projects/project/app/Component.ts Text-1 "export const Component = () => {}\n" +Timeout callback:: count: 1 +2: *ensureProjectForOpenFiles* *new* -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "projectLoadingFinish", - "body": { - "projectName": "/home/src/projects/project/tsconfig.json" - } - } -Info seq [hh:mm:ss:mss] event: - { - "seq": 0, - "type": "event", - "event": "configFileDiag", - "body": { - "triggerFile": "/home/src/projects/project/tsconfig.json", - "configFile": "/home/src/projects/project/tsconfig.json", - "diagnostics": [] - } - } +Host is moving to new time Info seq [hh:mm:ss:mss] Running: *ensureProjectForOpenFiles* Info seq [hh:mm:ss:mss] Before ensureProjectForOpenFiles: Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/app/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (4) - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/demos/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (3) +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: Info seq [hh:mm:ss:mss] FileName: /home/src/projects/project/app/Component-demos.ts ProjectRootPath: undefined -Info seq [hh:mm:ss:mss] Projects: /home/src/projects/project/tsconfig.json,/home/src/projects/project/demos/tsconfig.json -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /home/src/projects/project/app/tsconfig.json ProjectRootPath: undefined:: Result: /home/src/projects/project/tsconfig.json -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /home/src/projects/project/demos/tsconfig.json ProjectRootPath: undefined:: Result: /home/src/projects/project/tsconfig.json +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* Info seq [hh:mm:ss:mss] After ensureProjectForOpenFiles: Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/app/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (4) - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/demos/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (3) +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: Info seq [hh:mm:ss:mss] FileName: /home/src/projects/project/app/Component-demos.ts ProjectRootPath: undefined -Info seq [hh:mm:ss:mss] Projects: /home/src/projects/project/tsconfig.json,/home/src/projects/project/demos/tsconfig.json +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* Info seq [hh:mm:ss:mss] got projects updated in background /home/src/projects/project/app/Component-demos.ts Info seq [hh:mm:ss:mss] event: { @@ -908,62 +444,11 @@ Info seq [hh:mm:ss:mss] event: } After running Timeout callback:: count: 0 -PolledWatches:: -/home/src/projects/node_modules/@types: - {"pollingInterval":500} -/home/src/projects/project/app/node_modules/@types: - {"pollingInterval":500} -/home/src/projects/project/demos/node_modules/@types: - {"pollingInterval":500} -/home/src/projects/project/node_modules/@types: - {"pollingInterval":500} - -PolledWatches *deleted*:: -/home/src/projects/node_modules: - {"pollingInterval":500} -/home/src/projects/project/node_modules: - {"pollingInterval":500} - -FsWatches:: -/a/lib/lib.d.ts: - {} -/home/src/projects/project/app/Component.ts: - {} -/home/src/projects/project/app/tsconfig.json: - {} -/home/src/projects/project/demos/helpers.ts: - {} -/home/src/projects/project/demos/tsconfig.json: - {} -/home/src/projects/project/tsconfig.json: - {} - -FsWatchesRecursive:: -/home/src/projects/project: - {} -/home/src/projects/project/app: - {} -/home/src/projects/project/demos: - {} - -Projects:: -/home/src/projects/project/app/tsconfig.json (Configured) - projectStateVersion: 1 - projectProgramVersion: 1 -/home/src/projects/project/demos/tsconfig.json (Configured) *changed* - projectStateVersion: 1 - projectProgramVersion: 1 - noOpenRef: false *changed* -/home/src/projects/project/tsconfig.json (Configured) *changed* - projectStateVersion: 3 - projectProgramVersion: 3 *changed* - dirty: false *changed* - Info seq [hh:mm:ss:mss] File: /home/src/projects/project/app/Component-demos.ts: getDefaultProjectForFile: - /home/src/projects/project/demos/tsconfig.json + /dev/null/inferredProject1* findDefaultConfiguredProject: - /home/src/projects/project/demos/tsconfig.json + undefined Before request Info seq [hh:mm:ss:mss] request: @@ -1077,25 +562,39 @@ Info seq [hh:mm:ss:mss] event: "diagnostics": [] } } +Info seq [hh:mm:ss:mss] `remove Project:: Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/app/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (2) + /a/lib/lib.d.ts + /home/src/projects/project/app/Component.ts + + + ../../../../../a/lib/lib.d.ts + Default library for target 'es5' + Component.ts + Matched by include pattern '**/*' in 'tsconfig.json' Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (4) - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/demos/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (3) +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/project/app 1 undefined Config: /home/src/projects/project/app/tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/project/app 1 undefined Config: /home/src/projects/project/app/tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/project/app/node_modules/@types 1 undefined Project: /home/src/projects/project/app/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/project/app/node_modules/@types 1 undefined Project: /home/src/projects/project/app/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/project/node_modules/@types 1 undefined Project: /home/src/projects/project/app/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/project/node_modules/@types 1 undefined Project: /home/src/projects/project/app/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/node_modules/@types 1 undefined Project: /home/src/projects/project/app/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /home/src/projects/node_modules/@types 1 undefined Project: /home/src/projects/project/app/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /home/src/projects/project/app/Component.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Project '/home/src/projects/random/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/home/src/projects/random/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: Info seq [hh:mm:ss:mss] FileName: /home/src/projects/project/app/Component-demos.ts ProjectRootPath: undefined -Info seq [hh:mm:ss:mss] Projects: /home/src/projects/project/tsconfig.json,/home/src/projects/project/demos/tsconfig.json +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* Info seq [hh:mm:ss:mss] FileName: /home/src/projects/random/random.ts ProjectRootPath: undefined Info seq [hh:mm:ss:mss] Projects: /home/src/projects/random/tsconfig.json Info seq [hh:mm:ss:mss] response: @@ -1112,11 +611,19 @@ Info seq [hh:mm:ss:mss] response: After request PolledWatches:: +/home/src/projects/node_modules: + {"pollingInterval":500} /home/src/projects/node_modules/@types: {"pollingInterval":500} +/home/src/projects/project/app/jsconfig.json: + {"pollingInterval":2000} +/home/src/projects/project/app/node_modules: + {"pollingInterval":500} /home/src/projects/project/app/node_modules/@types: {"pollingInterval":500} -/home/src/projects/project/demos/node_modules/@types: +/home/src/projects/project/jsconfig.json: + {"pollingInterval":2000} +/home/src/projects/project/node_modules: {"pollingInterval":500} /home/src/projects/project/node_modules/@types: {"pollingInterval":500} @@ -1126,39 +633,34 @@ PolledWatches:: FsWatches:: /a/lib/lib.d.ts: {} -/home/src/projects/project/app/Component.ts: - {} /home/src/projects/project/app/tsconfig.json: {} -/home/src/projects/project/demos/helpers.ts: - {} -/home/src/projects/project/demos/tsconfig.json: - {} /home/src/projects/project/tsconfig.json: {} /home/src/projects/random/tsconfig.json: *new* {} +FsWatches *deleted*:: +/home/src/projects/project/app/Component.ts: + {} + FsWatchesRecursive:: -/home/src/projects/project: +/home/src/projects/random: *new* {} + +FsWatchesRecursive *deleted*:: /home/src/projects/project/app: {} -/home/src/projects/project/demos: - {} -/home/src/projects/random: *new* - {} Projects:: -/home/src/projects/project/app/tsconfig.json (Configured) +/dev/null/inferredProject1* (Inferred) projectStateVersion: 1 projectProgramVersion: 1 -/home/src/projects/project/demos/tsconfig.json (Configured) +/home/src/projects/project/app/tsconfig.json (Configured) *deleted* projectStateVersion: 1 projectProgramVersion: 1 -/home/src/projects/project/tsconfig.json (Configured) - projectStateVersion: 3 - projectProgramVersion: 3 + isClosed: true *changed* + noOpenRef: true /home/src/projects/random/tsconfig.json (Configured) *new* projectStateVersion: 1 projectProgramVersion: 1 @@ -1166,26 +668,18 @@ Projects:: ScriptInfos:: /a/lib/lib.d.ts *changed* version: Text-1 - containingProjects: 4 *changed* - /home/src/projects/project/app/tsconfig.json - /home/src/projects/project/tsconfig.json - /home/src/projects/project/demos/tsconfig.json + containingProjects: 2 *changed* + /dev/null/inferredProject1* /home/src/projects/random/tsconfig.json *new* + /home/src/projects/project/app/tsconfig.json *deleted* /home/src/projects/project/app/Component-demos.ts (Open) version: SVC-1-0 - containingProjects: 2 - /home/src/projects/project/tsconfig.json - /home/src/projects/project/demos/tsconfig.json *default* -/home/src/projects/project/app/Component.ts - version: Text-1 - containingProjects: 2 - /home/src/projects/project/app/tsconfig.json - /home/src/projects/project/tsconfig.json -/home/src/projects/project/demos/helpers.ts + containingProjects: 1 + /dev/null/inferredProject1* *default* +/home/src/projects/project/app/Component.ts *deleted* version: Text-1 - containingProjects: 2 - /home/src/projects/project/tsconfig.json - /home/src/projects/project/demos/tsconfig.json + containingProjects: 0 *changed* + /home/src/projects/project/app/tsconfig.json *deleted* /home/src/projects/random/random.ts (Open) *new* version: SVC-1-0 containingProjects: 1 @@ -1203,25 +697,17 @@ Info seq [hh:mm:ss:mss] request: "type": "request" } Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/projects/random/random.ts 500 undefined WatchType: Closed Script info -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/app/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Project '/home/src/projects/random/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (4) - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/home/src/projects/project/demos/tsconfig.json' (Configured) -Info seq [hh:mm:ss:mss] Files (3) - -Info seq [hh:mm:ss:mss] ----------------------------------------------- -Info seq [hh:mm:ss:mss] Project '/home/src/projects/random/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: Info seq [hh:mm:ss:mss] FileName: /home/src/projects/project/app/Component-demos.ts ProjectRootPath: undefined -Info seq [hh:mm:ss:mss] Projects: /home/src/projects/project/tsconfig.json,/home/src/projects/project/demos/tsconfig.json +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* Info seq [hh:mm:ss:mss] response: { "seq": 0, @@ -1233,11 +719,19 @@ Info seq [hh:mm:ss:mss] response: After request PolledWatches:: +/home/src/projects/node_modules: + {"pollingInterval":500} /home/src/projects/node_modules/@types: {"pollingInterval":500} +/home/src/projects/project/app/jsconfig.json: + {"pollingInterval":2000} +/home/src/projects/project/app/node_modules: + {"pollingInterval":500} /home/src/projects/project/app/node_modules/@types: {"pollingInterval":500} -/home/src/projects/project/demos/node_modules/@types: +/home/src/projects/project/jsconfig.json: + {"pollingInterval":2000} +/home/src/projects/project/node_modules: {"pollingInterval":500} /home/src/projects/project/node_modules/@types: {"pollingInterval":500} @@ -1247,14 +741,8 @@ PolledWatches:: FsWatches:: /a/lib/lib.d.ts: {} -/home/src/projects/project/app/Component.ts: - {} /home/src/projects/project/app/tsconfig.json: {} -/home/src/projects/project/demos/helpers.ts: - {} -/home/src/projects/project/demos/tsconfig.json: - {} /home/src/projects/project/tsconfig.json: {} /home/src/projects/random/random.ts: *new* @@ -1263,25 +751,13 @@ FsWatches:: {} FsWatchesRecursive:: -/home/src/projects/project: - {} -/home/src/projects/project/app: - {} -/home/src/projects/project/demos: - {} /home/src/projects/random: {} Projects:: -/home/src/projects/project/app/tsconfig.json (Configured) - projectStateVersion: 1 - projectProgramVersion: 1 -/home/src/projects/project/demos/tsconfig.json (Configured) +/dev/null/inferredProject1* (Inferred) projectStateVersion: 1 projectProgramVersion: 1 -/home/src/projects/project/tsconfig.json (Configured) - projectStateVersion: 3 - projectProgramVersion: 3 /home/src/projects/random/tsconfig.json (Configured) *changed* projectStateVersion: 1 projectProgramVersion: 1 @@ -1290,26 +766,13 @@ Projects:: ScriptInfos:: /a/lib/lib.d.ts version: Text-1 - containingProjects: 4 - /home/src/projects/project/app/tsconfig.json - /home/src/projects/project/tsconfig.json - /home/src/projects/project/demos/tsconfig.json + containingProjects: 2 + /dev/null/inferredProject1* /home/src/projects/random/tsconfig.json /home/src/projects/project/app/Component-demos.ts (Open) version: SVC-1-0 - containingProjects: 2 - /home/src/projects/project/tsconfig.json - /home/src/projects/project/demos/tsconfig.json *default* -/home/src/projects/project/app/Component.ts - version: Text-1 - containingProjects: 2 - /home/src/projects/project/app/tsconfig.json - /home/src/projects/project/tsconfig.json -/home/src/projects/project/demos/helpers.ts - version: Text-1 - containingProjects: 2 - /home/src/projects/project/tsconfig.json - /home/src/projects/project/demos/tsconfig.json + containingProjects: 1 + /dev/null/inferredProject1* *default* /home/src/projects/random/random.ts *changed* open: false *changed* version: SVC-1-0 @@ -1318,6 +781,6 @@ ScriptInfos:: Info seq [hh:mm:ss:mss] File: /home/src/projects/project/app/Component-demos.ts: getDefaultProjectForFile: - /home/src/projects/project/demos/tsconfig.json + /dev/null/inferredProject1* findDefaultConfiguredProject: - /home/src/projects/project/demos/tsconfig.json \ No newline at end of file + undefined \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/projectReferences/with-dts-file-next-to-ts-file.js b/tests/baselines/reference/tsserver/projectReferences/with-dts-file-next-to-ts-file.js index 6bd86d5d804a3..516531c1564b4 100644 --- a/tests/baselines/reference/tsserver/projectReferences/with-dts-file-next-to-ts-file.js +++ b/tests/baselines/reference/tsserver/projectReferences/with-dts-file-next-to-ts-file.js @@ -276,7 +276,6 @@ Info seq [hh:mm:ss:mss] event: "diagnostics": [] } } -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /home/src/projects/project/tsconfig.json ProjectRootPath: /home/src/projects/project:: Result: undefined Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/projects/project/src/tsconfig.json 2000 undefined WatchType: Config file for the inferred project root Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/projects/project/src/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /home/src/projects/project/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root diff --git a/tests/baselines/reference/tsserver/projects/file-opened-is-in-configured-project-that-will-be-removed.js b/tests/baselines/reference/tsserver/projects/file-opened-is-in-configured-project-that-will-be-removed.js index 51f94913c1321..5c7814e75bf75 100644 --- a/tests/baselines/reference/tsserver/projects/file-opened-is-in-configured-project-that-will-be-removed.js +++ b/tests/baselines/reference/tsserver/projects/file-opened-is-in-configured-project-that-will-be-removed.js @@ -417,18 +417,42 @@ Info seq [hh:mm:ss:mss] event: "diagnostics": [] } } -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /user/username/projects/myproject/playground/tsconfig-json/tsconfig.json ProjectRootPath: undefined:: Result: /user/username/projects/myproject/playground/tsconfig.json +Info seq [hh:mm:ss:mss] `remove Project:: Info seq [hh:mm:ss:mss] Project '/user/username/projects/myproject/playground/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (4) + /a/lib/lib.d.ts + /user/username/projects/myproject/playground/tests.ts + /user/username/projects/myproject/playground/tsconfig-json/src/src.ts + /user/username/projects/myproject/playground/tsconfig-json/tests/spec.ts + + + ../../../../../a/lib/lib.d.ts + Default library for target 'es5' + tests.ts + Matched by default include pattern '**/*' + tsconfig-json/src/src.ts + Matched by default include pattern '**/*' + tsconfig-json/tests/spec.ts + Matched by default include pattern '**/*' Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/myproject/playground 1 undefined Config: /user/username/projects/myproject/playground/tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/myproject/playground 1 undefined Config: /user/username/projects/myproject/playground/tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /user/username/projects/myproject/playground/tsconfig.json 2000 undefined Project: /user/username/projects/myproject/playground/tsconfig.json WatchType: Config file +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/myproject/playground/node_modules/@types 1 undefined Project: /user/username/projects/myproject/playground/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/myproject/playground/node_modules/@types 1 undefined Project: /user/username/projects/myproject/playground/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Project: /user/username/projects/myproject/playground/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Project: /user/username/projects/myproject/playground/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/node_modules/@types 1 undefined Project: /user/username/projects/myproject/playground/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/node_modules/@types 1 undefined Project: /user/username/projects/myproject/playground/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /user/username/projects/myproject/playground/tests.ts 500 undefined WatchType: Closed Script info Info seq [hh:mm:ss:mss] Project '/user/username/projects/myproject/playground/tsconfig-json/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: Info seq [hh:mm:ss:mss] FileName: /user/username/projects/myproject/playground/tsconfig-json/tests/spec.ts ProjectRootPath: undefined -Info seq [hh:mm:ss:mss] Projects: /user/username/projects/myproject/playground/tsconfig.json +Info seq [hh:mm:ss:mss] Projects: Info seq [hh:mm:ss:mss] response: { "seq": 0, @@ -455,54 +479,58 @@ PolledWatches:: FsWatches:: /a/lib/lib.d.ts: {} -/user/username/projects/myproject/playground/tests.ts: - {} /user/username/projects/myproject/playground/tsconfig-json/src/src.ts: {} /user/username/projects/myproject/playground/tsconfig-json/tsconfig.json: *new* {} -/user/username/projects/myproject/playground/tsconfig.json: - {} FsWatches *deleted*:: +/user/username/projects/myproject/playground/tests.ts: + {} /user/username/projects/myproject/playground/tsconfig-json/tests/spec.ts: {} +/user/username/projects/myproject/playground/tsconfig.json: + {} FsWatchesRecursive:: -/user/username/projects/myproject/playground: - {} /user/username/projects/myproject/playground/tsconfig-json/src: *new* {} +FsWatchesRecursive *deleted*:: +/user/username/projects/myproject/playground: + {} + Projects:: /user/username/projects/myproject/playground/tsconfig-json/tsconfig.json (Configured) *new* projectStateVersion: 1 projectProgramVersion: 1 -/user/username/projects/myproject/playground/tsconfig.json (Configured) *changed* + noOpenRef: true +/user/username/projects/myproject/playground/tsconfig.json (Configured) *deleted* projectStateVersion: 1 projectProgramVersion: 1 - noOpenRef: false *changed* + isClosed: true *changed* + noOpenRef: true ScriptInfos:: /a/lib/lib.d.ts *changed* version: Text-1 - containingProjects: 2 *changed* - /user/username/projects/myproject/playground/tsconfig.json + containingProjects: 1 *changed* /user/username/projects/myproject/playground/tsconfig-json/tsconfig.json *new* -/user/username/projects/myproject/playground/tests.ts + /user/username/projects/myproject/playground/tsconfig.json *deleted* +/user/username/projects/myproject/playground/tests.ts *deleted* version: SVC-1-0 - containingProjects: 1 - /user/username/projects/myproject/playground/tsconfig.json + containingProjects: 0 *changed* + /user/username/projects/myproject/playground/tsconfig.json *deleted* /user/username/projects/myproject/playground/tsconfig-json/src/src.ts *changed* version: Text-1 - containingProjects: 2 *changed* - /user/username/projects/myproject/playground/tsconfig.json + containingProjects: 1 *changed* /user/username/projects/myproject/playground/tsconfig-json/tsconfig.json *new* + /user/username/projects/myproject/playground/tsconfig.json *deleted* /user/username/projects/myproject/playground/tsconfig-json/tests/spec.ts (Open) *changed* open: true *changed* version: Text-1 - containingProjects: 1 - /user/username/projects/myproject/playground/tsconfig.json *default* + containingProjects: 0 *changed* + /user/username/projects/myproject/playground/tsconfig.json *deleted* Before request @@ -515,6 +543,57 @@ Info seq [hh:mm:ss:mss] request: "seq": 4, "type": "request" } +Info seq [hh:mm:ss:mss] Before ensureProjectForOpenFiles: +Info seq [hh:mm:ss:mss] Project '/user/username/projects/myproject/playground/tsconfig-json/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (2) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /user/username/projects/myproject/playground/tsconfig-json/tests/spec.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/playground/tsconfig-json/tests/tsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/playground/tsconfig-json/tests/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/playground/tsconfig-json/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/playground/tsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/playground/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/tsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/playground/tsconfig-json/tests/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/playground/tsconfig-json/tests/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/playground/tsconfig-json/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/playground/tsconfig-json/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/playground/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/playground/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (2) + /a/lib/lib.d.ts Text-1 "/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }" + /user/username/projects/myproject/playground/tsconfig-json/tests/spec.ts Text-1 "export function bar() { }" + + + ../../../../../../../a/lib/lib.d.ts + Default library for target 'es5' + spec.ts + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] After ensureProjectForOpenFiles: +Info seq [hh:mm:ss:mss] Project '/user/username/projects/myproject/playground/tsconfig-json/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (2) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (2) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /user/username/projects/myproject/playground/tsconfig-json/tests/spec.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* Info seq [hh:mm:ss:mss] response: { "response": [ @@ -544,6 +623,71 @@ Info seq [hh:mm:ss:mss] response: "kind": "code" } ], - "responseRequired": true + "responseRequired": true, + "performanceData": { + "updateGraphDurationMs": * + } } After request + +PolledWatches:: +/user/username/projects/myproject/jsconfig.json: *new* + {"pollingInterval":2000} +/user/username/projects/myproject/node_modules/@types: + {"pollingInterval":500} +/user/username/projects/myproject/playground/jsconfig.json: *new* + {"pollingInterval":2000} +/user/username/projects/myproject/playground/node_modules/@types: + {"pollingInterval":500} +/user/username/projects/myproject/playground/tsconfig-json/jsconfig.json: *new* + {"pollingInterval":2000} +/user/username/projects/myproject/playground/tsconfig-json/node_modules/@types: + {"pollingInterval":500} +/user/username/projects/myproject/playground/tsconfig-json/tests/jsconfig.json: *new* + {"pollingInterval":2000} +/user/username/projects/myproject/playground/tsconfig-json/tests/node_modules/@types: *new* + {"pollingInterval":500} +/user/username/projects/myproject/playground/tsconfig-json/tests/tsconfig.json: *new* + {"pollingInterval":2000} +/user/username/projects/myproject/tsconfig.json: *new* + {"pollingInterval":2000} +/user/username/projects/node_modules/@types: + {"pollingInterval":500} + +FsWatches:: +/a/lib/lib.d.ts: + {} +/user/username/projects/myproject/playground/tsconfig-json/src/src.ts: + {} +/user/username/projects/myproject/playground/tsconfig-json/tsconfig.json: + {} +/user/username/projects/myproject/playground/tsconfig.json: *new* + {} + +FsWatchesRecursive:: +/user/username/projects/myproject/playground/tsconfig-json/src: + {} + +Projects:: +/dev/null/inferredProject1* (Inferred) *new* + projectStateVersion: 1 + projectProgramVersion: 1 +/user/username/projects/myproject/playground/tsconfig-json/tsconfig.json (Configured) + projectStateVersion: 1 + projectProgramVersion: 1 + noOpenRef: true + +ScriptInfos:: +/a/lib/lib.d.ts *changed* + version: Text-1 + containingProjects: 2 *changed* + /user/username/projects/myproject/playground/tsconfig-json/tsconfig.json + /dev/null/inferredProject1* *new* +/user/username/projects/myproject/playground/tsconfig-json/src/src.ts + version: Text-1 + containingProjects: 1 + /user/username/projects/myproject/playground/tsconfig-json/tsconfig.json +/user/username/projects/myproject/playground/tsconfig-json/tests/spec.ts (Open) *changed* + version: Text-1 + containingProjects: 1 *changed* + /dev/null/inferredProject1* *default* *new* diff --git a/tests/baselines/reference/tsserver/projects/js-file-opened-is-in-configured-project-that-will-be-removed.js b/tests/baselines/reference/tsserver/projects/js-file-opened-is-in-configured-project-that-will-be-removed.js index 05a8f9648a9a9..6da3158278768 100644 --- a/tests/baselines/reference/tsserver/projects/js-file-opened-is-in-configured-project-that-will-be-removed.js +++ b/tests/baselines/reference/tsserver/projects/js-file-opened-is-in-configured-project-that-will-be-removed.js @@ -445,36 +445,93 @@ Info seq [hh:mm:ss:mss] event: ] } } -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /user/username/projects/myproject/apps/editor/tsconfig.json ProjectRootPath: undefined:: Result: /user/username/projects/myproject/tsconfig.json +Info seq [hh:mm:ss:mss] `remove Project:: Info seq [hh:mm:ss:mss] Project '/user/username/projects/myproject/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (4) + /a/lib/lib.d.ts + /user/username/projects/myproject/apps/editor/scripts/createConfigVariable.js + /user/username/projects/myproject/apps/editor/src/src.js + /user/username/projects/myproject/mocks/cssMock.js + + + ../../../../a/lib/lib.d.ts + Default library for target 'es5' + apps/editor/scripts/createConfigVariable.js + Matched by default include pattern '**/*' + apps/editor/src/src.js + Matched by default include pattern '**/*' + mocks/cssMock.js + Matched by default include pattern '**/*' Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/myproject 1 undefined Config: /user/username/projects/myproject/tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/myproject 1 undefined Config: /user/username/projects/myproject/tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /user/username/projects/myproject/tsconfig.json 2000 undefined Project: /user/username/projects/myproject/tsconfig.json WatchType: Config file +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Project: /user/username/projects/myproject/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Project: /user/username/projects/myproject/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/node_modules/@types 1 undefined Project: /user/username/projects/myproject/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/node_modules/@types 1 undefined Project: /user/username/projects/myproject/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /user/username/projects/myproject/mocks/cssMock.js 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] Before ensureProjectForOpenFiles: Info seq [hh:mm:ss:mss] Project '/user/username/projects/myproject/apps/editor/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: Info seq [hh:mm:ss:mss] FileName: /user/username/projects/myproject/apps/editor/scripts/createConfigVariable.js ProjectRootPath: undefined -Info seq [hh:mm:ss:mss] Projects: /user/username/projects/myproject/tsconfig.json -Info seq [hh:mm:ss:mss] response: - { - "seq": 0, - "type": "response", - "command": "open", - "request_seq": 3, - "success": true, - "performanceData": { - "updateGraphDurationMs": * - } - } -After request +Info seq [hh:mm:ss:mss] Projects: +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/apps/editor/scripts/tsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/apps/editor/scripts/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/apps/editor/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/apps/tsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/apps/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/tsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/apps/editor/scripts/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/apps/editor/scripts/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/apps/editor/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/apps/editor/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/apps/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/apps/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (2) + /a/lib/lib.d.ts Text-1 "/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }" + /user/username/projects/myproject/apps/editor/scripts/createConfigVariable.js Text-1 "function bar() { }" + + + ../../../../../../../a/lib/lib.d.ts + Default library for target 'es5' + createConfigVariable.js + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +TI:: Creating typing installer PolledWatches:: +/user/username/projects/myproject/apps/editor/jsconfig.json: *new* + {"pollingInterval":2000} /user/username/projects/myproject/apps/editor/node_modules/@types: *new* {"pollingInterval":500} +/user/username/projects/myproject/apps/editor/scripts/jsconfig.json: *new* + {"pollingInterval":2000} +/user/username/projects/myproject/apps/editor/scripts/node_modules/@types: *new* + {"pollingInterval":500} +/user/username/projects/myproject/apps/editor/scripts/tsconfig.json: *new* + {"pollingInterval":2000} +/user/username/projects/myproject/apps/jsconfig.json: *new* + {"pollingInterval":2000} /user/username/projects/myproject/apps/node_modules/@types: *new* {"pollingInterval":500} +/user/username/projects/myproject/apps/tsconfig.json: *new* + {"pollingInterval":2000} +/user/username/projects/myproject/jsconfig.json: *new* + {"pollingInterval":2000} /user/username/projects/myproject/node_modules/@types: {"pollingInterval":500} /user/username/projects/node_modules/@types: @@ -487,47 +544,257 @@ FsWatches:: {} /user/username/projects/myproject/apps/editor/tsconfig.json: *new* {} -/user/username/projects/myproject/mocks/cssMock.js: - {} /user/username/projects/myproject/tsconfig.json: {} FsWatches *deleted*:: /user/username/projects/myproject/apps/editor/scripts/createConfigVariable.js: {} +/user/username/projects/myproject/mocks/cssMock.js: + {} FsWatchesRecursive:: -/user/username/projects/myproject: - {} /user/username/projects/myproject/apps/editor/src: *new* {} +FsWatchesRecursive *deleted*:: +/user/username/projects/myproject: + {} + Projects:: +/dev/null/inferredProject1* (Inferred) *new* + projectStateVersion: 1 + projectProgramVersion: 0 /user/username/projects/myproject/apps/editor/tsconfig.json (Configured) *new* projectStateVersion: 1 projectProgramVersion: 1 -/user/username/projects/myproject/tsconfig.json (Configured) *changed* + noOpenRef: true +/user/username/projects/myproject/tsconfig.json (Configured) *deleted* projectStateVersion: 1 projectProgramVersion: 1 - noOpenRef: false *changed* + isClosed: true *changed* + noOpenRef: true ScriptInfos:: /a/lib/lib.d.ts *changed* version: Text-1 containingProjects: 2 *changed* - /user/username/projects/myproject/tsconfig.json /user/username/projects/myproject/apps/editor/tsconfig.json *new* + /dev/null/inferredProject1* *new* + /user/username/projects/myproject/tsconfig.json *deleted* /user/username/projects/myproject/apps/editor/scripts/createConfigVariable.js (Open) *changed* open: true *changed* version: Text-1 - containingProjects: 1 - /user/username/projects/myproject/tsconfig.json *default* + containingProjects: 1 *changed* + /dev/null/inferredProject1* *default* *new* + /user/username/projects/myproject/tsconfig.json *deleted* /user/username/projects/myproject/apps/editor/src/src.js *changed* version: Text-1 - containingProjects: 2 *changed* - /user/username/projects/myproject/tsconfig.json + containingProjects: 1 *changed* /user/username/projects/myproject/apps/editor/tsconfig.json *new* -/user/username/projects/myproject/mocks/cssMock.js + /user/username/projects/myproject/tsconfig.json *deleted* +/user/username/projects/myproject/mocks/cssMock.js *deleted* version: SVC-1-0 - containingProjects: 1 - /user/username/projects/myproject/tsconfig.json + containingProjects: 0 *changed* + /user/username/projects/myproject/tsconfig.json *deleted* + +TI:: [hh:mm:ss:mss] Global cache location '/a/data', safe file path '/safeList.json', types map path /typesMap.json +TI:: [hh:mm:ss:mss] Processing cache location '/a/data' +TI:: [hh:mm:ss:mss] Trying to find '/a/data/package.json'... +TI:: [hh:mm:ss:mss] Finished processing cache location '/a/data' +TI:: [hh:mm:ss:mss] Npm config file: /a/data/package.json +TI:: [hh:mm:ss:mss] Npm config file: '/a/data/package.json' is missing, creating new one... +TI:: [hh:mm:ss:mss] Updating types-registry npm package... +TI:: [hh:mm:ss:mss] npm install --ignore-scripts types-registry@latest +TI:: [hh:mm:ss:mss] Updated types-registry npm package +TI:: typing installer creation complete +//// [/a/data/package.json] +{ "private": true } + +//// [/a/data/node_modules/types-registry/index.json] +{ + "entries": {} +} + + +TI:: [hh:mm:ss:mss] Got install request + { + "projectName": "/dev/null/inferredProject1*", + "fileNames": [ + "/a/lib/lib.d.ts", + "/user/username/projects/myproject/apps/editor/scripts/createConfigVariable.js" + ], + "compilerOptions": { + "target": 1, + "jsx": 1, + "allowNonTsExtensions": true, + "allowJs": true, + "noEmitForJsFiles": true, + "maxNodeModuleJsDepth": 2 + }, + "typeAcquisition": { + "enable": true, + "include": [], + "exclude": [] + }, + "unresolvedImports": [], + "projectRootPath": "/user/username/projects/myproject/apps/editor/scripts", + "kind": "discover" + } +TI:: [hh:mm:ss:mss] Failed to load safelist from types map file '/typesMap.json' +TI:: [hh:mm:ss:mss] Explicitly included types: [] +TI:: [hh:mm:ss:mss] Inferred typings from unresolved imports: [] +TI:: [hh:mm:ss:mss] Finished typings discovery: + { + "cachedTypingPaths": [], + "newTypingNames": [], + "filesToWatch": [ + "/user/username/projects/myproject/apps/editor/scripts/bower_components", + "/user/username/projects/myproject/apps/editor/scripts/node_modules" + ] + } +TI:: [hh:mm:ss:mss] Sending response: + { + "kind": "action::watchTypingLocations", + "projectName": "/dev/null/inferredProject1*", + "files": [ + "/user/username/projects/myproject/apps/editor/scripts/bower_components", + "/user/username/projects/myproject/apps/editor/scripts/node_modules" + ] + } +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/apps/editor/scripts/bower_components 1 undefined Project: /dev/null/inferredProject1* WatchType: Directory location for typing installer +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/apps/editor/scripts/bower_components 1 undefined Project: /dev/null/inferredProject1* WatchType: Directory location for typing installer +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/apps/editor/scripts/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Directory location for typing installer +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/apps/editor/scripts/node_modules 1 undefined Project: /dev/null/inferredProject1* WatchType: Directory location for typing installer +TI:: [hh:mm:ss:mss] Sending response: + { + "projectName": "/dev/null/inferredProject1*", + "typeAcquisition": { + "enable": true, + "include": [], + "exclude": [] + }, + "compilerOptions": { + "target": 1, + "jsx": 1, + "allowNonTsExtensions": true, + "allowJs": true, + "noEmitForJsFiles": true, + "maxNodeModuleJsDepth": 2 + }, + "typings": [], + "unresolvedImports": [], + "kind": "action::set" + } +Info seq [hh:mm:ss:mss] event: + { + "seq": 0, + "type": "event", + "event": "setTypings", + "body": { + "projectName": "/dev/null/inferredProject1*", + "typeAcquisition": { + "enable": true, + "include": [], + "exclude": [] + }, + "compilerOptions": { + "target": 1, + "jsx": 1, + "allowNonTsExtensions": true, + "allowJs": true, + "noEmitForJsFiles": true, + "maxNodeModuleJsDepth": 2 + }, + "typings": [], + "unresolvedImports": [], + "kind": "action::set" + } + } +TI:: [hh:mm:ss:mss] No new typings were requested as a result of typings discovery +Info seq [hh:mm:ss:mss] After ensureProjectForOpenFiles: +Info seq [hh:mm:ss:mss] Project '/user/username/projects/myproject/apps/editor/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (2) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (2) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /user/username/projects/myproject/apps/editor/scripts/createConfigVariable.js ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] Project '/user/username/projects/myproject/apps/editor/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (2) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (2) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /user/username/projects/myproject/apps/editor/scripts/createConfigVariable.js ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "open", + "request_seq": 3, + "success": true, + "performanceData": { + "updateGraphDurationMs": * + } + } +After request + +PolledWatches:: +/user/username/projects/myproject/apps/editor/jsconfig.json: + {"pollingInterval":2000} +/user/username/projects/myproject/apps/editor/node_modules/@types: + {"pollingInterval":500} +/user/username/projects/myproject/apps/editor/scripts/bower_components: *new* + {"pollingInterval":500} +/user/username/projects/myproject/apps/editor/scripts/jsconfig.json: + {"pollingInterval":2000} +/user/username/projects/myproject/apps/editor/scripts/node_modules: *new* + {"pollingInterval":500} +/user/username/projects/myproject/apps/editor/scripts/node_modules/@types: + {"pollingInterval":500} +/user/username/projects/myproject/apps/editor/scripts/tsconfig.json: + {"pollingInterval":2000} +/user/username/projects/myproject/apps/jsconfig.json: + {"pollingInterval":2000} +/user/username/projects/myproject/apps/node_modules/@types: + {"pollingInterval":500} +/user/username/projects/myproject/apps/tsconfig.json: + {"pollingInterval":2000} +/user/username/projects/myproject/jsconfig.json: + {"pollingInterval":2000} +/user/username/projects/myproject/node_modules/@types: + {"pollingInterval":500} +/user/username/projects/node_modules/@types: + {"pollingInterval":500} + +FsWatches:: +/a/lib/lib.d.ts: + {} +/user/username/projects/myproject/apps/editor/src/src.js: + {} +/user/username/projects/myproject/apps/editor/tsconfig.json: + {} +/user/username/projects/myproject/tsconfig.json: + {} + +FsWatchesRecursive:: +/user/username/projects/myproject/apps/editor/src: + {} + +Projects:: +/dev/null/inferredProject1* (Inferred) *changed* + projectStateVersion: 1 + projectProgramVersion: 1 *changed* +/user/username/projects/myproject/apps/editor/tsconfig.json (Configured) + projectStateVersion: 1 + projectProgramVersion: 1 + noOpenRef: true diff --git a/tests/baselines/reference/tsserver/projects/loading-files-with-correct-priority.js b/tests/baselines/reference/tsserver/projects/loading-files-with-correct-priority.js index c4a7a020c8f13..60bbca4946727 100644 --- a/tests/baselines/reference/tsserver/projects/loading-files-with-correct-priority.js +++ b/tests/baselines/reference/tsserver/projects/loading-files-with-correct-priority.js @@ -321,7 +321,6 @@ Info seq [hh:mm:ss:mss] request: Info seq [hh:mm:ss:mss] Invoking /a/tsconfig.json:: wildcard for open scriptInfo:: /a/main.js Info seq [hh:mm:ss:mss] Project: /a/tsconfig.json Detected output file: /a/main.js Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /a/main.js ProjectRootPath: undefined:: Result: /a/tsconfig.json -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /a/tsconfig.json ProjectRootPath: undefined:: Result: undefined Info seq [hh:mm:ss:mss] event: { "seq": 0, diff --git a/tests/baselines/reference/tsserver/projects/references-on-file-opened-is-in-configured-project-that-will-be-removed.js b/tests/baselines/reference/tsserver/projects/references-on-file-opened-is-in-configured-project-that-will-be-removed.js index fb214b1168e09..cabbdbce8069b 100644 --- a/tests/baselines/reference/tsserver/projects/references-on-file-opened-is-in-configured-project-that-will-be-removed.js +++ b/tests/baselines/reference/tsserver/projects/references-on-file-opened-is-in-configured-project-that-will-be-removed.js @@ -417,18 +417,42 @@ Info seq [hh:mm:ss:mss] event: "diagnostics": [] } } -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /user/username/projects/myproject/playground/tsconfig-json/tsconfig.json ProjectRootPath: undefined:: Result: /user/username/projects/myproject/playground/tsconfig.json +Info seq [hh:mm:ss:mss] `remove Project:: Info seq [hh:mm:ss:mss] Project '/user/username/projects/myproject/playground/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (4) + /a/lib/lib.d.ts + /user/username/projects/myproject/playground/tests.ts + /user/username/projects/myproject/playground/tsconfig-json/src/src.ts + /user/username/projects/myproject/playground/tsconfig-json/tests/spec.ts + + + ../../../../../a/lib/lib.d.ts + Default library for target 'es5' + tests.ts + Matched by default include pattern '**/*' + tsconfig-json/src/src.ts + Matched by default include pattern '**/*' + tsconfig-json/tests/spec.ts + Matched by default include pattern '**/*' Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/myproject/playground 1 undefined Config: /user/username/projects/myproject/playground/tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/myproject/playground 1 undefined Config: /user/username/projects/myproject/playground/tsconfig.json WatchType: Wild card directory +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /user/username/projects/myproject/playground/tsconfig.json 2000 undefined Project: /user/username/projects/myproject/playground/tsconfig.json WatchType: Config file +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/myproject/playground/node_modules/@types 1 undefined Project: /user/username/projects/myproject/playground/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/myproject/playground/node_modules/@types 1 undefined Project: /user/username/projects/myproject/playground/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Project: /user/username/projects/myproject/playground/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Project: /user/username/projects/myproject/playground/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/node_modules/@types 1 undefined Project: /user/username/projects/myproject/playground/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /user/username/projects/node_modules/@types 1 undefined Project: /user/username/projects/myproject/playground/tsconfig.json WatchType: Type roots +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /user/username/projects/myproject/playground/tests.ts 500 undefined WatchType: Closed Script info Info seq [hh:mm:ss:mss] Project '/user/username/projects/myproject/playground/tsconfig-json/tsconfig.json' (Configured) Info seq [hh:mm:ss:mss] Files (2) Info seq [hh:mm:ss:mss] ----------------------------------------------- Info seq [hh:mm:ss:mss] Open files: Info seq [hh:mm:ss:mss] FileName: /user/username/projects/myproject/playground/tsconfig-json/tests/spec.ts ProjectRootPath: undefined -Info seq [hh:mm:ss:mss] Projects: /user/username/projects/myproject/playground/tsconfig.json +Info seq [hh:mm:ss:mss] Projects: Info seq [hh:mm:ss:mss] response: { "seq": 0, @@ -455,54 +479,58 @@ PolledWatches:: FsWatches:: /a/lib/lib.d.ts: {} -/user/username/projects/myproject/playground/tests.ts: - {} /user/username/projects/myproject/playground/tsconfig-json/src/src.ts: {} /user/username/projects/myproject/playground/tsconfig-json/tsconfig.json: *new* {} -/user/username/projects/myproject/playground/tsconfig.json: - {} FsWatches *deleted*:: +/user/username/projects/myproject/playground/tests.ts: + {} /user/username/projects/myproject/playground/tsconfig-json/tests/spec.ts: {} +/user/username/projects/myproject/playground/tsconfig.json: + {} FsWatchesRecursive:: -/user/username/projects/myproject/playground: - {} /user/username/projects/myproject/playground/tsconfig-json/src: *new* {} +FsWatchesRecursive *deleted*:: +/user/username/projects/myproject/playground: + {} + Projects:: /user/username/projects/myproject/playground/tsconfig-json/tsconfig.json (Configured) *new* projectStateVersion: 1 projectProgramVersion: 1 -/user/username/projects/myproject/playground/tsconfig.json (Configured) *changed* + noOpenRef: true +/user/username/projects/myproject/playground/tsconfig.json (Configured) *deleted* projectStateVersion: 1 projectProgramVersion: 1 - noOpenRef: false *changed* + isClosed: true *changed* + noOpenRef: true ScriptInfos:: /a/lib/lib.d.ts *changed* version: Text-1 - containingProjects: 2 *changed* - /user/username/projects/myproject/playground/tsconfig.json + containingProjects: 1 *changed* /user/username/projects/myproject/playground/tsconfig-json/tsconfig.json *new* -/user/username/projects/myproject/playground/tests.ts + /user/username/projects/myproject/playground/tsconfig.json *deleted* +/user/username/projects/myproject/playground/tests.ts *deleted* version: SVC-1-0 - containingProjects: 1 - /user/username/projects/myproject/playground/tsconfig.json + containingProjects: 0 *changed* + /user/username/projects/myproject/playground/tsconfig.json *deleted* /user/username/projects/myproject/playground/tsconfig-json/src/src.ts *changed* version: Text-1 - containingProjects: 2 *changed* - /user/username/projects/myproject/playground/tsconfig.json + containingProjects: 1 *changed* /user/username/projects/myproject/playground/tsconfig-json/tsconfig.json *new* + /user/username/projects/myproject/playground/tsconfig.json *deleted* /user/username/projects/myproject/playground/tsconfig-json/tests/spec.ts (Open) *changed* open: true *changed* version: Text-1 - containingProjects: 1 - /user/username/projects/myproject/playground/tsconfig.json *default* + containingProjects: 0 *changed* + /user/username/projects/myproject/playground/tsconfig.json *deleted* Before request @@ -517,8 +545,59 @@ Info seq [hh:mm:ss:mss] request: "seq": 4, "type": "request" } -Info seq [hh:mm:ss:mss] Finding references to /user/username/projects/myproject/playground/tsconfig-json/tests/spec.ts position 16 in project /user/username/projects/myproject/playground/tsconfig.json -Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/playground/tsconfig-json/tests/spec.d.ts 2000 undefined Project: /user/username/projects/myproject/playground/tsconfig.json WatchType: Missing generated file +Info seq [hh:mm:ss:mss] Before ensureProjectForOpenFiles: +Info seq [hh:mm:ss:mss] Project '/user/username/projects/myproject/playground/tsconfig-json/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (2) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /user/username/projects/myproject/playground/tsconfig-json/tests/spec.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/playground/tsconfig-json/tests/tsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/playground/tsconfig-json/tests/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/playground/tsconfig-json/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/playground/tsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/playground/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/tsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/jsconfig.json 2000 undefined WatchType: Config file for the inferred project root +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/playground/tsconfig-json/tests/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/playground/tsconfig-json/tests/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/playground/tsconfig-json/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/playground/tsconfig-json/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/playground/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/playground/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/myproject/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /user/username/projects/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (2) + /a/lib/lib.d.ts Text-1 "/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }" + /user/username/projects/myproject/playground/tsconfig-json/tests/spec.ts Text-1 "export function bar() { }" + + + ../../../../../../../a/lib/lib.d.ts + Default library for target 'es5' + spec.ts + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] After ensureProjectForOpenFiles: +Info seq [hh:mm:ss:mss] Project '/user/username/projects/myproject/playground/tsconfig-json/tsconfig.json' (Configured) +Info seq [hh:mm:ss:mss] Files (2) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (2) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /user/username/projects/myproject/playground/tsconfig-json/tests/spec.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] Finding references to /user/username/projects/myproject/playground/tsconfig-json/tests/spec.ts position 16 in project /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /user/username/projects/myproject/playground/tsconfig-json/tests/spec.d.ts 2000 undefined Project: /dev/null/inferredProject1* WatchType: Missing generated file Info seq [hh:mm:ss:mss] response: { "response": { @@ -550,46 +629,73 @@ Info seq [hh:mm:ss:mss] response: "symbolStartOffset": 17, "symbolDisplayString": "function bar(): void" }, - "responseRequired": true + "responseRequired": true, + "performanceData": { + "updateGraphDurationMs": * + } } After request PolledWatches:: +/user/username/projects/myproject/jsconfig.json: *new* + {"pollingInterval":2000} /user/username/projects/myproject/node_modules/@types: {"pollingInterval":500} +/user/username/projects/myproject/playground/jsconfig.json: *new* + {"pollingInterval":2000} /user/username/projects/myproject/playground/node_modules/@types: {"pollingInterval":500} +/user/username/projects/myproject/playground/tsconfig-json/jsconfig.json: *new* + {"pollingInterval":2000} /user/username/projects/myproject/playground/tsconfig-json/node_modules/@types: {"pollingInterval":500} +/user/username/projects/myproject/playground/tsconfig-json/tests/jsconfig.json: *new* + {"pollingInterval":2000} +/user/username/projects/myproject/playground/tsconfig-json/tests/node_modules/@types: *new* + {"pollingInterval":500} /user/username/projects/myproject/playground/tsconfig-json/tests/spec.d.ts: *new* {"pollingInterval":2000} +/user/username/projects/myproject/playground/tsconfig-json/tests/tsconfig.json: *new* + {"pollingInterval":2000} +/user/username/projects/myproject/tsconfig.json: *new* + {"pollingInterval":2000} /user/username/projects/node_modules/@types: {"pollingInterval":500} FsWatches:: /a/lib/lib.d.ts: {} -/user/username/projects/myproject/playground/tests.ts: - {} /user/username/projects/myproject/playground/tsconfig-json/src/src.ts: {} /user/username/projects/myproject/playground/tsconfig-json/tsconfig.json: {} -/user/username/projects/myproject/playground/tsconfig.json: +/user/username/projects/myproject/playground/tsconfig.json: *new* {} FsWatchesRecursive:: -/user/username/projects/myproject/playground: - {} /user/username/projects/myproject/playground/tsconfig-json/src: {} Projects:: -/user/username/projects/myproject/playground/tsconfig-json/tsconfig.json (Configured) +/dev/null/inferredProject1* (Inferred) *new* projectStateVersion: 1 projectProgramVersion: 1 -/user/username/projects/myproject/playground/tsconfig.json (Configured) *changed* +/user/username/projects/myproject/playground/tsconfig-json/tsconfig.json (Configured) projectStateVersion: 1 projectProgramVersion: 1 - documentPositionMappers: 1 *changed* - /user/username/projects/myproject/playground/tsconfig-json/tests/spec.d.ts: identitySourceMapConsumer *new* + noOpenRef: true + +ScriptInfos:: +/a/lib/lib.d.ts *changed* + version: Text-1 + containingProjects: 2 *changed* + /user/username/projects/myproject/playground/tsconfig-json/tsconfig.json + /dev/null/inferredProject1* *new* +/user/username/projects/myproject/playground/tsconfig-json/src/src.ts + version: Text-1 + containingProjects: 1 + /user/username/projects/myproject/playground/tsconfig-json/tsconfig.json +/user/username/projects/myproject/playground/tsconfig-json/tests/spec.ts (Open) *changed* + version: Text-1 + containingProjects: 1 *changed* + /dev/null/inferredProject1* *default* *new* diff --git a/tests/baselines/reference/tsserver/projects/should-create-new-inferred-projects-for-files-excluded-from-a-configured-project.js b/tests/baselines/reference/tsserver/projects/should-create-new-inferred-projects-for-files-excluded-from-a-configured-project.js index 484d48f72910c..2c11118a42132 100644 --- a/tests/baselines/reference/tsserver/projects/should-create-new-inferred-projects-for-files-excluded-from-a-configured-project.js +++ b/tests/baselines/reference/tsserver/projects/should-create-new-inferred-projects-for-files-excluded-from-a-configured-project.js @@ -394,7 +394,6 @@ Info seq [hh:mm:ss:mss] request: } Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /a/b/commonFile2.ts 500 undefined WatchType: Closed Script info Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /a/b/commonFile2.ts ProjectRootPath: undefined:: Result: /a/b/tsconfig.json -Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /a/b/tsconfig.json ProjectRootPath: undefined:: Result: undefined Info seq [hh:mm:ss:mss] event: { "seq": 0, From bcb1545aa37526e42534ed68de89d791eb270390 Mon Sep 17 00:00:00 2001 From: Andrew Branch Date: Thu, 15 Aug 2024 15:00:31 -0700 Subject: [PATCH 40/50] Allow existing imports in file to supersede package.json filter (#59604) --- src/compiler/types.ts | 5 +- src/server/moduleSpecifierCache.ts | 12 +- src/services/codefixes/importFixes.ts | 3 +- src/services/completions.ts | 6 +- src/services/exportInfoMap.ts | 13 +- src/services/utilities.ts | 22 +- ...oImportPackageJsonFilterExistingImport1.js | 733 ++++ ...oImportPackageJsonFilterExistingImport2.js | 3094 ++++++++++++++++ ...oImportPackageJsonFilterExistingImport3.js | 3294 +++++++++++++++++ ...oImportPackageJsonFilterExistingImport1.ts | 24 + ...oImportPackageJsonFilterExistingImport2.ts | 25 + ...oImportPackageJsonFilterExistingImport3.ts | 27 + 12 files changed, 7233 insertions(+), 25 deletions(-) create mode 100644 tests/baselines/reference/tsserver/fourslashServer/autoImportPackageJsonFilterExistingImport1.js create mode 100644 tests/baselines/reference/tsserver/fourslashServer/autoImportPackageJsonFilterExistingImport2.js create mode 100644 tests/baselines/reference/tsserver/fourslashServer/autoImportPackageJsonFilterExistingImport3.js create mode 100644 tests/cases/fourslash/server/autoImportPackageJsonFilterExistingImport1.ts create mode 100644 tests/cases/fourslash/server/autoImportPackageJsonFilterExistingImport2.ts create mode 100644 tests/cases/fourslash/server/autoImportPackageJsonFilterExistingImport3.ts diff --git a/src/compiler/types.ts b/src/compiler/types.ts index 4f75397d59fef..dd9dd059a4444 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -5461,7 +5461,7 @@ export const enum NodeBuilderFlags { AllowEmptyIndexInfoType = 1 << 21, // Errors (cont.) AllowNodeModulesRelativePaths = 1 << 26, - + IgnoreErrors = AllowThisInObjectLiteral | AllowQualifiedNameInPlaceOfIdentifier | AllowAnonymousIdentifier | AllowEmptyUnionOrIntersection | AllowEmptyTuple | AllowEmptyIndexInfoType | AllowNodeModulesRelativePaths, @@ -9855,6 +9855,7 @@ export interface ModulePath { export interface ResolvedModuleSpecifierInfo { kind: "node_modules" | "paths" | "redirect" | "relative" | "ambient" | undefined; modulePaths: readonly ModulePath[] | undefined; + packageName: string | undefined; moduleSpecifiers: readonly string[] | undefined; isBlockedByPackageJsonDependencies: boolean | undefined; } @@ -9868,7 +9869,7 @@ export interface ModuleSpecifierOptions { export interface ModuleSpecifierCache { get(fromFileName: Path, toFileName: Path, preferences: UserPreferences, options: ModuleSpecifierOptions): Readonly | undefined; set(fromFileName: Path, toFileName: Path, preferences: UserPreferences, options: ModuleSpecifierOptions, kind: ResolvedModuleSpecifierInfo["kind"], modulePaths: readonly ModulePath[], moduleSpecifiers: readonly string[]): void; - setBlockedByPackageJsonDependencies(fromFileName: Path, toFileName: Path, preferences: UserPreferences, options: ModuleSpecifierOptions, isBlockedByPackageJsonDependencies: boolean): void; + setBlockedByPackageJsonDependencies(fromFileName: Path, toFileName: Path, preferences: UserPreferences, options: ModuleSpecifierOptions, packageName: string | undefined, isBlockedByPackageJsonDependencies: boolean): void; setModulePaths(fromFileName: Path, toFileName: Path, preferences: UserPreferences, options: ModuleSpecifierOptions, modulePaths: readonly ModulePath[]): void; clear(): void; count(): number; diff --git a/src/server/moduleSpecifierCache.ts b/src/server/moduleSpecifierCache.ts index 73e1168afd2f6..96d8eb3bf43bc 100644 --- a/src/server/moduleSpecifierCache.ts +++ b/src/server/moduleSpecifierCache.ts @@ -28,7 +28,7 @@ export function createModuleSpecifierCache(host: ModuleSpecifierResolutionCacheH return cache.get(toFileName); }, set(fromFileName, toFileName, preferences, options, kind, modulePaths, moduleSpecifiers) { - ensureCache(fromFileName, preferences, options).set(toFileName, createInfo(kind, modulePaths, moduleSpecifiers, /*isBlockedByPackageJsonDependencies*/ false)); + ensureCache(fromFileName, preferences, options).set(toFileName, createInfo(kind, modulePaths, moduleSpecifiers, /*packageName*/ undefined, /*isBlockedByPackageJsonDependencies*/ false)); // If any module specifiers were generated based off paths in node_modules, // a package.json file in that package was read and is an input to the cached. @@ -58,17 +58,18 @@ export function createModuleSpecifierCache(host: ModuleSpecifierResolutionCacheH info.modulePaths = modulePaths; } else { - cache.set(toFileName, createInfo(/*kind*/ undefined, modulePaths, /*moduleSpecifiers*/ undefined, /*isBlockedByPackageJsonDependencies*/ undefined)); + cache.set(toFileName, createInfo(/*kind*/ undefined, modulePaths, /*moduleSpecifiers*/ undefined, /*packageName*/ undefined, /*isBlockedByPackageJsonDependencies*/ undefined)); } }, - setBlockedByPackageJsonDependencies(fromFileName, toFileName, preferences, options, isBlockedByPackageJsonDependencies) { + setBlockedByPackageJsonDependencies(fromFileName, toFileName, preferences, options, packageName, isBlockedByPackageJsonDependencies) { const cache = ensureCache(fromFileName, preferences, options); const info = cache.get(toFileName); if (info) { info.isBlockedByPackageJsonDependencies = isBlockedByPackageJsonDependencies; + info.packageName = packageName; } else { - cache.set(toFileName, createInfo(/*kind*/ undefined, /*modulePaths*/ undefined, /*moduleSpecifiers*/ undefined, isBlockedByPackageJsonDependencies)); + cache.set(toFileName, createInfo(/*kind*/ undefined, /*modulePaths*/ undefined, /*moduleSpecifiers*/ undefined, packageName, isBlockedByPackageJsonDependencies)); } }, clear() { @@ -103,8 +104,9 @@ export function createModuleSpecifierCache(host: ModuleSpecifierResolutionCacheH kind: ResolvedModuleSpecifierInfo["kind"] | undefined, modulePaths: readonly ModulePath[] | undefined, moduleSpecifiers: readonly string[] | undefined, + packageName: string | undefined, isBlockedByPackageJsonDependencies: boolean | undefined, ): ResolvedModuleSpecifierInfo { - return { kind, modulePaths, moduleSpecifiers, isBlockedByPackageJsonDependencies }; + return { kind, modulePaths, moduleSpecifiers, packageName, isBlockedByPackageJsonDependencies }; } } diff --git a/src/services/codefixes/importFixes.ts b/src/services/codefixes/importFixes.ts index aa5efcee15861..9940c1794ed9c 100644 --- a/src/services/codefixes/importFixes.ts +++ b/src/services/codefixes/importFixes.ts @@ -35,6 +35,7 @@ import { ExportKind, ExportMapInfoKey, factory, + fileContainsPackageImport, findAncestor, first, firstDefined, @@ -1543,7 +1544,7 @@ function getExportInfos( const moduleSpecifierResolutionHost = getModuleSpecifierResolutionHost(isFromPackageJson); if ( toFile && isImportableFile(program, fromFile, toFile, preferences, packageJsonFilter, moduleSpecifierResolutionHost, moduleSpecifierCache) || - !toFile && packageJsonFilter.allowsImportingAmbientModule(moduleSymbol, moduleSpecifierResolutionHost) + (!toFile && packageJsonFilter.allowsImportingAmbientModule(moduleSymbol, moduleSpecifierResolutionHost) || fileContainsPackageImport(fromFile, stripQuotes(moduleSymbol.name))) ) { const checker = program.getTypeChecker(); originalSymbolToExportInfos.add(getUniqueSymbolId(exportedSymbol, checker).toString(), { symbol: exportedSymbol, moduleSymbol, moduleFileName: toFile?.fileName, exportKind, targetFlags: skipAlias(exportedSymbol, checker).flags, isFromPackageJson }); diff --git a/src/services/completions.ts b/src/services/completions.ts index 18fc3e8e5dd59..0eb234a7a5303 100644 --- a/src/services/completions.ts +++ b/src/services/completions.ts @@ -63,6 +63,7 @@ import { Expression, ExpressionWithTypeArguments, factory, + fileContainsPackageImport, filter, find, findAncestor, @@ -4207,9 +4208,8 @@ function getCompletionData( if (JsTyping.nodeCoreModules.has(moduleName) && startsWith(moduleName, "node:") !== shouldUseUriStyleNodeCoreModules(sourceFile, program)) { return false; } - return packageJsonFilter - ? packageJsonFilter.allowsImportingAmbientModule(info.moduleSymbol, getModuleSpecifierResolutionHost(info.isFromPackageJson)) - : true; + return (packageJsonFilter?.allowsImportingAmbientModule(info.moduleSymbol, getModuleSpecifierResolutionHost(info.isFromPackageJson)) ?? true) + || fileContainsPackageImport(sourceFile, moduleName); } return isImportableFile( info.isFromPackageJson ? packageJsonAutoImportProvider! : program, diff --git a/src/services/exportInfoMap.ts b/src/services/exportInfoMap.ts index 4873d6eac42f0..e551b2c81a777 100644 --- a/src/services/exportInfoMap.ts +++ b/src/services/exportInfoMap.ts @@ -374,7 +374,7 @@ export function isImportableFile( if (from === to) return false; const cachedResult = moduleSpecifierCache?.get(from.path, to.path, preferences, {}); if (cachedResult?.isBlockedByPackageJsonDependencies !== undefined) { - return !cachedResult.isBlockedByPackageJsonDependencies; + return !cachedResult.isBlockedByPackageJsonDependencies || !!cachedResult.packageName && fileContainsPackageImport(from, cachedResult.packageName); } const getCanonicalFileName = hostGetCanonicalFileName(moduleSpecifierResolutionHost); @@ -394,14 +394,19 @@ export function isImportableFile( ); if (packageJsonFilter) { - const isAutoImportable = hasImportablePath && packageJsonFilter.allowsImportingSourceFile(to, moduleSpecifierResolutionHost); - moduleSpecifierCache?.setBlockedByPackageJsonDependencies(from.path, to.path, preferences, {}, !isAutoImportable); - return isAutoImportable; + const importInfo = hasImportablePath ? packageJsonFilter.getSourceFileInfo(to, moduleSpecifierResolutionHost) : undefined; + moduleSpecifierCache?.setBlockedByPackageJsonDependencies(from.path, to.path, preferences, {}, importInfo?.packageName, !importInfo?.importable); + return !!importInfo?.importable || !!importInfo?.packageName && fileContainsPackageImport(from, importInfo.packageName); } return hasImportablePath; } +/** @internal */ +export function fileContainsPackageImport(sourceFile: SourceFile, packageName: string) { + return sourceFile.imports && sourceFile.imports.some(i => i.text === packageName || i.text.startsWith(packageName + "/")); +} + /** * Don't include something from a `node_modules` that isn't actually reachable by a global import. * A relative import to node_modules is usually a bad idea. diff --git a/src/services/utilities.ts b/src/services/utilities.ts index c3908e208b74f..4f5cbf8d7d467 100644 --- a/src/services/utilities.ts +++ b/src/services/utilities.ts @@ -3740,7 +3740,7 @@ export function createPackageJsonInfo(fileName: string, host: { readFile?(fileNa /** @internal */ export interface PackageJsonImportFilter { allowsImportingAmbientModule: (moduleSymbol: Symbol, moduleSpecifierResolutionHost: ModuleSpecifierResolutionHost) => boolean; - allowsImportingSourceFile: (sourceFile: SourceFile, moduleSpecifierResolutionHost: ModuleSpecifierResolutionHost) => boolean; + getSourceFileInfo: (sourceFile: SourceFile, moduleSpecifierResolutionHost: ModuleSpecifierResolutionHost) => { importable: boolean; packageName?: string; }; /** * Use for a specific module specifier that has already been resolved. * Use `allowsImportingAmbientModule` or `allowsImportingSourceFile` to resolve @@ -3757,10 +3757,10 @@ export function createPackageJsonImportFilter(fromFile: SourceFile | FutureSourc let usesNodeCoreModules: boolean | undefined; let ambientModuleCache: Map | undefined; - let sourceFileCache: Map | undefined; + let sourceFileCache: Map | undefined; return { allowsImportingAmbientModule, - allowsImportingSourceFile, + getSourceFileInfo, allowsImportingSpecifier, }; @@ -3808,9 +3808,9 @@ export function createPackageJsonImportFilter(fromFile: SourceFile | FutureSourc return result; } - function allowsImportingSourceFile(sourceFile: SourceFile, moduleSpecifierResolutionHost: ModuleSpecifierResolutionHost): boolean { + function getSourceFileInfo(sourceFile: SourceFile, moduleSpecifierResolutionHost: ModuleSpecifierResolutionHost): { importable: boolean; packageName?: string; } { if (!packageJsons.length) { - return true; + return { importable: true, packageName: undefined }; } if (!sourceFileCache) { @@ -3823,13 +3823,15 @@ export function createPackageJsonImportFilter(fromFile: SourceFile | FutureSourc } } - const moduleSpecifier = getNodeModulesPackageNameFromFileName(sourceFile.fileName, moduleSpecifierResolutionHost); - if (!moduleSpecifier) { - sourceFileCache.set(sourceFile, true); - return true; + const packageName = getNodeModulesPackageNameFromFileName(sourceFile.fileName, moduleSpecifierResolutionHost); + if (!packageName) { + const result = { importable: true, packageName }; + sourceFileCache.set(sourceFile, result); + return result; } - const result = moduleSpecifierIsCoveredByPackageJson(moduleSpecifier); + const importable = moduleSpecifierIsCoveredByPackageJson(packageName); + const result = { importable, packageName }; sourceFileCache.set(sourceFile, result); return result; } diff --git a/tests/baselines/reference/tsserver/fourslashServer/autoImportPackageJsonFilterExistingImport1.js b/tests/baselines/reference/tsserver/fourslashServer/autoImportPackageJsonFilterExistingImport1.js new file mode 100644 index 0000000000000..6bd0ddc3b689f --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/autoImportPackageJsonFilterExistingImport1.js @@ -0,0 +1,733 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +//// [/index.ts] +import { useState } from "react"; +useMemo + +//// [/lib.d.ts] +lib.d.ts-Text + +//// [/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + +//// [/node_modules/@types/react/index.d.ts] +export declare function useMemo(): void; +export declare function useState(): void; + +//// [/package.json] +{} + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/node_modules/@types/react/index.d.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /node_modules/@types/react/index.d.ts ProjectRootPath: undefined:: Result: undefined +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /node_modules/@types/react/package.json 2000 undefined Project: /dev/null/inferredProject1* WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /node_modules/@types/react/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /node_modules/@types/react/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /node_modules/@types/react/index.d.ts SVC-1-0 "export declare function useMemo(): void;\nexport declare function useState(): void;" + + + ../../../lib.d.ts + Default library for target 'es5' + ../../../lib.decorators.d.ts + Library referenced via 'decorators' from file '../../../lib.d.ts' + ../../../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../../../lib.d.ts' + index.d.ts + Root file specified for compilation + Entry point for implicit type library 'react' + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /node_modules/@types/react/index.d.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "open", + "request_seq": 0, + "success": true, + "performanceData": { + "updateGraphDurationMs": * + } + } +After Request +watchedFiles:: +/lib.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} +/node_modules/@types/react/package.json: *new* + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +/node_modules/@types/react/node_modules/@types: *new* + {} + +Projects:: +/dev/null/inferredProject1* (Inferred) *new* + projectStateVersion: 1 + projectProgramVersion: 1 + +ScriptInfos:: +/lib.d.ts *new* + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/lib.decorators.d.ts *new* + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/lib.decorators.legacy.d.ts *new* + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/node_modules/@types/react/index.d.ts (Open) *new* + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject1* *default* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "file": "/index.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /index.ts ProjectRootPath: undefined:: Result: undefined +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject2* +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /node_modules/@types/react/package.json 2000 undefined Project: /dev/null/inferredProject2* WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject2* projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject2*' (Inferred) +Info seq [hh:mm:ss:mss] Files (5) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /node_modules/@types/react/index.d.ts SVC-1-0 "export declare function useMemo(): void;\nexport declare function useState(): void;" + /index.ts SVC-1-0 "import { useState } from \"react\";\nuseMemo" + + + lib.d.ts + Default library for target 'es5' + lib.decorators.d.ts + Library referenced via 'decorators' from file 'lib.d.ts' + lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file 'lib.d.ts' + node_modules/@types/react/index.d.ts + Imported via "react" from file 'index.ts' + Entry point for implicit type library 'react' + index.ts + Root file specified for compilation + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /package.json 250 undefined WatchType: package.json file +Info seq [hh:mm:ss:mss] `remove Project:: +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts + /lib.decorators.d.ts + /lib.decorators.legacy.d.ts + /node_modules/@types/react/index.d.ts + + + ../../../lib.d.ts + Default library for target 'es5' + ../../../lib.decorators.d.ts + Library referenced via 'decorators' from file '../../../lib.d.ts' + ../../../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../../../lib.d.ts' + index.d.ts + Root file specified for compilation + Entry point for implicit type library 'react' + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /node_modules/@types/react/package.json 2000 undefined Project: /dev/null/inferredProject1* WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /node_modules/@types/react/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /node_modules/@types/react/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject2*' (Inferred) +Info seq [hh:mm:ss:mss] Files (5) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /node_modules/@types/react/index.d.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject2* +Info seq [hh:mm:ss:mss] FileName: /index.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject2* +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "open", + "request_seq": 1, + "success": true, + "performanceData": { + "updateGraphDurationMs": * + } + } +After Request +watchedFiles:: +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/node_modules/@types/react/package.json: + {"pollingInterval":2000} *new* +/package.json: *new* + {"pollingInterval":250} + +watchedFiles *deleted*:: +/node_modules/@types/react/package.json: + {"pollingInterval":2000} + +watchedDirectoriesRecursive *deleted*:: +/node_modules/@types/react/node_modules/@types: + {} + +Projects:: +/dev/null/inferredProject1* (Inferred) *deleted* + projectStateVersion: 2 *changed* + projectProgramVersion: 1 + dirty: true *changed* + isClosed: true *changed* + isOrphan: true *changed* +/dev/null/inferredProject2* (Inferred) *new* + projectStateVersion: 1 + projectProgramVersion: 1 + +ScriptInfos:: +/index.ts (Open) *new* + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject2* *default* +/lib.d.ts *changed* + version: Text-1 + containingProjects: 1 *changed* + /dev/null/inferredProject2* *new* + /dev/null/inferredProject1* *deleted* +/lib.decorators.d.ts *changed* + version: Text-1 + containingProjects: 1 *changed* + /dev/null/inferredProject2* *new* + /dev/null/inferredProject1* *deleted* +/lib.decorators.legacy.d.ts *changed* + version: Text-1 + containingProjects: 1 *changed* + /dev/null/inferredProject2* *new* + /dev/null/inferredProject1* *deleted* +/node_modules/@types/react/index.d.ts (Open) *changed* + version: SVC-1-0 + containingProjects: 1 *changed* + /dev/null/inferredProject2* *default* *new* + /dev/null/inferredProject1* *deleted* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 2, + "type": "request", + "arguments": { + "preferences": {} + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 2, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 3, + "type": "request", + "arguments": { + "file": "/index.ts", + "includeLinePosition": true + }, + "command": "syntacticDiagnosticsSync" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "syntacticDiagnosticsSync", + "request_seq": 3, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 4, + "type": "request", + "arguments": { + "file": "/index.ts", + "includeLinePosition": true + }, + "command": "semanticDiagnosticsSync" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "semanticDiagnosticsSync", + "request_seq": 4, + "success": true, + "body": [ + { + "message": "Cannot find name 'useMemo'.", + "start": 34, + "length": 7, + "category": "error", + "code": 2304, + "startLocation": { + "line": 2, + "offset": 1 + }, + "endLocation": { + "line": 2, + "offset": 8 + } + } + ] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 5, + "type": "request", + "arguments": { + "file": "/index.ts", + "includeLinePosition": true + }, + "command": "suggestionDiagnosticsSync" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "suggestionDiagnosticsSync", + "request_seq": 5, + "success": true, + "body": [ + { + "message": "'useState' is declared but its value is never read.", + "start": 0, + "length": 33, + "category": "suggestion", + "code": 6133, + "startLocation": { + "line": 1, + "offset": 1 + }, + "endLocation": { + "line": 1, + "offset": 34 + }, + "reportsUnnecessary": true + } + ] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 6, + "type": "request", + "arguments": { + "file": "/index.ts", + "startLine": 2, + "startOffset": 1, + "endLine": 2, + "endOffset": 8, + "errorCodes": [ + 2304 + ] + }, + "command": "getCodeFixes" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "getCodeFixes", + "request_seq": 6, + "success": true, + "body": [ + { + "fixName": "import", + "description": "Update import from \"react\"", + "changes": [ + { + "fileName": "/index.ts", + "textChanges": [ + { + "start": { + "line": 1, + "offset": 10 + }, + "end": { + "line": 1, + "offset": 10 + }, + "newText": "useMemo, " + } + ] + } + ] + } + ] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 7, + "type": "request", + "arguments": { + "file": "/index.ts", + "startLine": 1, + "startOffset": 1, + "endLine": 1, + "endOffset": 34, + "errorCodes": [ + 6133 + ] + }, + "command": "getCodeFixes" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "getCodeFixes", + "request_seq": 7, + "success": true, + "body": [ + { + "fixName": "unusedIdentifier", + "description": "Remove import from 'react'", + "changes": [ + { + "fileName": "/index.ts", + "textChanges": [ + { + "start": { + "line": 1, + "offset": 1 + }, + "end": { + "line": 2, + "offset": 1 + }, + "newText": "" + } + ] + } + ] + } + ] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 8, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 10, + "endLine": 1, + "endOffset": 10, + "insertString": "useMemo, " + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "change", + "request_seq": 8, + "success": true + } +After Request +Projects:: +/dev/null/inferredProject2* (Inferred) *changed* + projectStateVersion: 2 *changed* + projectProgramVersion: 1 + dirty: true *changed* + +ScriptInfos:: +/index.ts (Open) *changed* + version: SVC-1-1 *changed* + containingProjects: 1 + /dev/null/inferredProject2* *default* +/lib.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/lib.decorators.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/lib.decorators.legacy.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/node_modules/@types/react/index.d.ts (Open) + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject2* *default* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 9, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 10, + "endLine": 1, + "endOffset": 19, + "insertString": "" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "change", + "request_seq": 9, + "success": true + } +After Request +ScriptInfos:: +/index.ts (Open) *changed* + version: SVC-1-2 *changed* + containingProjects: 1 + /dev/null/inferredProject2* *default* +/lib.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/lib.decorators.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/lib.decorators.legacy.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/node_modules/@types/react/index.d.ts (Open) + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject2* *default* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 10, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 1, + "endLine": 2, + "endOffset": 1, + "insertString": "" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "change", + "request_seq": 10, + "success": true + } +After Request +ScriptInfos:: +/index.ts (Open) *changed* + version: SVC-1-3 *changed* + containingProjects: 1 + /dev/null/inferredProject2* *default* +/lib.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/lib.decorators.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/lib.decorators.legacy.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/node_modules/@types/react/index.d.ts (Open) + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject2* *default* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 11, + "type": "request", + "arguments": { + "preferences": {} + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 11, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 12, + "type": "request", + "arguments": { + "file": "/index.ts", + "includeLinePosition": true + }, + "command": "syntacticDiagnosticsSync" + } +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject2* +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject2* projectStateVersion: 2 projectProgramVersion: 1 structureChanged: true structureIsReused:: SafeModules Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject2*' (Inferred) +Info seq [hh:mm:ss:mss] Files (5) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /index.ts SVC-1-3 "useMemo" + /node_modules/@types/react/index.d.ts SVC-1-0 "export declare function useMemo(): void;\nexport declare function useState(): void;" + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "syntacticDiagnosticsSync", + "request_seq": 12, + "success": true, + "performanceData": { + "updateGraphDurationMs": * + }, + "body": [] + } +After Request +Projects:: +/dev/null/inferredProject2* (Inferred) *changed* + projectStateVersion: 2 + projectProgramVersion: 2 *changed* + dirty: false *changed* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 13, + "type": "request", + "arguments": { + "file": "/index.ts", + "includeLinePosition": true + }, + "command": "semanticDiagnosticsSync" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "semanticDiagnosticsSync", + "request_seq": 13, + "success": true, + "body": [ + { + "message": "Cannot find name 'useMemo'.", + "start": 0, + "length": 7, + "category": "error", + "code": 2304, + "startLocation": { + "line": 1, + "offset": 1 + }, + "endLocation": { + "line": 1, + "offset": 8 + } + } + ] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 14, + "type": "request", + "arguments": { + "file": "/index.ts", + "includeLinePosition": true + }, + "command": "suggestionDiagnosticsSync" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "suggestionDiagnosticsSync", + "request_seq": 14, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 15, + "type": "request", + "arguments": { + "file": "/index.ts", + "startLine": 1, + "startOffset": 1, + "endLine": 1, + "endOffset": 8, + "errorCodes": [ + 2304 + ] + }, + "command": "getCodeFixes" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "getCodeFixes", + "request_seq": 15, + "success": true, + "body": [] + } \ No newline at end of file diff --git a/tests/baselines/reference/tsserver/fourslashServer/autoImportPackageJsonFilterExistingImport2.js b/tests/baselines/reference/tsserver/fourslashServer/autoImportPackageJsonFilterExistingImport2.js new file mode 100644 index 0000000000000..e1ecc8d40548f --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/autoImportPackageJsonFilterExistingImport2.js @@ -0,0 +1,3094 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +//// [/index.ts] +useMemo + +//// [/lib.d.ts] +lib.d.ts-Text + +//// [/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + +//// [/node_modules/@types/react/index.d.ts] +export declare function useMemo(): void; +export declare function useState(): void; + +//// [/package.json] +{} + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/node_modules/@types/react/index.d.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /node_modules/@types/react/index.d.ts ProjectRootPath: undefined:: Result: undefined +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /node_modules/@types/react/package.json 2000 undefined Project: /dev/null/inferredProject1* WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /node_modules/@types/react/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /node_modules/@types/react/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /node_modules/@types/react/index.d.ts SVC-1-0 "export declare function useMemo(): void;\nexport declare function useState(): void;" + + + ../../../lib.d.ts + Default library for target 'es5' + ../../../lib.decorators.d.ts + Library referenced via 'decorators' from file '../../../lib.d.ts' + ../../../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../../../lib.d.ts' + index.d.ts + Root file specified for compilation + Entry point for implicit type library 'react' + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /node_modules/@types/react/index.d.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "open", + "request_seq": 0, + "success": true, + "performanceData": { + "updateGraphDurationMs": * + } + } +After Request +watchedFiles:: +/lib.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} +/node_modules/@types/react/package.json: *new* + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +/node_modules/@types/react/node_modules/@types: *new* + {} + +Projects:: +/dev/null/inferredProject1* (Inferred) *new* + projectStateVersion: 1 + projectProgramVersion: 1 + +ScriptInfos:: +/lib.d.ts *new* + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/lib.decorators.d.ts *new* + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/lib.decorators.legacy.d.ts *new* + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/node_modules/@types/react/index.d.ts (Open) *new* + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject1* *default* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "file": "/index.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /index.ts ProjectRootPath: undefined:: Result: undefined +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject2* +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /node_modules/@types/react/package.json 2000 undefined Project: /dev/null/inferredProject2* WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject2* projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject2*' (Inferred) +Info seq [hh:mm:ss:mss] Files (5) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /index.ts SVC-1-0 "useMemo" + /node_modules/@types/react/index.d.ts SVC-1-0 "export declare function useMemo(): void;\nexport declare function useState(): void;" + + + lib.d.ts + Default library for target 'es5' + lib.decorators.d.ts + Library referenced via 'decorators' from file 'lib.d.ts' + lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file 'lib.d.ts' + index.ts + Root file specified for compilation + node_modules/@types/react/index.d.ts + Entry point for implicit type library 'react' + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /package.json 250 undefined WatchType: package.json file +Info seq [hh:mm:ss:mss] `remove Project:: +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts + /lib.decorators.d.ts + /lib.decorators.legacy.d.ts + /node_modules/@types/react/index.d.ts + + + ../../../lib.d.ts + Default library for target 'es5' + ../../../lib.decorators.d.ts + Library referenced via 'decorators' from file '../../../lib.d.ts' + ../../../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../../../lib.d.ts' + index.d.ts + Root file specified for compilation + Entry point for implicit type library 'react' + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /node_modules/@types/react/package.json 2000 undefined Project: /dev/null/inferredProject1* WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /node_modules/@types/react/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /node_modules/@types/react/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject2*' (Inferred) +Info seq [hh:mm:ss:mss] Files (5) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /node_modules/@types/react/index.d.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject2* +Info seq [hh:mm:ss:mss] FileName: /index.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject2* +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "open", + "request_seq": 1, + "success": true, + "performanceData": { + "updateGraphDurationMs": * + } + } +After Request +watchedFiles:: +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/node_modules/@types/react/package.json: + {"pollingInterval":2000} *new* +/package.json: *new* + {"pollingInterval":250} + +watchedFiles *deleted*:: +/node_modules/@types/react/package.json: + {"pollingInterval":2000} + +watchedDirectoriesRecursive *deleted*:: +/node_modules/@types/react/node_modules/@types: + {} + +Projects:: +/dev/null/inferredProject1* (Inferred) *deleted* + projectStateVersion: 2 *changed* + projectProgramVersion: 1 + dirty: true *changed* + isClosed: true *changed* + isOrphan: true *changed* +/dev/null/inferredProject2* (Inferred) *new* + projectStateVersion: 1 + projectProgramVersion: 1 + +ScriptInfos:: +/index.ts (Open) *new* + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject2* *default* +/lib.d.ts *changed* + version: Text-1 + containingProjects: 1 *changed* + /dev/null/inferredProject2* *new* + /dev/null/inferredProject1* *deleted* +/lib.decorators.d.ts *changed* + version: Text-1 + containingProjects: 1 *changed* + /dev/null/inferredProject2* *new* + /dev/null/inferredProject1* *deleted* +/lib.decorators.legacy.d.ts *changed* + version: Text-1 + containingProjects: 1 *changed* + /dev/null/inferredProject2* *new* + /dev/null/inferredProject1* *deleted* +/node_modules/@types/react/index.d.ts (Open) *changed* + version: SVC-1-0 + containingProjects: 1 *changed* + /dev/null/inferredProject2* *default* *new* + /dev/null/inferredProject1* *deleted* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 2, + "type": "request", + "arguments": { + "preferences": {} + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 2, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 3, + "type": "request", + "arguments": { + "file": "/index.ts", + "includeLinePosition": true + }, + "command": "syntacticDiagnosticsSync" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "syntacticDiagnosticsSync", + "request_seq": 3, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 4, + "type": "request", + "arguments": { + "file": "/index.ts", + "includeLinePosition": true + }, + "command": "semanticDiagnosticsSync" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "semanticDiagnosticsSync", + "request_seq": 4, + "success": true, + "body": [ + { + "message": "Cannot find name 'useMemo'.", + "start": 0, + "length": 7, + "category": "error", + "code": 2304, + "startLocation": { + "line": 1, + "offset": 1 + }, + "endLocation": { + "line": 1, + "offset": 8 + } + } + ] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 5, + "type": "request", + "arguments": { + "file": "/index.ts", + "includeLinePosition": true + }, + "command": "suggestionDiagnosticsSync" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "suggestionDiagnosticsSync", + "request_seq": 5, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 6, + "type": "request", + "arguments": { + "file": "/index.ts", + "startLine": 1, + "startOffset": 1, + "endLine": 1, + "endOffset": 8, + "errorCodes": [ + 2304 + ] + }, + "command": "getCodeFixes" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "getCodeFixes", + "request_seq": 6, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 7, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 1, + "endLine": 1, + "endOffset": 1, + "insertString": "" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "change", + "request_seq": 7, + "success": true + } +After Request +Projects:: +/dev/null/inferredProject2* (Inferred) *changed* + projectStateVersion: 2 *changed* + projectProgramVersion: 1 + dirty: true *changed* + +ScriptInfos:: +/index.ts (Open) *changed* + version: SVC-1-1 *changed* + containingProjects: 1 + /dev/null/inferredProject2* *default* +/lib.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/lib.decorators.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/lib.decorators.legacy.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/node_modules/@types/react/index.d.ts (Open) + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject2* *default* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 8, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 1, + "endLine": 1, + "endOffset": 1, + "insertString": "i" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "change", + "request_seq": 8, + "success": true + } +After Request +ScriptInfos:: +/index.ts (Open) *changed* + version: SVC-1-2 *changed* + containingProjects: 1 + /dev/null/inferredProject2* *default* +/lib.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/lib.decorators.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/lib.decorators.legacy.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/node_modules/@types/react/index.d.ts (Open) + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject2* *default* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 9, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 2, + "key": "i" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 9, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 10, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 2, + "endLine": 1, + "endOffset": 2, + "insertString": "m" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "change", + "request_seq": 10, + "success": true + } +After Request +ScriptInfos:: +/index.ts (Open) *changed* + version: SVC-1-3 *changed* + containingProjects: 1 + /dev/null/inferredProject2* *default* +/lib.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/lib.decorators.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/lib.decorators.legacy.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/node_modules/@types/react/index.d.ts (Open) + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject2* *default* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 11, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 3, + "key": "m" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 11, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 12, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 3, + "endLine": 1, + "endOffset": 3, + "insertString": "p" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "change", + "request_seq": 12, + "success": true + } +After Request +ScriptInfos:: +/index.ts (Open) *changed* + version: SVC-1-4 *changed* + containingProjects: 1 + /dev/null/inferredProject2* *default* +/lib.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/lib.decorators.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/lib.decorators.legacy.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/node_modules/@types/react/index.d.ts (Open) + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject2* *default* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 13, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 4, + "key": "p" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 13, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 14, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 4, + "endLine": 1, + "endOffset": 4, + "insertString": "o" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "change", + "request_seq": 14, + "success": true + } +After Request +ScriptInfos:: +/index.ts (Open) *changed* + version: SVC-1-5 *changed* + containingProjects: 1 + /dev/null/inferredProject2* *default* +/lib.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/lib.decorators.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/lib.decorators.legacy.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/node_modules/@types/react/index.d.ts (Open) + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject2* *default* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 15, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 5, + "key": "o" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 15, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 16, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 5, + "endLine": 1, + "endOffset": 5, + "insertString": "r" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "change", + "request_seq": 16, + "success": true + } +After Request +ScriptInfos:: +/index.ts (Open) *changed* + version: SVC-1-6 *changed* + containingProjects: 1 + /dev/null/inferredProject2* *default* +/lib.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/lib.decorators.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/lib.decorators.legacy.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/node_modules/@types/react/index.d.ts (Open) + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject2* *default* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 17, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 6, + "key": "r" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 17, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 18, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 6, + "endLine": 1, + "endOffset": 6, + "insertString": "t" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "change", + "request_seq": 18, + "success": true + } +After Request +ScriptInfos:: +/index.ts (Open) *changed* + version: SVC-1-7 *changed* + containingProjects: 1 + /dev/null/inferredProject2* *default* +/lib.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/lib.decorators.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/lib.decorators.legacy.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/node_modules/@types/react/index.d.ts (Open) + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject2* *default* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 19, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 7, + "key": "t" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 19, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 20, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 7, + "endLine": 1, + "endOffset": 7, + "insertString": " " + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "change", + "request_seq": 20, + "success": true + } +After Request +ScriptInfos:: +/index.ts (Open) *changed* + version: SVC-1-8 *changed* + containingProjects: 1 + /dev/null/inferredProject2* *default* +/lib.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/lib.decorators.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/lib.decorators.legacy.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/node_modules/@types/react/index.d.ts (Open) + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject2* *default* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 21, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 8, + "key": " " + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 21, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 22, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 8, + "endLine": 1, + "endOffset": 8, + "insertString": "{" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "change", + "request_seq": 22, + "success": true + } +After Request +ScriptInfos:: +/index.ts (Open) *changed* + version: SVC-1-9 *changed* + containingProjects: 1 + /dev/null/inferredProject2* *default* +/lib.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/lib.decorators.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/lib.decorators.legacy.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/node_modules/@types/react/index.d.ts (Open) + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject2* *default* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 23, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 9, + "key": "{" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 23, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 24, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 9, + "endLine": 1, + "endOffset": 9, + "insertString": " " + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "change", + "request_seq": 24, + "success": true + } +After Request +ScriptInfos:: +/index.ts (Open) *changed* + version: SVC-1-10 *changed* + containingProjects: 1 + /dev/null/inferredProject2* *default* +/lib.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/lib.decorators.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/lib.decorators.legacy.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/node_modules/@types/react/index.d.ts (Open) + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject2* *default* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 25, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 10, + "key": " " + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 25, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 26, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 10, + "endLine": 1, + "endOffset": 10, + "insertString": "u" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "change", + "request_seq": 26, + "success": true + } +After Request +ScriptInfos:: +/index.ts (Open) *changed* + version: SVC-1-11 *changed* + containingProjects: 1 + /dev/null/inferredProject2* *default* +/lib.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/lib.decorators.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/lib.decorators.legacy.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/node_modules/@types/react/index.d.ts (Open) + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject2* *default* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 27, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 11, + "key": "u" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 27, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 28, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 11, + "endLine": 1, + "endOffset": 11, + "insertString": "s" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "change", + "request_seq": 28, + "success": true + } +After Request +ScriptInfos:: +/index.ts (Open) *changed* + version: SVC-1-12 *changed* + containingProjects: 1 + /dev/null/inferredProject2* *default* +/lib.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/lib.decorators.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/lib.decorators.legacy.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/node_modules/@types/react/index.d.ts (Open) + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject2* *default* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 29, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 12, + "key": "s" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 29, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 30, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 12, + "endLine": 1, + "endOffset": 12, + "insertString": "e" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "change", + "request_seq": 30, + "success": true + } +After Request +ScriptInfos:: +/index.ts (Open) *changed* + version: SVC-1-13 *changed* + containingProjects: 1 + /dev/null/inferredProject2* *default* +/lib.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/lib.decorators.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/lib.decorators.legacy.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/node_modules/@types/react/index.d.ts (Open) + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject2* *default* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 31, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 13, + "key": "e" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 31, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 32, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 13, + "endLine": 1, + "endOffset": 13, + "insertString": "S" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "change", + "request_seq": 32, + "success": true + } +After Request +ScriptInfos:: +/index.ts (Open) *changed* + version: SVC-1-14 *changed* + containingProjects: 1 + /dev/null/inferredProject2* *default* +/lib.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/lib.decorators.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/lib.decorators.legacy.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/node_modules/@types/react/index.d.ts (Open) + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject2* *default* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 33, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 14, + "key": "S" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 33, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 34, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 14, + "endLine": 1, + "endOffset": 14, + "insertString": "t" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "change", + "request_seq": 34, + "success": true + } +After Request +ScriptInfos:: +/index.ts (Open) *changed* + version: SVC-1-15 *changed* + containingProjects: 1 + /dev/null/inferredProject2* *default* +/lib.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/lib.decorators.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/lib.decorators.legacy.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/node_modules/@types/react/index.d.ts (Open) + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject2* *default* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 35, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 15, + "key": "t" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 35, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 36, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 15, + "endLine": 1, + "endOffset": 15, + "insertString": "a" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "change", + "request_seq": 36, + "success": true + } +After Request +ScriptInfos:: +/index.ts (Open) *changed* + version: SVC-1-16 *changed* + containingProjects: 1 + /dev/null/inferredProject2* *default* +/lib.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/lib.decorators.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/lib.decorators.legacy.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/node_modules/@types/react/index.d.ts (Open) + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject2* *default* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 37, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 16, + "key": "a" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 37, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 38, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 16, + "endLine": 1, + "endOffset": 16, + "insertString": "t" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "change", + "request_seq": 38, + "success": true + } +After Request +ScriptInfos:: +/index.ts (Open) *changed* + version: SVC-1-17 *changed* + containingProjects: 1 + /dev/null/inferredProject2* *default* +/lib.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/lib.decorators.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/lib.decorators.legacy.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/node_modules/@types/react/index.d.ts (Open) + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject2* *default* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 39, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 17, + "key": "t" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 39, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 40, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 17, + "endLine": 1, + "endOffset": 17, + "insertString": "e" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "change", + "request_seq": 40, + "success": true + } +After Request +ScriptInfos:: +/index.ts (Open) *changed* + version: SVC-1-18 *changed* + containingProjects: 1 + /dev/null/inferredProject2* *default* +/lib.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/lib.decorators.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/lib.decorators.legacy.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/node_modules/@types/react/index.d.ts (Open) + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject2* *default* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 41, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 18, + "key": "e" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 41, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 42, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 18, + "endLine": 1, + "endOffset": 18, + "insertString": " " + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "change", + "request_seq": 42, + "success": true + } +After Request +ScriptInfos:: +/index.ts (Open) *changed* + version: SVC-1-19 *changed* + containingProjects: 1 + /dev/null/inferredProject2* *default* +/lib.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/lib.decorators.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/lib.decorators.legacy.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/node_modules/@types/react/index.d.ts (Open) + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject2* *default* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 43, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 19, + "key": " " + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 43, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 44, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 19, + "endLine": 1, + "endOffset": 19, + "insertString": "}" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "change", + "request_seq": 44, + "success": true + } +After Request +ScriptInfos:: +/index.ts (Open) *changed* + version: SVC-1-20 *changed* + containingProjects: 1 + /dev/null/inferredProject2* *default* +/lib.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/lib.decorators.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/lib.decorators.legacy.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/node_modules/@types/react/index.d.ts (Open) + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject2* *default* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 45, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 20, + "key": "}" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 45, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 46, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 20, + "endLine": 1, + "endOffset": 20, + "insertString": " " + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "change", + "request_seq": 46, + "success": true + } +After Request +ScriptInfos:: +/index.ts (Open) *changed* + version: SVC-1-21 *changed* + containingProjects: 1 + /dev/null/inferredProject2* *default* +/lib.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/lib.decorators.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/lib.decorators.legacy.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/node_modules/@types/react/index.d.ts (Open) + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject2* *default* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 47, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 21, + "key": " " + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 47, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 48, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 21, + "endLine": 1, + "endOffset": 21, + "insertString": "f" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "change", + "request_seq": 48, + "success": true + } +After Request +ScriptInfos:: +/index.ts (Open) *changed* + version: SVC-1-22 *changed* + containingProjects: 1 + /dev/null/inferredProject2* *default* +/lib.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/lib.decorators.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/lib.decorators.legacy.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/node_modules/@types/react/index.d.ts (Open) + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject2* *default* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 49, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 22, + "key": "f" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 49, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 50, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 22, + "endLine": 1, + "endOffset": 22, + "insertString": "r" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "change", + "request_seq": 50, + "success": true + } +After Request +ScriptInfos:: +/index.ts (Open) *changed* + version: SVC-1-23 *changed* + containingProjects: 1 + /dev/null/inferredProject2* *default* +/lib.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/lib.decorators.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/lib.decorators.legacy.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/node_modules/@types/react/index.d.ts (Open) + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject2* *default* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 51, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 23, + "key": "r" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 51, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 52, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 23, + "endLine": 1, + "endOffset": 23, + "insertString": "o" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "change", + "request_seq": 52, + "success": true + } +After Request +ScriptInfos:: +/index.ts (Open) *changed* + version: SVC-1-24 *changed* + containingProjects: 1 + /dev/null/inferredProject2* *default* +/lib.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/lib.decorators.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/lib.decorators.legacy.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/node_modules/@types/react/index.d.ts (Open) + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject2* *default* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 53, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 24, + "key": "o" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 53, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 54, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 24, + "endLine": 1, + "endOffset": 24, + "insertString": "m" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "change", + "request_seq": 54, + "success": true + } +After Request +ScriptInfos:: +/index.ts (Open) *changed* + version: SVC-1-25 *changed* + containingProjects: 1 + /dev/null/inferredProject2* *default* +/lib.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/lib.decorators.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/lib.decorators.legacy.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/node_modules/@types/react/index.d.ts (Open) + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject2* *default* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 55, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 25, + "key": "m" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 55, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 56, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 25, + "endLine": 1, + "endOffset": 25, + "insertString": " " + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "change", + "request_seq": 56, + "success": true + } +After Request +ScriptInfos:: +/index.ts (Open) *changed* + version: SVC-1-26 *changed* + containingProjects: 1 + /dev/null/inferredProject2* *default* +/lib.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/lib.decorators.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/lib.decorators.legacy.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/node_modules/@types/react/index.d.ts (Open) + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject2* *default* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 57, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 26, + "key": " " + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 57, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 58, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 26, + "endLine": 1, + "endOffset": 26, + "insertString": "\"" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "change", + "request_seq": 58, + "success": true + } +After Request +ScriptInfos:: +/index.ts (Open) *changed* + version: SVC-1-27 *changed* + containingProjects: 1 + /dev/null/inferredProject2* *default* +/lib.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/lib.decorators.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/lib.decorators.legacy.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/node_modules/@types/react/index.d.ts (Open) + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject2* *default* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 59, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 27, + "key": "\"" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 59, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 60, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 27, + "endLine": 1, + "endOffset": 27, + "insertString": "r" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "change", + "request_seq": 60, + "success": true + } +After Request +ScriptInfos:: +/index.ts (Open) *changed* + version: SVC-1-28 *changed* + containingProjects: 1 + /dev/null/inferredProject2* *default* +/lib.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/lib.decorators.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/lib.decorators.legacy.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/node_modules/@types/react/index.d.ts (Open) + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject2* *default* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 61, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 28, + "key": "r" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 61, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 62, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 28, + "endLine": 1, + "endOffset": 28, + "insertString": "e" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "change", + "request_seq": 62, + "success": true + } +After Request +ScriptInfos:: +/index.ts (Open) *changed* + version: SVC-1-29 *changed* + containingProjects: 1 + /dev/null/inferredProject2* *default* +/lib.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/lib.decorators.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/lib.decorators.legacy.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/node_modules/@types/react/index.d.ts (Open) + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject2* *default* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 63, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 29, + "key": "e" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 63, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 64, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 29, + "endLine": 1, + "endOffset": 29, + "insertString": "a" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "change", + "request_seq": 64, + "success": true + } +After Request +ScriptInfos:: +/index.ts (Open) *changed* + version: SVC-1-30 *changed* + containingProjects: 1 + /dev/null/inferredProject2* *default* +/lib.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/lib.decorators.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/lib.decorators.legacy.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/node_modules/@types/react/index.d.ts (Open) + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject2* *default* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 65, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 30, + "key": "a" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 65, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 66, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 30, + "endLine": 1, + "endOffset": 30, + "insertString": "c" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "change", + "request_seq": 66, + "success": true + } +After Request +ScriptInfos:: +/index.ts (Open) *changed* + version: SVC-1-31 *changed* + containingProjects: 1 + /dev/null/inferredProject2* *default* +/lib.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/lib.decorators.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/lib.decorators.legacy.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/node_modules/@types/react/index.d.ts (Open) + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject2* *default* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 67, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 31, + "key": "c" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 67, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 68, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 31, + "endLine": 1, + "endOffset": 31, + "insertString": "t" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "change", + "request_seq": 68, + "success": true + } +After Request +ScriptInfos:: +/index.ts (Open) *changed* + version: SVC-1-32 *changed* + containingProjects: 1 + /dev/null/inferredProject2* *default* +/lib.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/lib.decorators.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/lib.decorators.legacy.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/node_modules/@types/react/index.d.ts (Open) + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject2* *default* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 69, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 32, + "key": "t" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 69, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 70, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 32, + "endLine": 1, + "endOffset": 32, + "insertString": "\"" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "change", + "request_seq": 70, + "success": true + } +After Request +ScriptInfos:: +/index.ts (Open) *changed* + version: SVC-1-33 *changed* + containingProjects: 1 + /dev/null/inferredProject2* *default* +/lib.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/lib.decorators.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/lib.decorators.legacy.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/node_modules/@types/react/index.d.ts (Open) + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject2* *default* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 71, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 33, + "key": "\"" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 71, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 72, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 33, + "endLine": 1, + "endOffset": 33, + "insertString": ";" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "change", + "request_seq": 72, + "success": true + } +After Request +ScriptInfos:: +/index.ts (Open) *changed* + version: SVC-1-34 *changed* + containingProjects: 1 + /dev/null/inferredProject2* *default* +/lib.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/lib.decorators.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/lib.decorators.legacy.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/node_modules/@types/react/index.d.ts (Open) + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject2* *default* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 73, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 34, + "key": ";" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 73, + "success": true, + "body": [ + { + "start": { + "line": 1, + "offset": 34 + }, + "end": { + "line": 1, + "offset": 34 + }, + "newText": " " + } + ] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 74, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 34, + "endLine": 1, + "endOffset": 34, + "insertString": " " + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "change", + "request_seq": 74, + "success": true + } +After Request +ScriptInfos:: +/index.ts (Open) *changed* + version: SVC-1-35 *changed* + containingProjects: 1 + /dev/null/inferredProject2* *default* +/lib.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/lib.decorators.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/lib.decorators.legacy.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/node_modules/@types/react/index.d.ts (Open) + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject2* *default* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 75, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 35, + "endLine": 1, + "endOffset": 35, + "insertString": "\n" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "change", + "request_seq": 75, + "success": true + } +After Request +ScriptInfos:: +/index.ts (Open) *changed* + version: SVC-1-36 *changed* + containingProjects: 1 + /dev/null/inferredProject2* *default* +/lib.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/lib.decorators.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/lib.decorators.legacy.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/node_modules/@types/react/index.d.ts (Open) + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject2* *default* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 76, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 2, + "offset": 1, + "key": "\n" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 76, + "success": true, + "body": [ + { + "start": { + "line": 1, + "offset": 34 + }, + "end": { + "line": 1, + "offset": 35 + }, + "newText": "" + } + ] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 77, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 34, + "endLine": 1, + "endOffset": 35, + "insertString": "" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "change", + "request_seq": 77, + "success": true + } +After Request +ScriptInfos:: +/index.ts (Open) *changed* + version: SVC-1-37 *changed* + containingProjects: 1 + /dev/null/inferredProject2* *default* +/lib.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/lib.decorators.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/lib.decorators.legacy.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/node_modules/@types/react/index.d.ts (Open) + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject2* *default* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 78, + "type": "request", + "arguments": { + "preferences": {} + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 78, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 79, + "type": "request", + "arguments": { + "file": "/index.ts", + "includeLinePosition": true + }, + "command": "syntacticDiagnosticsSync" + } +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject2* +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject2* projectStateVersion: 2 projectProgramVersion: 1 structureChanged: true structureIsReused:: SafeModules Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject2*' (Inferred) +Info seq [hh:mm:ss:mss] Files (5) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /node_modules/@types/react/index.d.ts SVC-1-0 "export declare function useMemo(): void;\nexport declare function useState(): void;" + /index.ts SVC-1-37 "import { useState } from \"react\";\nuseMemo" + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "syntacticDiagnosticsSync", + "request_seq": 79, + "success": true, + "performanceData": { + "updateGraphDurationMs": * + }, + "body": [] + } +After Request +Projects:: +/dev/null/inferredProject2* (Inferred) *changed* + projectStateVersion: 2 + projectProgramVersion: 2 *changed* + dirty: false *changed* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 80, + "type": "request", + "arguments": { + "file": "/index.ts", + "includeLinePosition": true + }, + "command": "semanticDiagnosticsSync" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "semanticDiagnosticsSync", + "request_seq": 80, + "success": true, + "body": [ + { + "message": "Cannot find name 'useMemo'.", + "start": 34, + "length": 7, + "category": "error", + "code": 2304, + "startLocation": { + "line": 2, + "offset": 1 + }, + "endLocation": { + "line": 2, + "offset": 8 + } + } + ] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 81, + "type": "request", + "arguments": { + "file": "/index.ts", + "includeLinePosition": true + }, + "command": "suggestionDiagnosticsSync" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "suggestionDiagnosticsSync", + "request_seq": 81, + "success": true, + "body": [ + { + "message": "'useState' is declared but its value is never read.", + "start": 0, + "length": 33, + "category": "suggestion", + "code": 6133, + "startLocation": { + "line": 1, + "offset": 1 + }, + "endLocation": { + "line": 1, + "offset": 34 + }, + "reportsUnnecessary": true + } + ] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 82, + "type": "request", + "arguments": { + "file": "/index.ts", + "startLine": 2, + "startOffset": 1, + "endLine": 2, + "endOffset": 8, + "errorCodes": [ + 2304 + ] + }, + "command": "getCodeFixes" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "getCodeFixes", + "request_seq": 82, + "success": true, + "body": [ + { + "fixName": "import", + "description": "Update import from \"react\"", + "changes": [ + { + "fileName": "/index.ts", + "textChanges": [ + { + "start": { + "line": 1, + "offset": 10 + }, + "end": { + "line": 1, + "offset": 10 + }, + "newText": "useMemo, " + } + ] + } + ] + } + ] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 83, + "type": "request", + "arguments": { + "file": "/index.ts", + "startLine": 1, + "startOffset": 1, + "endLine": 1, + "endOffset": 34, + "errorCodes": [ + 6133 + ] + }, + "command": "getCodeFixes" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "getCodeFixes", + "request_seq": 83, + "success": true, + "body": [ + { + "fixName": "unusedIdentifier", + "description": "Remove import from 'react'", + "changes": [ + { + "fileName": "/index.ts", + "textChanges": [ + { + "start": { + "line": 1, + "offset": 1 + }, + "end": { + "line": 2, + "offset": 1 + }, + "newText": "" + } + ] + } + ] + } + ] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 84, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 10, + "endLine": 1, + "endOffset": 10, + "insertString": "useMemo, " + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "change", + "request_seq": 84, + "success": true + } +After Request +Projects:: +/dev/null/inferredProject2* (Inferred) *changed* + projectStateVersion: 3 *changed* + projectProgramVersion: 2 + dirty: true *changed* + +ScriptInfos:: +/index.ts (Open) *changed* + version: SVC-1-38 *changed* + containingProjects: 1 + /dev/null/inferredProject2* *default* +/lib.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/lib.decorators.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/lib.decorators.legacy.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/node_modules/@types/react/index.d.ts (Open) + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject2* *default* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 85, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 10, + "endLine": 1, + "endOffset": 19, + "insertString": "" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "change", + "request_seq": 85, + "success": true + } +After Request +ScriptInfos:: +/index.ts (Open) *changed* + version: SVC-1-39 *changed* + containingProjects: 1 + /dev/null/inferredProject2* *default* +/lib.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/lib.decorators.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/lib.decorators.legacy.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/node_modules/@types/react/index.d.ts (Open) + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject2* *default* diff --git a/tests/baselines/reference/tsserver/fourslashServer/autoImportPackageJsonFilterExistingImport3.js b/tests/baselines/reference/tsserver/fourslashServer/autoImportPackageJsonFilterExistingImport3.js new file mode 100644 index 0000000000000..00d659a154e05 --- /dev/null +++ b/tests/baselines/reference/tsserver/fourslashServer/autoImportPackageJsonFilterExistingImport3.js @@ -0,0 +1,3294 @@ +currentDirectory:: / useCaseSensitiveFileNames: false +Info seq [hh:mm:ss:mss] Provided types map file "/typesMap.json" doesn't exist +//// [/index.ts] +readFile + +//// [/lib.d.ts] +lib.d.ts-Text + +//// [/lib.decorators.d.ts] +lib.decorators.d.ts-Text + +//// [/lib.decorators.legacy.d.ts] +lib.decorators.legacy.d.ts-Text + +//// [/node_modules/@types/node/index.d.ts] +declare module "node:fs" { + export function readFile(): void; + export function writeFile(): void; +} + +//// [/package.json] +{} + + +Info seq [hh:mm:ss:mss] request: + { + "seq": 0, + "type": "request", + "arguments": { + "file": "/node_modules/@types/node/index.d.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /node_modules/@types/node/index.d.ts ProjectRootPath: undefined:: Result: undefined +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /lib.decorators.legacy.d.ts 500 undefined WatchType: Closed Script info +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /node_modules/@types/node/package.json 2000 undefined Project: /dev/null/inferredProject1* WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Added:: WatchInfo: /node_modules/@types/node/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /node_modules/@types/node/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject1* projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /node_modules/@types/node/index.d.ts SVC-1-0 "declare module \"node:fs\" {\n export function readFile(): void;\n export function writeFile(): void;\n}" + + + ../../../lib.d.ts + Default library for target 'es5' + ../../../lib.decorators.d.ts + Library referenced via 'decorators' from file '../../../lib.d.ts' + ../../../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../../../lib.d.ts' + index.d.ts + Root file specified for compilation + Entry point for implicit type library 'node' + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /node_modules/@types/node/index.d.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject1* +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "open", + "request_seq": 0, + "success": true, + "performanceData": { + "updateGraphDurationMs": * + } + } +After Request +watchedFiles:: +/lib.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.d.ts: *new* + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: *new* + {"pollingInterval":500} +/node_modules/@types/node/package.json: *new* + {"pollingInterval":2000} + +watchedDirectoriesRecursive:: +/node_modules/@types/node/node_modules/@types: *new* + {} + +Projects:: +/dev/null/inferredProject1* (Inferred) *new* + projectStateVersion: 1 + projectProgramVersion: 1 + +ScriptInfos:: +/lib.d.ts *new* + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/lib.decorators.d.ts *new* + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/lib.decorators.legacy.d.ts *new* + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject1* +/node_modules/@types/node/index.d.ts (Open) *new* + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject1* *default* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 1, + "type": "request", + "arguments": { + "file": "/index.ts" + }, + "command": "open" + } +Info seq [hh:mm:ss:mss] getConfigFileNameForFile:: File: /index.ts ProjectRootPath: undefined:: Result: undefined +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject2* +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /node_modules/@types/node/package.json 2000 undefined Project: /dev/null/inferredProject2* WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject2* projectStateVersion: 1 projectProgramVersion: 0 structureChanged: true structureIsReused:: Not Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject2*' (Inferred) +Info seq [hh:mm:ss:mss] Files (5) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /index.ts SVC-1-0 "readFile" + /node_modules/@types/node/index.d.ts SVC-1-0 "declare module \"node:fs\" {\n export function readFile(): void;\n export function writeFile(): void;\n}" + + + lib.d.ts + Default library for target 'es5' + lib.decorators.d.ts + Library referenced via 'decorators' from file 'lib.d.ts' + lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file 'lib.d.ts' + index.ts + Root file specified for compilation + node_modules/@types/node/index.d.ts + Entry point for implicit type library 'node' + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] FileWatcher:: Added:: WatchInfo: /package.json 250 undefined WatchType: package.json file +Info seq [hh:mm:ss:mss] `remove Project:: +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject1*' (Inferred) +Info seq [hh:mm:ss:mss] Files (4) + /lib.d.ts + /lib.decorators.d.ts + /lib.decorators.legacy.d.ts + /node_modules/@types/node/index.d.ts + + + ../../../lib.d.ts + Default library for target 'es5' + ../../../lib.decorators.d.ts + Library referenced via 'decorators' from file '../../../lib.d.ts' + ../../../lib.decorators.legacy.d.ts + Library referenced via 'decorators.legacy' from file '../../../lib.d.ts' + index.d.ts + Root file specified for compilation + Entry point for implicit type library 'node' + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] FileWatcher:: Close:: WatchInfo: /node_modules/@types/node/package.json 2000 undefined Project: /dev/null/inferredProject1* WatchType: File location affecting resolution +Info seq [hh:mm:ss:mss] DirectoryWatcher:: Close:: WatchInfo: /node_modules/@types/node/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Elapsed:: *ms DirectoryWatcher:: Close:: WatchInfo: /node_modules/@types/node/node_modules/@types 1 undefined Project: /dev/null/inferredProject1* WatchType: Type roots +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject2*' (Inferred) +Info seq [hh:mm:ss:mss] Files (5) + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] Open files: +Info seq [hh:mm:ss:mss] FileName: /node_modules/@types/node/index.d.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject2* +Info seq [hh:mm:ss:mss] FileName: /index.ts ProjectRootPath: undefined +Info seq [hh:mm:ss:mss] Projects: /dev/null/inferredProject2* +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "open", + "request_seq": 1, + "success": true, + "performanceData": { + "updateGraphDurationMs": * + } + } +After Request +watchedFiles:: +/lib.d.ts: + {"pollingInterval":500} +/lib.decorators.d.ts: + {"pollingInterval":500} +/lib.decorators.legacy.d.ts: + {"pollingInterval":500} +/node_modules/@types/node/package.json: + {"pollingInterval":2000} *new* +/package.json: *new* + {"pollingInterval":250} + +watchedFiles *deleted*:: +/node_modules/@types/node/package.json: + {"pollingInterval":2000} + +watchedDirectoriesRecursive *deleted*:: +/node_modules/@types/node/node_modules/@types: + {} + +Projects:: +/dev/null/inferredProject1* (Inferred) *deleted* + projectStateVersion: 2 *changed* + projectProgramVersion: 1 + dirty: true *changed* + isClosed: true *changed* + isOrphan: true *changed* +/dev/null/inferredProject2* (Inferred) *new* + projectStateVersion: 1 + projectProgramVersion: 1 + +ScriptInfos:: +/index.ts (Open) *new* + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject2* *default* +/lib.d.ts *changed* + version: Text-1 + containingProjects: 1 *changed* + /dev/null/inferredProject2* *new* + /dev/null/inferredProject1* *deleted* +/lib.decorators.d.ts *changed* + version: Text-1 + containingProjects: 1 *changed* + /dev/null/inferredProject2* *new* + /dev/null/inferredProject1* *deleted* +/lib.decorators.legacy.d.ts *changed* + version: Text-1 + containingProjects: 1 *changed* + /dev/null/inferredProject2* *new* + /dev/null/inferredProject1* *deleted* +/node_modules/@types/node/index.d.ts (Open) *changed* + version: SVC-1-0 + containingProjects: 1 *changed* + /dev/null/inferredProject2* *default* *new* + /dev/null/inferredProject1* *deleted* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 2, + "type": "request", + "arguments": { + "preferences": {} + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 2, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 3, + "type": "request", + "arguments": { + "file": "/index.ts", + "includeLinePosition": true + }, + "command": "syntacticDiagnosticsSync" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "syntacticDiagnosticsSync", + "request_seq": 3, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 4, + "type": "request", + "arguments": { + "file": "/index.ts", + "includeLinePosition": true + }, + "command": "semanticDiagnosticsSync" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "semanticDiagnosticsSync", + "request_seq": 4, + "success": true, + "body": [ + { + "message": "Cannot find name 'readFile'.", + "start": 0, + "length": 8, + "category": "error", + "code": 2304, + "startLocation": { + "line": 1, + "offset": 1 + }, + "endLocation": { + "line": 1, + "offset": 9 + } + } + ] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 5, + "type": "request", + "arguments": { + "file": "/index.ts", + "includeLinePosition": true + }, + "command": "suggestionDiagnosticsSync" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "suggestionDiagnosticsSync", + "request_seq": 5, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 6, + "type": "request", + "arguments": { + "file": "/index.ts", + "startLine": 1, + "startOffset": 1, + "endLine": 1, + "endOffset": 9, + "errorCodes": [ + 2304 + ] + }, + "command": "getCodeFixes" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "getCodeFixes", + "request_seq": 6, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 7, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 1, + "endLine": 1, + "endOffset": 1, + "insertString": "" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "change", + "request_seq": 7, + "success": true + } +After Request +Projects:: +/dev/null/inferredProject2* (Inferred) *changed* + projectStateVersion: 2 *changed* + projectProgramVersion: 1 + dirty: true *changed* + +ScriptInfos:: +/index.ts (Open) *changed* + version: SVC-1-1 *changed* + containingProjects: 1 + /dev/null/inferredProject2* *default* +/lib.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/lib.decorators.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/lib.decorators.legacy.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/node_modules/@types/node/index.d.ts (Open) + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject2* *default* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 8, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 1, + "endLine": 1, + "endOffset": 1, + "insertString": "i" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "change", + "request_seq": 8, + "success": true + } +After Request +ScriptInfos:: +/index.ts (Open) *changed* + version: SVC-1-2 *changed* + containingProjects: 1 + /dev/null/inferredProject2* *default* +/lib.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/lib.decorators.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/lib.decorators.legacy.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/node_modules/@types/node/index.d.ts (Open) + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject2* *default* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 9, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 2, + "key": "i" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 9, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 10, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 2, + "endLine": 1, + "endOffset": 2, + "insertString": "m" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "change", + "request_seq": 10, + "success": true + } +After Request +ScriptInfos:: +/index.ts (Open) *changed* + version: SVC-1-3 *changed* + containingProjects: 1 + /dev/null/inferredProject2* *default* +/lib.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/lib.decorators.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/lib.decorators.legacy.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/node_modules/@types/node/index.d.ts (Open) + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject2* *default* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 11, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 3, + "key": "m" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 11, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 12, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 3, + "endLine": 1, + "endOffset": 3, + "insertString": "p" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "change", + "request_seq": 12, + "success": true + } +After Request +ScriptInfos:: +/index.ts (Open) *changed* + version: SVC-1-4 *changed* + containingProjects: 1 + /dev/null/inferredProject2* *default* +/lib.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/lib.decorators.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/lib.decorators.legacy.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/node_modules/@types/node/index.d.ts (Open) + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject2* *default* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 13, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 4, + "key": "p" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 13, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 14, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 4, + "endLine": 1, + "endOffset": 4, + "insertString": "o" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "change", + "request_seq": 14, + "success": true + } +After Request +ScriptInfos:: +/index.ts (Open) *changed* + version: SVC-1-5 *changed* + containingProjects: 1 + /dev/null/inferredProject2* *default* +/lib.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/lib.decorators.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/lib.decorators.legacy.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/node_modules/@types/node/index.d.ts (Open) + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject2* *default* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 15, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 5, + "key": "o" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 15, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 16, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 5, + "endLine": 1, + "endOffset": 5, + "insertString": "r" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "change", + "request_seq": 16, + "success": true + } +After Request +ScriptInfos:: +/index.ts (Open) *changed* + version: SVC-1-6 *changed* + containingProjects: 1 + /dev/null/inferredProject2* *default* +/lib.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/lib.decorators.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/lib.decorators.legacy.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/node_modules/@types/node/index.d.ts (Open) + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject2* *default* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 17, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 6, + "key": "r" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 17, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 18, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 6, + "endLine": 1, + "endOffset": 6, + "insertString": "t" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "change", + "request_seq": 18, + "success": true + } +After Request +ScriptInfos:: +/index.ts (Open) *changed* + version: SVC-1-7 *changed* + containingProjects: 1 + /dev/null/inferredProject2* *default* +/lib.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/lib.decorators.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/lib.decorators.legacy.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/node_modules/@types/node/index.d.ts (Open) + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject2* *default* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 19, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 7, + "key": "t" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 19, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 20, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 7, + "endLine": 1, + "endOffset": 7, + "insertString": " " + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "change", + "request_seq": 20, + "success": true + } +After Request +ScriptInfos:: +/index.ts (Open) *changed* + version: SVC-1-8 *changed* + containingProjects: 1 + /dev/null/inferredProject2* *default* +/lib.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/lib.decorators.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/lib.decorators.legacy.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/node_modules/@types/node/index.d.ts (Open) + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject2* *default* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 21, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 8, + "key": " " + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 21, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 22, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 8, + "endLine": 1, + "endOffset": 8, + "insertString": "{" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "change", + "request_seq": 22, + "success": true + } +After Request +ScriptInfos:: +/index.ts (Open) *changed* + version: SVC-1-9 *changed* + containingProjects: 1 + /dev/null/inferredProject2* *default* +/lib.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/lib.decorators.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/lib.decorators.legacy.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/node_modules/@types/node/index.d.ts (Open) + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject2* *default* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 23, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 9, + "key": "{" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 23, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 24, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 9, + "endLine": 1, + "endOffset": 9, + "insertString": " " + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "change", + "request_seq": 24, + "success": true + } +After Request +ScriptInfos:: +/index.ts (Open) *changed* + version: SVC-1-10 *changed* + containingProjects: 1 + /dev/null/inferredProject2* *default* +/lib.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/lib.decorators.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/lib.decorators.legacy.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/node_modules/@types/node/index.d.ts (Open) + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject2* *default* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 25, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 10, + "key": " " + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 25, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 26, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 10, + "endLine": 1, + "endOffset": 10, + "insertString": "w" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "change", + "request_seq": 26, + "success": true + } +After Request +ScriptInfos:: +/index.ts (Open) *changed* + version: SVC-1-11 *changed* + containingProjects: 1 + /dev/null/inferredProject2* *default* +/lib.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/lib.decorators.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/lib.decorators.legacy.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/node_modules/@types/node/index.d.ts (Open) + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject2* *default* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 27, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 11, + "key": "w" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 27, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 28, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 11, + "endLine": 1, + "endOffset": 11, + "insertString": "r" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "change", + "request_seq": 28, + "success": true + } +After Request +ScriptInfos:: +/index.ts (Open) *changed* + version: SVC-1-12 *changed* + containingProjects: 1 + /dev/null/inferredProject2* *default* +/lib.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/lib.decorators.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/lib.decorators.legacy.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/node_modules/@types/node/index.d.ts (Open) + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject2* *default* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 29, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 12, + "key": "r" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 29, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 30, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 12, + "endLine": 1, + "endOffset": 12, + "insertString": "i" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "change", + "request_seq": 30, + "success": true + } +After Request +ScriptInfos:: +/index.ts (Open) *changed* + version: SVC-1-13 *changed* + containingProjects: 1 + /dev/null/inferredProject2* *default* +/lib.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/lib.decorators.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/lib.decorators.legacy.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/node_modules/@types/node/index.d.ts (Open) + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject2* *default* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 31, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 13, + "key": "i" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 31, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 32, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 13, + "endLine": 1, + "endOffset": 13, + "insertString": "t" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "change", + "request_seq": 32, + "success": true + } +After Request +ScriptInfos:: +/index.ts (Open) *changed* + version: SVC-1-14 *changed* + containingProjects: 1 + /dev/null/inferredProject2* *default* +/lib.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/lib.decorators.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/lib.decorators.legacy.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/node_modules/@types/node/index.d.ts (Open) + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject2* *default* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 33, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 14, + "key": "t" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 33, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 34, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 14, + "endLine": 1, + "endOffset": 14, + "insertString": "e" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "change", + "request_seq": 34, + "success": true + } +After Request +ScriptInfos:: +/index.ts (Open) *changed* + version: SVC-1-15 *changed* + containingProjects: 1 + /dev/null/inferredProject2* *default* +/lib.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/lib.decorators.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/lib.decorators.legacy.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/node_modules/@types/node/index.d.ts (Open) + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject2* *default* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 35, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 15, + "key": "e" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 35, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 36, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 15, + "endLine": 1, + "endOffset": 15, + "insertString": "F" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "change", + "request_seq": 36, + "success": true + } +After Request +ScriptInfos:: +/index.ts (Open) *changed* + version: SVC-1-16 *changed* + containingProjects: 1 + /dev/null/inferredProject2* *default* +/lib.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/lib.decorators.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/lib.decorators.legacy.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/node_modules/@types/node/index.d.ts (Open) + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject2* *default* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 37, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 16, + "key": "F" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 37, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 38, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 16, + "endLine": 1, + "endOffset": 16, + "insertString": "i" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "change", + "request_seq": 38, + "success": true + } +After Request +ScriptInfos:: +/index.ts (Open) *changed* + version: SVC-1-17 *changed* + containingProjects: 1 + /dev/null/inferredProject2* *default* +/lib.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/lib.decorators.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/lib.decorators.legacy.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/node_modules/@types/node/index.d.ts (Open) + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject2* *default* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 39, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 17, + "key": "i" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 39, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 40, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 17, + "endLine": 1, + "endOffset": 17, + "insertString": "l" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "change", + "request_seq": 40, + "success": true + } +After Request +ScriptInfos:: +/index.ts (Open) *changed* + version: SVC-1-18 *changed* + containingProjects: 1 + /dev/null/inferredProject2* *default* +/lib.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/lib.decorators.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/lib.decorators.legacy.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/node_modules/@types/node/index.d.ts (Open) + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject2* *default* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 41, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 18, + "key": "l" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 41, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 42, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 18, + "endLine": 1, + "endOffset": 18, + "insertString": "e" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "change", + "request_seq": 42, + "success": true + } +After Request +ScriptInfos:: +/index.ts (Open) *changed* + version: SVC-1-19 *changed* + containingProjects: 1 + /dev/null/inferredProject2* *default* +/lib.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/lib.decorators.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/lib.decorators.legacy.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/node_modules/@types/node/index.d.ts (Open) + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject2* *default* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 43, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 19, + "key": "e" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 43, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 44, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 19, + "endLine": 1, + "endOffset": 19, + "insertString": " " + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "change", + "request_seq": 44, + "success": true + } +After Request +ScriptInfos:: +/index.ts (Open) *changed* + version: SVC-1-20 *changed* + containingProjects: 1 + /dev/null/inferredProject2* *default* +/lib.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/lib.decorators.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/lib.decorators.legacy.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/node_modules/@types/node/index.d.ts (Open) + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject2* *default* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 45, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 20, + "key": " " + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 45, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 46, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 20, + "endLine": 1, + "endOffset": 20, + "insertString": "}" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "change", + "request_seq": 46, + "success": true + } +After Request +ScriptInfos:: +/index.ts (Open) *changed* + version: SVC-1-21 *changed* + containingProjects: 1 + /dev/null/inferredProject2* *default* +/lib.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/lib.decorators.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/lib.decorators.legacy.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/node_modules/@types/node/index.d.ts (Open) + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject2* *default* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 47, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 21, + "key": "}" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 47, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 48, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 21, + "endLine": 1, + "endOffset": 21, + "insertString": " " + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "change", + "request_seq": 48, + "success": true + } +After Request +ScriptInfos:: +/index.ts (Open) *changed* + version: SVC-1-22 *changed* + containingProjects: 1 + /dev/null/inferredProject2* *default* +/lib.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/lib.decorators.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/lib.decorators.legacy.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/node_modules/@types/node/index.d.ts (Open) + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject2* *default* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 49, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 22, + "key": " " + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 49, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 50, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 22, + "endLine": 1, + "endOffset": 22, + "insertString": "f" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "change", + "request_seq": 50, + "success": true + } +After Request +ScriptInfos:: +/index.ts (Open) *changed* + version: SVC-1-23 *changed* + containingProjects: 1 + /dev/null/inferredProject2* *default* +/lib.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/lib.decorators.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/lib.decorators.legacy.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/node_modules/@types/node/index.d.ts (Open) + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject2* *default* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 51, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 23, + "key": "f" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 51, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 52, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 23, + "endLine": 1, + "endOffset": 23, + "insertString": "r" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "change", + "request_seq": 52, + "success": true + } +After Request +ScriptInfos:: +/index.ts (Open) *changed* + version: SVC-1-24 *changed* + containingProjects: 1 + /dev/null/inferredProject2* *default* +/lib.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/lib.decorators.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/lib.decorators.legacy.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/node_modules/@types/node/index.d.ts (Open) + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject2* *default* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 53, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 24, + "key": "r" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 53, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 54, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 24, + "endLine": 1, + "endOffset": 24, + "insertString": "o" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "change", + "request_seq": 54, + "success": true + } +After Request +ScriptInfos:: +/index.ts (Open) *changed* + version: SVC-1-25 *changed* + containingProjects: 1 + /dev/null/inferredProject2* *default* +/lib.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/lib.decorators.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/lib.decorators.legacy.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/node_modules/@types/node/index.d.ts (Open) + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject2* *default* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 55, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 25, + "key": "o" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 55, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 56, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 25, + "endLine": 1, + "endOffset": 25, + "insertString": "m" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "change", + "request_seq": 56, + "success": true + } +After Request +ScriptInfos:: +/index.ts (Open) *changed* + version: SVC-1-26 *changed* + containingProjects: 1 + /dev/null/inferredProject2* *default* +/lib.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/lib.decorators.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/lib.decorators.legacy.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/node_modules/@types/node/index.d.ts (Open) + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject2* *default* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 57, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 26, + "key": "m" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 57, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 58, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 26, + "endLine": 1, + "endOffset": 26, + "insertString": " " + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "change", + "request_seq": 58, + "success": true + } +After Request +ScriptInfos:: +/index.ts (Open) *changed* + version: SVC-1-27 *changed* + containingProjects: 1 + /dev/null/inferredProject2* *default* +/lib.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/lib.decorators.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/lib.decorators.legacy.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/node_modules/@types/node/index.d.ts (Open) + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject2* *default* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 59, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 27, + "key": " " + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 59, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 60, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 27, + "endLine": 1, + "endOffset": 27, + "insertString": "\"" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "change", + "request_seq": 60, + "success": true + } +After Request +ScriptInfos:: +/index.ts (Open) *changed* + version: SVC-1-28 *changed* + containingProjects: 1 + /dev/null/inferredProject2* *default* +/lib.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/lib.decorators.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/lib.decorators.legacy.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/node_modules/@types/node/index.d.ts (Open) + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject2* *default* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 61, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 28, + "key": "\"" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 61, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 62, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 28, + "endLine": 1, + "endOffset": 28, + "insertString": "n" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "change", + "request_seq": 62, + "success": true + } +After Request +ScriptInfos:: +/index.ts (Open) *changed* + version: SVC-1-29 *changed* + containingProjects: 1 + /dev/null/inferredProject2* *default* +/lib.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/lib.decorators.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/lib.decorators.legacy.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/node_modules/@types/node/index.d.ts (Open) + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject2* *default* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 63, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 29, + "key": "n" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 63, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 64, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 29, + "endLine": 1, + "endOffset": 29, + "insertString": "o" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "change", + "request_seq": 64, + "success": true + } +After Request +ScriptInfos:: +/index.ts (Open) *changed* + version: SVC-1-30 *changed* + containingProjects: 1 + /dev/null/inferredProject2* *default* +/lib.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/lib.decorators.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/lib.decorators.legacy.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/node_modules/@types/node/index.d.ts (Open) + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject2* *default* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 65, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 30, + "key": "o" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 65, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 66, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 30, + "endLine": 1, + "endOffset": 30, + "insertString": "d" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "change", + "request_seq": 66, + "success": true + } +After Request +ScriptInfos:: +/index.ts (Open) *changed* + version: SVC-1-31 *changed* + containingProjects: 1 + /dev/null/inferredProject2* *default* +/lib.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/lib.decorators.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/lib.decorators.legacy.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/node_modules/@types/node/index.d.ts (Open) + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject2* *default* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 67, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 31, + "key": "d" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 67, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 68, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 31, + "endLine": 1, + "endOffset": 31, + "insertString": "e" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "change", + "request_seq": 68, + "success": true + } +After Request +ScriptInfos:: +/index.ts (Open) *changed* + version: SVC-1-32 *changed* + containingProjects: 1 + /dev/null/inferredProject2* *default* +/lib.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/lib.decorators.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/lib.decorators.legacy.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/node_modules/@types/node/index.d.ts (Open) + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject2* *default* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 69, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 32, + "key": "e" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 69, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 70, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 32, + "endLine": 1, + "endOffset": 32, + "insertString": ":" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "change", + "request_seq": 70, + "success": true + } +After Request +ScriptInfos:: +/index.ts (Open) *changed* + version: SVC-1-33 *changed* + containingProjects: 1 + /dev/null/inferredProject2* *default* +/lib.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/lib.decorators.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/lib.decorators.legacy.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/node_modules/@types/node/index.d.ts (Open) + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject2* *default* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 71, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 33, + "key": ":" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 71, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 72, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 33, + "endLine": 1, + "endOffset": 33, + "insertString": "f" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "change", + "request_seq": 72, + "success": true + } +After Request +ScriptInfos:: +/index.ts (Open) *changed* + version: SVC-1-34 *changed* + containingProjects: 1 + /dev/null/inferredProject2* *default* +/lib.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/lib.decorators.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/lib.decorators.legacy.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/node_modules/@types/node/index.d.ts (Open) + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject2* *default* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 73, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 34, + "key": "f" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 73, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 74, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 34, + "endLine": 1, + "endOffset": 34, + "insertString": "s" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "change", + "request_seq": 74, + "success": true + } +After Request +ScriptInfos:: +/index.ts (Open) *changed* + version: SVC-1-35 *changed* + containingProjects: 1 + /dev/null/inferredProject2* *default* +/lib.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/lib.decorators.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/lib.decorators.legacy.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/node_modules/@types/node/index.d.ts (Open) + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject2* *default* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 75, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 35, + "key": "s" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 75, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 76, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 35, + "endLine": 1, + "endOffset": 35, + "insertString": "\"" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "change", + "request_seq": 76, + "success": true + } +After Request +ScriptInfos:: +/index.ts (Open) *changed* + version: SVC-1-36 *changed* + containingProjects: 1 + /dev/null/inferredProject2* *default* +/lib.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/lib.decorators.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/lib.decorators.legacy.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/node_modules/@types/node/index.d.ts (Open) + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject2* *default* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 77, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 36, + "key": "\"" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 77, + "success": true, + "body": [] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 78, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 36, + "endLine": 1, + "endOffset": 36, + "insertString": ";" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "change", + "request_seq": 78, + "success": true + } +After Request +ScriptInfos:: +/index.ts (Open) *changed* + version: SVC-1-37 *changed* + containingProjects: 1 + /dev/null/inferredProject2* *default* +/lib.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/lib.decorators.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/lib.decorators.legacy.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/node_modules/@types/node/index.d.ts (Open) + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject2* *default* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 79, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 37, + "key": ";" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 79, + "success": true, + "body": [ + { + "start": { + "line": 1, + "offset": 37 + }, + "end": { + "line": 1, + "offset": 37 + }, + "newText": " " + } + ] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 80, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 37, + "endLine": 1, + "endOffset": 37, + "insertString": " " + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "change", + "request_seq": 80, + "success": true + } +After Request +ScriptInfos:: +/index.ts (Open) *changed* + version: SVC-1-38 *changed* + containingProjects: 1 + /dev/null/inferredProject2* *default* +/lib.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/lib.decorators.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/lib.decorators.legacy.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/node_modules/@types/node/index.d.ts (Open) + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject2* *default* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 81, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 38, + "endLine": 1, + "endOffset": 38, + "insertString": "\n" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "change", + "request_seq": 81, + "success": true + } +After Request +ScriptInfos:: +/index.ts (Open) *changed* + version: SVC-1-39 *changed* + containingProjects: 1 + /dev/null/inferredProject2* *default* +/lib.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/lib.decorators.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/lib.decorators.legacy.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/node_modules/@types/node/index.d.ts (Open) + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject2* *default* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 82, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 2, + "offset": 1, + "key": "\n" + }, + "command": "formatonkey" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "formatonkey", + "request_seq": 82, + "success": true, + "body": [ + { + "start": { + "line": 1, + "offset": 37 + }, + "end": { + "line": 1, + "offset": 38 + }, + "newText": "" + } + ] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 83, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 37, + "endLine": 1, + "endOffset": 38, + "insertString": "" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "change", + "request_seq": 83, + "success": true + } +After Request +ScriptInfos:: +/index.ts (Open) *changed* + version: SVC-1-40 *changed* + containingProjects: 1 + /dev/null/inferredProject2* *default* +/lib.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/lib.decorators.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/lib.decorators.legacy.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/node_modules/@types/node/index.d.ts (Open) + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject2* *default* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 84, + "type": "request", + "arguments": { + "preferences": {} + }, + "command": "configure" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "configure", + "request_seq": 84, + "success": true + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 85, + "type": "request", + "arguments": { + "file": "/index.ts", + "includeLinePosition": true + }, + "command": "syntacticDiagnosticsSync" + } +Info seq [hh:mm:ss:mss] Starting updateGraphWorker: Project: /dev/null/inferredProject2* +Info seq [hh:mm:ss:mss] Finishing updateGraphWorker: Project: /dev/null/inferredProject2* projectStateVersion: 2 projectProgramVersion: 1 structureChanged: true structureIsReused:: SafeModules Elapsed:: *ms +Info seq [hh:mm:ss:mss] Project '/dev/null/inferredProject2*' (Inferred) +Info seq [hh:mm:ss:mss] Files (5) + /lib.d.ts Text-1 lib.d.ts-Text + /lib.decorators.d.ts Text-1 lib.decorators.d.ts-Text + /lib.decorators.legacy.d.ts Text-1 lib.decorators.legacy.d.ts-Text + /index.ts SVC-1-40 "import { writeFile } from \"node:fs\";\nreadFile" + /node_modules/@types/node/index.d.ts SVC-1-0 "declare module \"node:fs\" {\n export function readFile(): void;\n export function writeFile(): void;\n}" + +Info seq [hh:mm:ss:mss] ----------------------------------------------- +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "syntacticDiagnosticsSync", + "request_seq": 85, + "success": true, + "performanceData": { + "updateGraphDurationMs": * + }, + "body": [] + } +After Request +Projects:: +/dev/null/inferredProject2* (Inferred) *changed* + projectStateVersion: 2 + projectProgramVersion: 2 *changed* + dirty: false *changed* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 86, + "type": "request", + "arguments": { + "file": "/index.ts", + "includeLinePosition": true + }, + "command": "semanticDiagnosticsSync" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "semanticDiagnosticsSync", + "request_seq": 86, + "success": true, + "body": [ + { + "message": "Cannot find name 'readFile'.", + "start": 37, + "length": 8, + "category": "error", + "code": 2304, + "startLocation": { + "line": 2, + "offset": 1 + }, + "endLocation": { + "line": 2, + "offset": 9 + } + } + ] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 87, + "type": "request", + "arguments": { + "file": "/index.ts", + "includeLinePosition": true + }, + "command": "suggestionDiagnosticsSync" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "suggestionDiagnosticsSync", + "request_seq": 87, + "success": true, + "body": [ + { + "message": "'writeFile' is declared but its value is never read.", + "start": 0, + "length": 36, + "category": "suggestion", + "code": 6133, + "startLocation": { + "line": 1, + "offset": 1 + }, + "endLocation": { + "line": 1, + "offset": 37 + }, + "reportsUnnecessary": true + } + ] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 88, + "type": "request", + "arguments": { + "file": "/index.ts", + "startLine": 2, + "startOffset": 1, + "endLine": 2, + "endOffset": 9, + "errorCodes": [ + 2304 + ] + }, + "command": "getCodeFixes" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "getCodeFixes", + "request_seq": 88, + "success": true, + "body": [ + { + "fixName": "import", + "description": "Update import from \"node:fs\"", + "changes": [ + { + "fileName": "/index.ts", + "textChanges": [ + { + "start": { + "line": 1, + "offset": 10 + }, + "end": { + "line": 1, + "offset": 10 + }, + "newText": "readFile, " + } + ] + } + ] + } + ] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 89, + "type": "request", + "arguments": { + "file": "/index.ts", + "startLine": 1, + "startOffset": 1, + "endLine": 1, + "endOffset": 37, + "errorCodes": [ + 6133 + ] + }, + "command": "getCodeFixes" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "getCodeFixes", + "request_seq": 89, + "success": true, + "body": [ + { + "fixName": "unusedIdentifier", + "description": "Remove import from 'node:fs'", + "changes": [ + { + "fileName": "/index.ts", + "textChanges": [ + { + "start": { + "line": 1, + "offset": 1 + }, + "end": { + "line": 2, + "offset": 1 + }, + "newText": "" + } + ] + } + ] + } + ] + } +Info seq [hh:mm:ss:mss] request: + { + "seq": 90, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 10, + "endLine": 1, + "endOffset": 10, + "insertString": "readFile, " + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "change", + "request_seq": 90, + "success": true + } +After Request +Projects:: +/dev/null/inferredProject2* (Inferred) *changed* + projectStateVersion: 3 *changed* + projectProgramVersion: 2 + dirty: true *changed* + +ScriptInfos:: +/index.ts (Open) *changed* + version: SVC-1-41 *changed* + containingProjects: 1 + /dev/null/inferredProject2* *default* +/lib.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/lib.decorators.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/lib.decorators.legacy.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/node_modules/@types/node/index.d.ts (Open) + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject2* *default* + +Info seq [hh:mm:ss:mss] request: + { + "seq": 91, + "type": "request", + "arguments": { + "file": "/index.ts", + "line": 1, + "offset": 10, + "endLine": 1, + "endOffset": 20, + "insertString": "" + }, + "command": "change" + } +Info seq [hh:mm:ss:mss] response: + { + "seq": 0, + "type": "response", + "command": "change", + "request_seq": 91, + "success": true + } +After Request +ScriptInfos:: +/index.ts (Open) *changed* + version: SVC-1-42 *changed* + containingProjects: 1 + /dev/null/inferredProject2* *default* +/lib.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/lib.decorators.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/lib.decorators.legacy.d.ts + version: Text-1 + containingProjects: 1 + /dev/null/inferredProject2* +/node_modules/@types/node/index.d.ts (Open) + version: SVC-1-0 + containingProjects: 1 + /dev/null/inferredProject2* *default* diff --git a/tests/cases/fourslash/server/autoImportPackageJsonFilterExistingImport1.ts b/tests/cases/fourslash/server/autoImportPackageJsonFilterExistingImport1.ts new file mode 100644 index 0000000000000..e42595855e2ce --- /dev/null +++ b/tests/cases/fourslash/server/autoImportPackageJsonFilterExistingImport1.ts @@ -0,0 +1,24 @@ +/// + +// @module: preserve + +// @Filename: /node_modules/@types/react/index.d.ts +//// export declare function useMemo(): void; +//// export declare function useState(): void; + +// @Filename: /package.json +//// {} + +// @Filename: /index.ts +//// import { useState } from "react"; +//// useMemo/**/ + +goTo.marker(""); +verify.importFixAtPosition([ +`import { useMemo, useState } from "react"; +useMemo` +]); + +edit.deleteLine(0); +goTo.marker(""); +verify.importFixAtPosition([]); diff --git a/tests/cases/fourslash/server/autoImportPackageJsonFilterExistingImport2.ts b/tests/cases/fourslash/server/autoImportPackageJsonFilterExistingImport2.ts new file mode 100644 index 0000000000000..9ab23006a2b99 --- /dev/null +++ b/tests/cases/fourslash/server/autoImportPackageJsonFilterExistingImport2.ts @@ -0,0 +1,25 @@ +/// + +// @module: preserve + +// @Filename: /node_modules/@types/react/index.d.ts +//// export declare function useMemo(): void; +//// export declare function useState(): void; + +// @Filename: /package.json +//// {} + +// @Filename: /index.ts +//// useMemo/**/ + +goTo.marker(""); +verify.importFixAtPosition([]); + +goTo.bof(); +edit.insertLine(`import { useState } from "react";`); + +goTo.marker(""); +verify.importFixAtPosition([ +`import { useMemo, useState } from "react"; +useMemo` +]); diff --git a/tests/cases/fourslash/server/autoImportPackageJsonFilterExistingImport3.ts b/tests/cases/fourslash/server/autoImportPackageJsonFilterExistingImport3.ts new file mode 100644 index 0000000000000..bd0f2f57fa3bc --- /dev/null +++ b/tests/cases/fourslash/server/autoImportPackageJsonFilterExistingImport3.ts @@ -0,0 +1,27 @@ +/// + +// @module: preserve + +// @Filename: /node_modules/@types/node/index.d.ts +//// declare module "node:fs" { +//// export function readFile(): void; +//// export function writeFile(): void; +//// } + +// @Filename: /package.json +//// {} + +// @Filename: /index.ts +//// readFile/**/ + +goTo.marker(""); +verify.importFixAtPosition([]); + +goTo.bof(); +edit.insertLine(`import { writeFile } from "node:fs";`); + +goTo.marker(""); +verify.importFixAtPosition([ +`import { readFile, writeFile } from "node:fs"; +readFile` +]); \ No newline at end of file From ca64946dff86de3dfddb487be92a9b52b8011691 Mon Sep 17 00:00:00 2001 From: Andrew Branch Date: Thu, 15 Aug 2024 16:18:57 -0700 Subject: [PATCH 41/50] Set parents of augmented module exports (#59609) Co-authored-by: Isabel Duan --- src/compiler/checker.ts | 25 ++++++- ...ImportCompletionExportListAugmentation1.ts | 58 ++++++++++++++++ ...ImportCompletionExportListAugmentation2.ts | 68 +++++++++++++++++++ ...ImportCompletionExportListAugmentation3.ts | 57 ++++++++++++++++ ...ImportCompletionExportListAugmentation4.ts | 67 ++++++++++++++++++ 5 files changed, 272 insertions(+), 3 deletions(-) create mode 100644 tests/cases/fourslash/autoImportCompletionExportListAugmentation1.ts create mode 100644 tests/cases/fourslash/autoImportCompletionExportListAugmentation2.ts create mode 100644 tests/cases/fourslash/autoImportCompletionExportListAugmentation3.ts create mode 100644 tests/cases/fourslash/autoImportCompletionExportListAugmentation4.ts diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 1673c6c032716..739db56fbcd14 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -2683,7 +2683,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { } if (source.exports) { if (!target.exports) target.exports = createSymbolTable(); - mergeSymbolTable(target.exports, source.exports, unidirectional); + mergeSymbolTable(target.exports, source.exports, unidirectional, target); } if (!unidirectional) { recordMergedSymbol(target, source); @@ -2772,10 +2772,29 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { return combined; } - function mergeSymbolTable(target: SymbolTable, source: SymbolTable, unidirectional = false) { + function mergeSymbolTable(target: SymbolTable, source: SymbolTable, unidirectional = false, mergedParent?: Symbol) { source.forEach((sourceSymbol, id) => { const targetSymbol = target.get(id); - target.set(id, targetSymbol ? mergeSymbol(targetSymbol, sourceSymbol, unidirectional) : getMergedSymbol(sourceSymbol)); + const merged = targetSymbol ? mergeSymbol(targetSymbol, sourceSymbol, unidirectional) : getMergedSymbol(sourceSymbol); + if (mergedParent && targetSymbol) { + // If a merge was performed on the target symbol, set its parent to the merged parent that initiated the merge + // of its exports. Otherwise, `merged` came only from `sourceSymbol` and can keep its parent: + // + // // a.ts + // export interface A { x: number; } + // + // // b.ts + // declare module "./a" { + // interface A { y: number; } + // interface B {} + // } + // + // When merging the module augmentation into a.ts, the symbol for `A` will itself be merged, so its parent + // should be the merged module symbol. But the symbol for `B` has only one declaration, so its parent should + // be the module augmentation symbol, which contains its only declaration. + merged.parent = mergedParent; + } + target.set(id, merged); }); } diff --git a/tests/cases/fourslash/autoImportCompletionExportListAugmentation1.ts b/tests/cases/fourslash/autoImportCompletionExportListAugmentation1.ts new file mode 100644 index 0000000000000..8556ac9c40ff5 --- /dev/null +++ b/tests/cases/fourslash/autoImportCompletionExportListAugmentation1.ts @@ -0,0 +1,58 @@ +/// +// @module: nodenext + +// @Filename: /node_modules/@sapphire/pieces/index.d.ts +//// interface Container { +//// stores: unknown; +//// } +//// +//// declare class Piece { +//// container: Container; +//// } +//// +//// export { Piece, type Container }; + +// @FileName: /augmentation.ts +//// declare module "@sapphire/pieces" { +//// interface Container { +//// client: unknown; +//// } +//// export { Container }; +//// } + +// @Filename: /index.ts +//// import { Piece } from "@sapphire/pieces"; +//// class FullPiece extends Piece { +//// /*1*/ +//// } + +const preferences = { + includeCompletionsWithClassMemberSnippets: true, + includeCompletionsWithInsertText: true, +}; + +verify.completions({ + marker: "1", + includes: [ + { + name: "container", + insertText: "container: Container;", + filterText: "container", + hasAction: true, + source: "ClassMemberSnippet/", + }, + ], + preferences, + isNewIdentifierLocation: true, +}); + +verify.applyCodeActionFromCompletion("1", { + name: "container", + source: "ClassMemberSnippet/", + description: `Includes imports of types referenced by 'container'`, + newFileContent: `import { Container, Piece } from "@sapphire/pieces"; +class FullPiece extends Piece { + +}`, + preferences, +}); diff --git a/tests/cases/fourslash/autoImportCompletionExportListAugmentation2.ts b/tests/cases/fourslash/autoImportCompletionExportListAugmentation2.ts new file mode 100644 index 0000000000000..bf984311cfb75 --- /dev/null +++ b/tests/cases/fourslash/autoImportCompletionExportListAugmentation2.ts @@ -0,0 +1,68 @@ +/// +// @module: nodenext + +// @Filename: /node_modules/@sapphire/pieces/index.d.ts +//// interface Container { +//// stores: unknown; +//// } +//// +//// declare class Piece { +//// get container(): Container; +//// } +//// +//// declare class AliasPiece extends Piece {} +//// +//// export { AliasPiece, type Container }; + +// @Filename: /node_modules/@sapphire/framework/index.d.ts +//// import { AliasPiece } from "@sapphire/pieces"; +//// +//// declare class Command extends AliasPiece {} +//// +//// declare module "@sapphire/pieces" { +//// interface Container { +//// client: unknown; +//// } +//// } +//// +//// export { Command }; + +// @Filename: /index.ts +//// import "@sapphire/pieces"; +//// import { Command } from "@sapphire/framework"; +//// class PingCommand extends Command { +//// /*1*/ +//// } + +const preferences = { + includeCompletionsWithClassMemberSnippets: true, + includeCompletionsWithInsertText: true, +}; + +verify.completions({ + marker: "1", + includes: [ + { + name: "container", + insertText: "get container(): Container {\n}", + filterText: "container", + hasAction: true, + source: "ClassMemberSnippet/", + }, + ], + preferences, + isNewIdentifierLocation: true, +}); + +verify.applyCodeActionFromCompletion("1", { + name: "container", + source: "ClassMemberSnippet/", + description: `Includes imports of types referenced by 'container'`, + newFileContent: `import "@sapphire/pieces"; +import { Command } from "@sapphire/framework"; +import { Container } from "@sapphire/pieces"; +class PingCommand extends Command { + +}`, + preferences, +}); \ No newline at end of file diff --git a/tests/cases/fourslash/autoImportCompletionExportListAugmentation3.ts b/tests/cases/fourslash/autoImportCompletionExportListAugmentation3.ts new file mode 100644 index 0000000000000..7331ec3cedc02 --- /dev/null +++ b/tests/cases/fourslash/autoImportCompletionExportListAugmentation3.ts @@ -0,0 +1,57 @@ +/// +// @module: nodenext + +// @Filename: /node_modules/@sapphire/pieces/index.d.ts +//// export interface Container { +//// stores: unknown; +//// } +//// +//// declare class Piece { +//// container: Container; +//// } +//// +//// export { Piece }; + +// @FileName: /augmentation.ts +//// declare module "@sapphire/pieces" { +//// interface Container { +//// client: unknown; +//// } +//// } + +// @Filename: /index.ts +//// import { Piece } from "@sapphire/pieces"; +//// class FullPiece extends Piece { +//// /*1*/ +//// } + +const preferences = { + includeCompletionsWithClassMemberSnippets: true, + includeCompletionsWithInsertText: true, +}; + +verify.completions({ + marker: "1", + includes: [ + { + name: "container", + insertText: "container: Container;", + filterText: "container", + hasAction: true, + source: "ClassMemberSnippet/", + }, + ], + preferences, + isNewIdentifierLocation: true, +}); + +verify.applyCodeActionFromCompletion("1", { + name: "container", + source: "ClassMemberSnippet/", + description: `Includes imports of types referenced by 'container'`, + newFileContent: `import { Container, Piece } from "@sapphire/pieces"; +class FullPiece extends Piece { + +}`, + preferences, +}); \ No newline at end of file diff --git a/tests/cases/fourslash/autoImportCompletionExportListAugmentation4.ts b/tests/cases/fourslash/autoImportCompletionExportListAugmentation4.ts new file mode 100644 index 0000000000000..58ded632a7019 --- /dev/null +++ b/tests/cases/fourslash/autoImportCompletionExportListAugmentation4.ts @@ -0,0 +1,67 @@ +/// + +// @module: nodenext + +// @Filename: /node_modules/@sapphire/pieces/index.d.ts +//// interface Container { +//// stores: unknown; +//// } +//// +//// declare class Piece { +//// get container(): Container; +//// } +//// +//// export { Piece as Alias, type Container }; + +// @Filename: /node_modules/@sapphire/framework/index.d.ts +//// import { Alias } from "@sapphire/pieces"; +//// +//// declare class Command extends Alias {} +//// +//// declare module "@sapphire/pieces" { +//// interface Container { +//// client: unknown; +//// } +//// } +//// +//// export { Command as CommandAlias }; + +// @Filename: /index.ts +//// import "@sapphire/pieces"; +//// import { CommandAlias } from "@sapphire/framework"; +//// class PingCommand extends CommandAlias { +//// /*1*/ +//// } + +const preferences = { + includeCompletionsWithClassMemberSnippets: true, + includeCompletionsWithInsertText: true, +}; + +verify.completions({ + marker: "1", + includes: [ + { + name: "container", + insertText: "get container(): Container {\n}", + filterText: "container", + hasAction: true, + source: "ClassMemberSnippet/", + }, + ], + preferences, + isNewIdentifierLocation: true, +}); + +verify.applyCodeActionFromCompletion("1", { + name: "container", + source: "ClassMemberSnippet/", + description: `Includes imports of types referenced by 'container'`, + newFileContent: `import "@sapphire/pieces"; +import { CommandAlias } from "@sapphire/framework"; +import { Container } from "@sapphire/pieces"; +class PingCommand extends CommandAlias { + +}`, + preferences, +}); \ No newline at end of file From 52395892e0c4ee8a22b4fa6190bad46d81e66651 Mon Sep 17 00:00:00 2001 From: Titian Cernicova-Dragomir Date: Fri, 16 Aug 2024 02:57:37 +0300 Subject: [PATCH 42/50] Set declarationMap to false in transpileModule. (#59642) --- src/services/transpile.ts | 1 + src/testRunner/unittests/services/transpile.ts | 5 +++++ ...rts setting declarationMap (verbatimModuleSyntax=true).js | 2 ++ ...eclarationMap (verbatimModuleSyntax=true).oldTranspile.js | 2 ++ .../reference/transpile/Supports setting declarationMap.js | 2 ++ .../Supports setting declarationMap.oldTranspile.js | 2 ++ 6 files changed, 14 insertions(+) create mode 100644 tests/baselines/reference/transpile/Supports setting declarationMap (verbatimModuleSyntax=true).js create mode 100644 tests/baselines/reference/transpile/Supports setting declarationMap (verbatimModuleSyntax=true).oldTranspile.js create mode 100644 tests/baselines/reference/transpile/Supports setting declarationMap.js create mode 100644 tests/baselines/reference/transpile/Supports setting declarationMap.oldTranspile.js diff --git a/src/services/transpile.ts b/src/services/transpile.ts index 86622ea3e3528..95722c88a5c05 100644 --- a/src/services/transpile.ts +++ b/src/services/transpile.ts @@ -149,6 +149,7 @@ function transpileWorker(input: string, transpileOptions: TranspileOptions, decl } else { options.declaration = false; + options.declarationMap = false; } const newLine = getNewLineCharacter(options); diff --git a/src/testRunner/unittests/services/transpile.ts b/src/testRunner/unittests/services/transpile.ts index 3a1d1c24c9ae4..66faf0e452a65 100644 --- a/src/testRunner/unittests/services/transpile.ts +++ b/src/testRunner/unittests/services/transpile.ts @@ -294,6 +294,11 @@ var x = 0;`, testVerbatimModuleSyntax: true, }); + transpilesCorrectly("Supports setting 'declarationMap'", "x;", { + options: { compilerOptions: { declarationMap: true }, fileName: "input.js", reportDiagnostics: true }, + testVerbatimModuleSyntax: true, + }); + transpilesCorrectly("Supports setting 'declarationDir'", "x;", { options: { compilerOptions: { declarationDir: "out/declarations" }, fileName: "input.js", reportDiagnostics: true }, testVerbatimModuleSyntax: true, diff --git a/tests/baselines/reference/transpile/Supports setting declarationMap (verbatimModuleSyntax=true).js b/tests/baselines/reference/transpile/Supports setting declarationMap (verbatimModuleSyntax=true).js new file mode 100644 index 0000000000000..8394371f9081a --- /dev/null +++ b/tests/baselines/reference/transpile/Supports setting declarationMap (verbatimModuleSyntax=true).js @@ -0,0 +1,2 @@ +x; +//# sourceMappingURL=input.js.map \ No newline at end of file diff --git a/tests/baselines/reference/transpile/Supports setting declarationMap (verbatimModuleSyntax=true).oldTranspile.js b/tests/baselines/reference/transpile/Supports setting declarationMap (verbatimModuleSyntax=true).oldTranspile.js new file mode 100644 index 0000000000000..8394371f9081a --- /dev/null +++ b/tests/baselines/reference/transpile/Supports setting declarationMap (verbatimModuleSyntax=true).oldTranspile.js @@ -0,0 +1,2 @@ +x; +//# sourceMappingURL=input.js.map \ No newline at end of file diff --git a/tests/baselines/reference/transpile/Supports setting declarationMap.js b/tests/baselines/reference/transpile/Supports setting declarationMap.js new file mode 100644 index 0000000000000..8394371f9081a --- /dev/null +++ b/tests/baselines/reference/transpile/Supports setting declarationMap.js @@ -0,0 +1,2 @@ +x; +//# sourceMappingURL=input.js.map \ No newline at end of file diff --git a/tests/baselines/reference/transpile/Supports setting declarationMap.oldTranspile.js b/tests/baselines/reference/transpile/Supports setting declarationMap.oldTranspile.js new file mode 100644 index 0000000000000..8394371f9081a --- /dev/null +++ b/tests/baselines/reference/transpile/Supports setting declarationMap.oldTranspile.js @@ -0,0 +1,2 @@ +x; +//# sourceMappingURL=input.js.map \ No newline at end of file From 856e472104bc8f000d936642b2f46ece260ffb96 Mon Sep 17 00:00:00 2001 From: Ron Buckton Date: Fri, 16 Aug 2024 10:33:00 -0400 Subject: [PATCH 43/50] Do not overwrite original pointer when indirectly points to location (#59647) --- src/compiler/checker.ts | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 739db56fbcd14..17f2c0d156103 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -6082,10 +6082,19 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { if (!location) { return range; } - if (!context.enclosingFile || context.enclosingFile !== getSourceFileOfNode(getOriginalNode(location))) { - return setOriginalNode(range, location); // if `location` is from another file, only set/update original pointer, and not positions, since copying text across files isn't supported by the emitter + // Don't overwrite the original node if `range` has an `original` node that points either directly or indirectly to `location` + let original = range.original; + while (original && original !== location) { + original = original.original; } - return setTextRangeWorker(setOriginalNode(range, location), location); + if (!original) { + setOriginalNode(range, location); + } + // only set positions if range comes from the same file since copying text across files isn't supported by the emitter + if (context.enclosingFile && context.enclosingFile === getSourceFileOfNode(getOriginalNode(location))) { + return setTextRangeWorker(range, location); + } + return range; } /** From 09a8522294cf97c84dc706b91c408c50f7662c2f Mon Sep 17 00:00:00 2001 From: Ron Buckton Date: Fri, 16 Aug 2024 11:55:46 -0400 Subject: [PATCH 44/50] Do not get awaited type of AsyncGenerator TNext (#59644) --- src/compiler/checker.ts | 4 +- .../asyncGeneratorPromiseNextType.symbols | 121 ++++++++++ .../asyncGeneratorPromiseNextType.types | 215 ++++++++++++++++++ .../asyncGeneratorPromiseNextType.ts | 42 ++++ 4 files changed, 379 insertions(+), 3 deletions(-) create mode 100644 tests/baselines/reference/asyncGeneratorPromiseNextType.symbols create mode 100644 tests/baselines/reference/asyncGeneratorPromiseNextType.types create mode 100644 tests/cases/conformance/asyncGenerators/asyncGeneratorPromiseNextType.ts diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 17f2c0d156103..91346429b1774 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -38376,7 +38376,6 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { const globalGeneratorType = resolver.getGlobalGeneratorType(/*reportErrors*/ false); yieldType = resolver.resolveIterationType(yieldType, /*errorNode*/ undefined) || unknownType; returnType = resolver.resolveIterationType(returnType, /*errorNode*/ undefined) || unknownType; - nextType = resolver.resolveIterationType(nextType, /*errorNode*/ undefined) || unknownType; if (globalGeneratorType === emptyGenericType) { // Fall back to the global IterableIterator type. const globalIterableIteratorType = resolver.getGlobalIterableIteratorType(/*reportErrors*/ false); @@ -40287,9 +40286,8 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { const iterationTypes = returnType && getIterationTypesOfGeneratorFunctionReturnType(returnType, isAsync); const signatureYieldType = iterationTypes && iterationTypes.yieldType || anyType; const signatureNextType = iterationTypes && iterationTypes.nextType || anyType; - const resolvedSignatureNextType = isAsync ? getAwaitedType(signatureNextType) || anyType : signatureNextType; const yieldExpressionType = node.expression ? checkExpression(node.expression) : undefinedWideningType; - const yieldedType = getYieldedTypeOfYieldExpression(node, yieldExpressionType, resolvedSignatureNextType, isAsync); + const yieldedType = getYieldedTypeOfYieldExpression(node, yieldExpressionType, signatureNextType, isAsync); if (returnType && yieldedType) { checkTypeAssignableToAndOptionallyElaborate(yieldedType, signatureYieldType, node.expression || node, node.expression); } diff --git a/tests/baselines/reference/asyncGeneratorPromiseNextType.symbols b/tests/baselines/reference/asyncGeneratorPromiseNextType.symbols new file mode 100644 index 0000000000000..a853c42452e78 --- /dev/null +++ b/tests/baselines/reference/asyncGeneratorPromiseNextType.symbols @@ -0,0 +1,121 @@ +//// [tests/cases/conformance/asyncGenerators/asyncGeneratorPromiseNextType.ts] //// + +=== asyncGeneratorPromiseNextType.ts === +// https://github.com/microsoft/TypeScript/issues/44808 + +type Result = {message: string} +>Result : Symbol(Result, Decl(asyncGeneratorPromiseNextType.ts, 0, 0)) +>message : Symbol(message, Decl(asyncGeneratorPromiseNextType.ts, 2, 15)) + +async function *saverGen(): AsyncGenerator | undefined> { +>saverGen : Symbol(saverGen, Decl(asyncGeneratorPromiseNextType.ts, 2, 31)) +>AsyncGenerator : Symbol(AsyncGenerator, Decl(lib.es2018.asyncgenerator.d.ts, --, --)) +>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2018.promise.d.ts, --, --)) +>Result : Symbol(Result, Decl(asyncGeneratorPromiseNextType.ts, 0, 0)) + + let pending: Promise[] = []; +>pending : Symbol(pending, Decl(asyncGeneratorPromiseNextType.ts, 5, 7)) +>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2018.promise.d.ts, --, --)) +>Result : Symbol(Result, Decl(asyncGeneratorPromiseNextType.ts, 0, 0)) + + while (true) { + const p: Promise | undefined = yield; +>p : Symbol(p, Decl(asyncGeneratorPromiseNextType.ts, 7, 13)) +>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2018.promise.d.ts, --, --)) +>Result : Symbol(Result, Decl(asyncGeneratorPromiseNextType.ts, 0, 0)) + + if (p != null) +>p : Symbol(p, Decl(asyncGeneratorPromiseNextType.ts, 7, 13)) + + pending.push(p); +>pending.push : Symbol(Array.push, Decl(lib.es5.d.ts, --, --)) +>pending : Symbol(pending, Decl(asyncGeneratorPromiseNextType.ts, 5, 7)) +>push : Symbol(Array.push, Decl(lib.es5.d.ts, --, --)) +>p : Symbol(p, Decl(asyncGeneratorPromiseNextType.ts, 7, 13)) + + else { + const results = await Promise.all(pending); +>results : Symbol(results, Decl(asyncGeneratorPromiseNextType.ts, 11, 17)) +>Promise.all : Symbol(PromiseConstructor.all, Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2018.promise.d.ts, --, --)) +>all : Symbol(PromiseConstructor.all, Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>pending : Symbol(pending, Decl(asyncGeneratorPromiseNextType.ts, 5, 7)) + + pending = []; +>pending : Symbol(pending, Decl(asyncGeneratorPromiseNextType.ts, 5, 7)) + + console.log('Storing...'); +>console.log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --)) +>console : Symbol(console, Decl(lib.dom.d.ts, --, --)) +>log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --)) + + await storeResults(results); +>storeResults : Symbol(storeResults, Decl(asyncGeneratorPromiseNextType.ts, 17, 1)) +>results : Symbol(results, Decl(asyncGeneratorPromiseNextType.ts, 11, 17)) + } + } +} + +function storeResults(results: Result[]) { +>storeResults : Symbol(storeResults, Decl(asyncGeneratorPromiseNextType.ts, 17, 1)) +>results : Symbol(results, Decl(asyncGeneratorPromiseNextType.ts, 19, 22)) +>Result : Symbol(Result, Decl(asyncGeneratorPromiseNextType.ts, 0, 0)) + + console.log(results); +>console.log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --)) +>console : Symbol(console, Decl(lib.dom.d.ts, --, --)) +>log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --)) +>results : Symbol(results, Decl(asyncGeneratorPromiseNextType.ts, 19, 22)) + + return Promise.resolve(); +>Promise.resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2018.promise.d.ts, --, --)) +>resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +} + +async function *saverGen2() { +>saverGen2 : Symbol(saverGen2, Decl(asyncGeneratorPromiseNextType.ts, 22, 1)) + + let pending: Promise[] = []; +>pending : Symbol(pending, Decl(asyncGeneratorPromiseNextType.ts, 25, 7)) +>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2018.promise.d.ts, --, --)) +>Result : Symbol(Result, Decl(asyncGeneratorPromiseNextType.ts, 0, 0)) + + while (true) { + const p: Promise | undefined = yield; +>p : Symbol(p, Decl(asyncGeneratorPromiseNextType.ts, 27, 13)) +>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2018.promise.d.ts, --, --)) +>Result : Symbol(Result, Decl(asyncGeneratorPromiseNextType.ts, 0, 0)) + + if (p != null) +>p : Symbol(p, Decl(asyncGeneratorPromiseNextType.ts, 27, 13)) + + pending.push(p); +>pending.push : Symbol(Array.push, Decl(lib.es5.d.ts, --, --)) +>pending : Symbol(pending, Decl(asyncGeneratorPromiseNextType.ts, 25, 7)) +>push : Symbol(Array.push, Decl(lib.es5.d.ts, --, --)) +>p : Symbol(p, Decl(asyncGeneratorPromiseNextType.ts, 27, 13)) + + else { + const results = await Promise.all(pending); +>results : Symbol(results, Decl(asyncGeneratorPromiseNextType.ts, 31, 17)) +>Promise.all : Symbol(PromiseConstructor.all, Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2018.promise.d.ts, --, --)) +>all : Symbol(PromiseConstructor.all, Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) +>pending : Symbol(pending, Decl(asyncGeneratorPromiseNextType.ts, 25, 7)) + + pending = []; +>pending : Symbol(pending, Decl(asyncGeneratorPromiseNextType.ts, 25, 7)) + + console.log('Storing...'); +>console.log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --)) +>console : Symbol(console, Decl(lib.dom.d.ts, --, --)) +>log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --)) + + await storeResults(results); +>storeResults : Symbol(storeResults, Decl(asyncGeneratorPromiseNextType.ts, 17, 1)) +>results : Symbol(results, Decl(asyncGeneratorPromiseNextType.ts, 31, 17)) + } + } +} + diff --git a/tests/baselines/reference/asyncGeneratorPromiseNextType.types b/tests/baselines/reference/asyncGeneratorPromiseNextType.types new file mode 100644 index 0000000000000..04df59c42c626 --- /dev/null +++ b/tests/baselines/reference/asyncGeneratorPromiseNextType.types @@ -0,0 +1,215 @@ +//// [tests/cases/conformance/asyncGenerators/asyncGeneratorPromiseNextType.ts] //// + +=== asyncGeneratorPromiseNextType.ts === +// https://github.com/microsoft/TypeScript/issues/44808 + +type Result = {message: string} +>Result : Result +> : ^^^^^^ +>message : string +> : ^^^^^^ + +async function *saverGen(): AsyncGenerator | undefined> { +>saverGen : () => AsyncGenerator | undefined> +> : ^^^^^^ + + let pending: Promise[] = []; +>pending : Promise[] +> : ^^^^^^^^^^^^^^^^^ +>[] : never[] +> : ^^^^^^^ + + while (true) { +>true : true +> : ^^^^ + + const p: Promise | undefined = yield; +>p : Promise | undefined +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>yield : Promise | undefined +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + if (p != null) +>p != null : boolean +> : ^^^^^^^ +>p : Promise | undefined +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + pending.push(p); +>pending.push(p) : number +> : ^^^^^^ +>pending.push : (...items: Promise[]) => number +> : ^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^ +>pending : Promise[] +> : ^^^^^^^^^^^^^^^^^ +>push : (...items: Promise[]) => number +> : ^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^ +>p : Promise +> : ^^^^^^^^^^^^^^^ + + else { + const results = await Promise.all(pending); +>results : Result[] +> : ^^^^^^^^ +>await Promise.all(pending) : Result[] +> : ^^^^^^^^ +>Promise.all(pending) : Promise +> : ^^^^^^^^^^^^^^^^^ +>Promise.all : { (values: Iterable>): Promise[]>; (values: T): Promise<{ -readonly [P in keyof T]: Awaited; }>; } +> : ^^^ ^^ ^^ ^^^ ^^^ ^^^^^^^^^ ^^ ^^ ^^^ ^^^ +>Promise : PromiseConstructor +> : ^^^^^^^^^^^^^^^^^^ +>all : { (values: Iterable>): Promise[]>; (values: T): Promise<{ -readonly [P in keyof T]: Awaited; }>; } +> : ^^^ ^^ ^^ ^^^ ^^^ ^^^^^^^^^ ^^ ^^ ^^^ ^^^ +>pending : Promise[] +> : ^^^^^^^^^^^^^^^^^ + + pending = []; +>pending = [] : never[] +> : ^^^^^^^ +>pending : Promise[] +> : ^^^^^^^^^^^^^^^^^ +>[] : never[] +> : ^^^^^^^ + + console.log('Storing...'); +>console.log('Storing...') : void +> : ^^^^ +>console.log : (...data: any[]) => void +> : ^^^^ ^^ ^^^^^ +>console : Console +> : ^^^^^^^ +>log : (...data: any[]) => void +> : ^^^^ ^^ ^^^^^ +>'Storing...' : "Storing..." +> : ^^^^^^^^^^^^ + + await storeResults(results); +>await storeResults(results) : void +> : ^^^^ +>storeResults(results) : Promise +> : ^^^^^^^^^^^^^ +>storeResults : (results: Result[]) => Promise +> : ^ ^^ ^^^^^^^^^^^^^^^^^^ +>results : Result[] +> : ^^^^^^^^ + } + } +} + +function storeResults(results: Result[]) { +>storeResults : (results: Result[]) => Promise +> : ^ ^^ ^^^^^^^^^^^^^^^^^^ +>results : Result[] +> : ^^^^^^^^ + + console.log(results); +>console.log(results) : void +> : ^^^^ +>console.log : (...data: any[]) => void +> : ^^^^ ^^ ^^^^^ +>console : Console +> : ^^^^^^^ +>log : (...data: any[]) => void +> : ^^^^ ^^ ^^^^^ +>results : Result[] +> : ^^^^^^^^ + + return Promise.resolve(); +>Promise.resolve() : Promise +> : ^^^^^^^^^^^^^ +>Promise.resolve : { (): Promise; (value: T): Promise>; (value: T | PromiseLike): Promise>; } +> : ^^^^^^ ^^^ ^^ ^^ ^^^ ^^^ ^^ ^^ ^^^ ^^^ +>Promise : PromiseConstructor +> : ^^^^^^^^^^^^^^^^^^ +>resolve : { (): Promise; (value: T): Promise>; (value: T | PromiseLike): Promise>; } +> : ^^^^^^ ^^^ ^^ ^^ ^^^ ^^^ ^^ ^^ ^^^ ^^^ +} + +async function *saverGen2() { +>saverGen2 : () => AsyncGenerator | undefined> +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + let pending: Promise[] = []; +>pending : Promise[] +> : ^^^^^^^^^^^^^^^^^ +>[] : never[] +> : ^^^^^^^ + + while (true) { +>true : true +> : ^^^^ + + const p: Promise | undefined = yield; +>p : Promise | undefined +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>yield : any + + if (p != null) +>p != null : boolean +> : ^^^^^^^ +>p : Promise | undefined +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + pending.push(p); +>pending.push(p) : number +> : ^^^^^^ +>pending.push : (...items: Promise[]) => number +> : ^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^ +>pending : Promise[] +> : ^^^^^^^^^^^^^^^^^ +>push : (...items: Promise[]) => number +> : ^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^ +>p : Promise +> : ^^^^^^^^^^^^^^^ + + else { + const results = await Promise.all(pending); +>results : Result[] +> : ^^^^^^^^ +>await Promise.all(pending) : Result[] +> : ^^^^^^^^ +>Promise.all(pending) : Promise +> : ^^^^^^^^^^^^^^^^^ +>Promise.all : { (values: Iterable>): Promise[]>; (values: T): Promise<{ -readonly [P in keyof T]: Awaited; }>; } +> : ^^^ ^^ ^^ ^^^ ^^^ ^^^^^^^^^ ^^ ^^ ^^^ ^^^ +>Promise : PromiseConstructor +> : ^^^^^^^^^^^^^^^^^^ +>all : { (values: Iterable>): Promise[]>; (values: T): Promise<{ -readonly [P in keyof T]: Awaited; }>; } +> : ^^^ ^^ ^^ ^^^ ^^^ ^^^^^^^^^ ^^ ^^ ^^^ ^^^ +>pending : Promise[] +> : ^^^^^^^^^^^^^^^^^ + + pending = []; +>pending = [] : never[] +> : ^^^^^^^ +>pending : Promise[] +> : ^^^^^^^^^^^^^^^^^ +>[] : never[] +> : ^^^^^^^ + + console.log('Storing...'); +>console.log('Storing...') : void +> : ^^^^ +>console.log : (...data: any[]) => void +> : ^^^^ ^^ ^^^^^ +>console : Console +> : ^^^^^^^ +>log : (...data: any[]) => void +> : ^^^^ ^^ ^^^^^ +>'Storing...' : "Storing..." +> : ^^^^^^^^^^^^ + + await storeResults(results); +>await storeResults(results) : void +> : ^^^^ +>storeResults(results) : Promise +> : ^^^^^^^^^^^^^ +>storeResults : (results: Result[]) => Promise +> : ^ ^^ ^^^^^^^^^^^^^^^^^^ +>results : Result[] +> : ^^^^^^^^ + } + } +} + diff --git a/tests/cases/conformance/asyncGenerators/asyncGeneratorPromiseNextType.ts b/tests/cases/conformance/asyncGenerators/asyncGeneratorPromiseNextType.ts new file mode 100644 index 0000000000000..dba96834a10df --- /dev/null +++ b/tests/cases/conformance/asyncGenerators/asyncGeneratorPromiseNextType.ts @@ -0,0 +1,42 @@ +// @target: esnext +// @strict: true +// @noEmit: true + +// https://github.com/microsoft/TypeScript/issues/44808 + +type Result = {message: string} + +async function *saverGen(): AsyncGenerator | undefined> { + let pending: Promise[] = []; + while (true) { + const p: Promise | undefined = yield; + if (p != null) + pending.push(p); + else { + const results = await Promise.all(pending); + pending = []; + console.log('Storing...'); + await storeResults(results); + } + } +} + +function storeResults(results: Result[]) { + console.log(results); + return Promise.resolve(); +} + +async function *saverGen2() { + let pending: Promise[] = []; + while (true) { + const p: Promise | undefined = yield; + if (p != null) + pending.push(p); + else { + const results = await Promise.all(pending); + pending = []; + console.log('Storing...'); + await storeResults(results); + } + } +} From f025a5b879f0c2eb26dd0b15af04f7b61cbcc05b Mon Sep 17 00:00:00 2001 From: Ron Buckton Date: Fri, 16 Aug 2024 11:57:04 -0400 Subject: [PATCH 45/50] built-in iterators should be disposable (#59633) --- src/harness/evaluatorImpl.ts | 2 +- src/lib/esnext.disposable.d.ts | 8 ++ .../evaluation/awaitUsingDeclarations.ts | 136 ++++++++++++++++++ .../unittests/evaluation/usingDeclarations.ts | 71 +++++---- ...arationsWithAsyncIteratorObject.errors.txt | 19 +++ ...eclarationsWithAsyncIteratorObject.symbols | 33 +++++ ...gDeclarationsWithAsyncIteratorObject.types | 40 ++++++ ...gDeclarationsWithIteratorObject.errors.txt | 28 ++++ ...singDeclarationsWithIteratorObject.symbols | 72 ++++++++++ ...tUsingDeclarationsWithIteratorObject.types | 123 ++++++++++++++++ .../reference/builtinIterator.symbols | 2 +- ...(exactoptionalpropertytypes=false).symbols | 51 ++++--- ...y2(exactoptionalpropertytypes=false).types | 58 ++++++-- ...2(exactoptionalpropertytypes=true).symbols | 51 ++++--- ...ty2(exactoptionalpropertytypes=true).types | 58 ++++++-- ...gDeclarationsWithIteratorObject.errors.txt | 31 ++++ ...singDeclarationsWithIteratorObject.symbols | 72 ++++++++++ .../usingDeclarationsWithIteratorObject.types | 123 ++++++++++++++++ .../discriminateWithOptionalProperty2.ts | 7 +- ...singDeclarationsWithAsyncIteratorObject.ts | 17 +++ ...waitUsingDeclarationsWithIteratorObject.ts | 26 ++++ .../usingDeclarationsWithIteratorObject.ts | 26 ++++ 22 files changed, 950 insertions(+), 104 deletions(-) create mode 100644 tests/baselines/reference/awaitUsingDeclarationsWithAsyncIteratorObject.errors.txt create mode 100644 tests/baselines/reference/awaitUsingDeclarationsWithAsyncIteratorObject.symbols create mode 100644 tests/baselines/reference/awaitUsingDeclarationsWithAsyncIteratorObject.types create mode 100644 tests/baselines/reference/awaitUsingDeclarationsWithIteratorObject.errors.txt create mode 100644 tests/baselines/reference/awaitUsingDeclarationsWithIteratorObject.symbols create mode 100644 tests/baselines/reference/awaitUsingDeclarationsWithIteratorObject.types create mode 100644 tests/baselines/reference/usingDeclarationsWithIteratorObject.errors.txt create mode 100644 tests/baselines/reference/usingDeclarationsWithIteratorObject.symbols create mode 100644 tests/baselines/reference/usingDeclarationsWithIteratorObject.types create mode 100644 tests/cases/conformance/statements/VariableStatements/usingDeclarations/awaitUsingDeclarationsWithAsyncIteratorObject.ts create mode 100644 tests/cases/conformance/statements/VariableStatements/usingDeclarations/awaitUsingDeclarationsWithIteratorObject.ts create mode 100644 tests/cases/conformance/statements/VariableStatements/usingDeclarations/usingDeclarationsWithIteratorObject.ts diff --git a/src/harness/evaluatorImpl.ts b/src/harness/evaluatorImpl.ts index 9fdeed5b6cdc7..706e613aa5dcc 100644 --- a/src/harness/evaluatorImpl.ts +++ b/src/harness/evaluatorImpl.ts @@ -10,7 +10,7 @@ const sourceFileJs = vpath.combine(vfs.srcFolder, "source.js"); // Define a custom "Symbol" constructor to attach missing built-in symbols without // modifying the global "Symbol" constructor -const FakeSymbol: SymbolConstructor = ((description?: string) => Symbol(description)) as any; +export const FakeSymbol: SymbolConstructor = ((description?: string) => Symbol(description)) as any; (FakeSymbol as any).prototype = Symbol.prototype; for (const key of Object.getOwnPropertyNames(Symbol)) { Object.defineProperty(FakeSymbol, key, Object.getOwnPropertyDescriptor(Symbol, key)!); diff --git a/src/lib/esnext.disposable.d.ts b/src/lib/esnext.disposable.d.ts index 75a596a5502f8..0f1a00bfc83e2 100644 --- a/src/lib/esnext.disposable.d.ts +++ b/src/lib/esnext.disposable.d.ts @@ -1,4 +1,6 @@ /// +/// +/// interface SymbolConstructor { /** @@ -165,3 +167,9 @@ interface AsyncDisposableStackConstructor { readonly prototype: AsyncDisposableStack; } declare var AsyncDisposableStack: AsyncDisposableStackConstructor; + +interface IteratorObject extends Disposable { +} + +interface AsyncIteratorObject extends AsyncDisposable { +} diff --git a/src/testRunner/unittests/evaluation/awaitUsingDeclarations.ts b/src/testRunner/unittests/evaluation/awaitUsingDeclarations.ts index 2ba072b212270..6cd8864e85785 100644 --- a/src/testRunner/unittests/evaluation/awaitUsingDeclarations.ts +++ b/src/testRunner/unittests/evaluation/awaitUsingDeclarations.ts @@ -1874,4 +1874,140 @@ describe("unittests:: evaluation:: awaitUsingDeclarations", () => { "catch", ]); }); + + it("deterministic collapse of Await", async () => { + const { main, output } = evaluator.evaluateTypeScript( + ` + export const output: any[] = []; + + let asyncId = 0; + function increment() { asyncId++; } + + export async function main() { + // increment asyncId at the top of each turn of the microtask queue + let pending = Promise.resolve(); + for (let i = 0; i < 10; i++) { + pending = pending.then(increment); + } + + { + using sync1 = { [Symbol.dispose]() { output.push(asyncId); } }; // asyncId: 2 + await using async1 = null, async2 = null; + using sync2 = { [Symbol.dispose]() { output.push(asyncId); } }; // asyncId: 1 + await using async3 = null, async4 = null; + output.push(asyncId); // asyncId: 0 + } + + output.push(asyncId); // asyncId: Ideally, 2, but ends up being 4 due to delays imposed by 'await' + + await pending; // wait for the remaining 'increment' frames to complete. + } + + `, + { target: ts.ScriptTarget.ES2018 }, + ); + + await main(); + + assert.deepEqual(output, [ + 0, + 1, + 2, + + // This really should be 2, but our transpile introduces an extra `await` by necessity to observe the + // result of __disposeResources. The process of adopting the result ends up taking two turns of the + // microtask queue. + 4, + ]); + }); + + it("'await using' with downlevel generators", async () => { + abstract class Iterator { + return?(): void; + [evaluator.FakeSymbol.iterator]() { + return this; + } + [evaluator.FakeSymbol.dispose]() { + this.return?.(); + } + } + + const { main } = evaluator.evaluateTypeScript( + ` + let exited = false; + + function * f() { + try { + yield; + } + finally { + exited = true; + } + } + + export async function main() { + { + await using g = f(); + g.next(); + } + + return exited; + } + `, + { + target: ts.ScriptTarget.ES5, + }, + { + Iterator, + }, + ); + + const exited = await main(); + assert.isTrue(exited, "Expected 'await using' to dispose generator"); + }); + + it("'await using' with downlevel async generators", async () => { + abstract class AsyncIterator { + return?(): PromiseLike; + [evaluator.FakeSymbol.asyncIterator]() { + return this; + } + async [evaluator.FakeSymbol.asyncDispose]() { + await this.return?.(); + } + } + + const { main } = evaluator.evaluateTypeScript( + ` + let exited = false; + + async function * f() { + try { + yield; + } + finally { + exited = true; + } + } + + export async function main() { + { + await using g = f(); + await g.next(); + } + + return exited; + } + `, + { + target: ts.ScriptTarget.ES5, + }, + { + AsyncIterator, + }, + ); + + const exited = await main(); + assert.isTrue(exited, "Expected 'await using' to dispose async generator"); + }); }); diff --git a/src/testRunner/unittests/evaluation/usingDeclarations.ts b/src/testRunner/unittests/evaluation/usingDeclarations.ts index f244e27844b0d..64bfa12416bc1 100644 --- a/src/testRunner/unittests/evaluation/usingDeclarations.ts +++ b/src/testRunner/unittests/evaluation/usingDeclarations.ts @@ -1811,49 +1811,48 @@ describe("unittests:: evaluation:: usingDeclarations", () => { ]); }); - it("deterministic collapse of Await", async () => { - const { main, output } = evaluator.evaluateTypeScript( - ` - export const output: any[] = []; - - let asyncId = 0; - function increment() { asyncId++; } - - export async function main() { - // increment asyncId at the top of each turn of the microtask queue - let pending = Promise.resolve(); - for (let i = 0; i < 10; i++) { - pending = pending.then(increment); + it("'using' with downlevel generators", () => { + abstract class Iterator { + return?(): void; + [evaluator.FakeSymbol.iterator]() { + return this; } - - { - using sync1 = { [Symbol.dispose]() { output.push(asyncId); } }; // asyncId: 2 - await using async1 = null, async2 = null; - using sync2 = { [Symbol.dispose]() { output.push(asyncId); } }; // asyncId: 1 - await using async3 = null, async4 = null; - output.push(asyncId); // asyncId: 0 + [evaluator.FakeSymbol.dispose]() { + this.return?.(); } + } - output.push(asyncId); // asyncId: Ideally, 2, but ends up being 4 due to delays imposed by 'await' + const { main } = evaluator.evaluateTypeScript( + ` + let exited = false; - await pending; // wait for the remaining 'increment' frames to complete. - } + function * f() { + try { + yield; + } + finally { + exited = true; + } + } + + export function main() { + { + using g = f(); + g.next(); + } + return exited; + } `, - { target: ts.ScriptTarget.ES2018 }, + { + target: ts.ScriptTarget.ES5, + }, + { + Iterator, + }, ); - await main(); - - assert.deepEqual(output, [ - 0, - 1, - 2, - - // This really should be 2, but our transpile introduces an extra `await` by necessity to observe the - // result of __disposeResources. The process of adopting the result ends up taking two turns of the - // microtask queue. - 4, - ]); + const exited = main(); + assert.isTrue(exited, "Expected 'using' to dispose generator"); }); }); diff --git a/tests/baselines/reference/awaitUsingDeclarationsWithAsyncIteratorObject.errors.txt b/tests/baselines/reference/awaitUsingDeclarationsWithAsyncIteratorObject.errors.txt new file mode 100644 index 0000000000000..82e1293db610f --- /dev/null +++ b/tests/baselines/reference/awaitUsingDeclarationsWithAsyncIteratorObject.errors.txt @@ -0,0 +1,19 @@ +awaitUsingDeclarationsWithAsyncIteratorObject.ts(11,23): error TS2851: The initializer of an 'await using' declaration must be either an object with a '[Symbol.asyncDispose]()' or '[Symbol.dispose]()' method, or be 'null' or 'undefined'. + + +==== awaitUsingDeclarationsWithAsyncIteratorObject.ts (1 errors) ==== + declare const ai: AsyncIterator; + declare const aio: AsyncIteratorObject; + declare const ag: AsyncGenerator; + + async function f() { + // should pass + await using it0 = aio; + await using it1 = ag; + + // should fail + await using it2 = ai; + ~~ +!!! error TS2851: The initializer of an 'await using' declaration must be either an object with a '[Symbol.asyncDispose]()' or '[Symbol.dispose]()' method, or be 'null' or 'undefined'. + } + \ No newline at end of file diff --git a/tests/baselines/reference/awaitUsingDeclarationsWithAsyncIteratorObject.symbols b/tests/baselines/reference/awaitUsingDeclarationsWithAsyncIteratorObject.symbols new file mode 100644 index 0000000000000..6ff871600af75 --- /dev/null +++ b/tests/baselines/reference/awaitUsingDeclarationsWithAsyncIteratorObject.symbols @@ -0,0 +1,33 @@ +//// [tests/cases/conformance/statements/VariableStatements/usingDeclarations/awaitUsingDeclarationsWithAsyncIteratorObject.ts] //// + +=== awaitUsingDeclarationsWithAsyncIteratorObject.ts === +declare const ai: AsyncIterator; +>ai : Symbol(ai, Decl(awaitUsingDeclarationsWithAsyncIteratorObject.ts, 0, 13)) +>AsyncIterator : Symbol(AsyncIterator, Decl(lib.es2018.asynciterable.d.ts, --, --)) + +declare const aio: AsyncIteratorObject; +>aio : Symbol(aio, Decl(awaitUsingDeclarationsWithAsyncIteratorObject.ts, 1, 13)) +>AsyncIteratorObject : Symbol(AsyncIteratorObject, Decl(lib.es2018.asynciterable.d.ts, --, --), Decl(lib.esnext.disposable.d.ts, --, --)) + +declare const ag: AsyncGenerator; +>ag : Symbol(ag, Decl(awaitUsingDeclarationsWithAsyncIteratorObject.ts, 2, 13)) +>AsyncGenerator : Symbol(AsyncGenerator, Decl(lib.es2018.asyncgenerator.d.ts, --, --)) + +async function f() { +>f : Symbol(f, Decl(awaitUsingDeclarationsWithAsyncIteratorObject.ts, 2, 47)) + + // should pass + await using it0 = aio; +>it0 : Symbol(it0, Decl(awaitUsingDeclarationsWithAsyncIteratorObject.ts, 6, 15)) +>aio : Symbol(aio, Decl(awaitUsingDeclarationsWithAsyncIteratorObject.ts, 1, 13)) + + await using it1 = ag; +>it1 : Symbol(it1, Decl(awaitUsingDeclarationsWithAsyncIteratorObject.ts, 7, 15)) +>ag : Symbol(ag, Decl(awaitUsingDeclarationsWithAsyncIteratorObject.ts, 2, 13)) + + // should fail + await using it2 = ai; +>it2 : Symbol(it2, Decl(awaitUsingDeclarationsWithAsyncIteratorObject.ts, 10, 15)) +>ai : Symbol(ai, Decl(awaitUsingDeclarationsWithAsyncIteratorObject.ts, 0, 13)) +} + diff --git a/tests/baselines/reference/awaitUsingDeclarationsWithAsyncIteratorObject.types b/tests/baselines/reference/awaitUsingDeclarationsWithAsyncIteratorObject.types new file mode 100644 index 0000000000000..43d7a7d5ed183 --- /dev/null +++ b/tests/baselines/reference/awaitUsingDeclarationsWithAsyncIteratorObject.types @@ -0,0 +1,40 @@ +//// [tests/cases/conformance/statements/VariableStatements/usingDeclarations/awaitUsingDeclarationsWithAsyncIteratorObject.ts] //// + +=== awaitUsingDeclarationsWithAsyncIteratorObject.ts === +declare const ai: AsyncIterator; +>ai : AsyncIterator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +declare const aio: AsyncIteratorObject; +>aio : AsyncIteratorObject +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +declare const ag: AsyncGenerator; +>ag : AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +async function f() { +>f : () => Promise +> : ^^^^^^^^^^^^^^^^^^^ + + // should pass + await using it0 = aio; +>it0 : AsyncIteratorObject +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>aio : AsyncIteratorObject +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + await using it1 = ag; +>it1 : AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>ag : AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + // should fail + await using it2 = ai; +>it2 : AsyncIterator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>ai : AsyncIterator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +} + diff --git a/tests/baselines/reference/awaitUsingDeclarationsWithIteratorObject.errors.txt b/tests/baselines/reference/awaitUsingDeclarationsWithIteratorObject.errors.txt new file mode 100644 index 0000000000000..af20bc9b029b8 --- /dev/null +++ b/tests/baselines/reference/awaitUsingDeclarationsWithIteratorObject.errors.txt @@ -0,0 +1,28 @@ +awaitUsingDeclarationsWithIteratorObject.ts(20,23): error TS2851: The initializer of an 'await using' declaration must be either an object with a '[Symbol.asyncDispose]()' or '[Symbol.dispose]()' method, or be 'null' or 'undefined'. + + +==== awaitUsingDeclarationsWithIteratorObject.ts (1 errors) ==== + declare const i: Iterator; + declare const io: IteratorObject; + declare const g: Generator; + + class MyIterator extends Iterator { + next() { return { done: true, value: undefined }; } + } + + async function f() { + // should pass + await using it0 = io; + await using it1 = g; + await using it2 = Iterator.from(i) + await using it3 = new MyIterator(); + await using it4 = [].values(); + await using it5 = new Map().entries(); + await using it6 = new Set().keys(); + + // should fail + await using it7 = i; + ~ +!!! error TS2851: The initializer of an 'await using' declaration must be either an object with a '[Symbol.asyncDispose]()' or '[Symbol.dispose]()' method, or be 'null' or 'undefined'. + } + \ No newline at end of file diff --git a/tests/baselines/reference/awaitUsingDeclarationsWithIteratorObject.symbols b/tests/baselines/reference/awaitUsingDeclarationsWithIteratorObject.symbols new file mode 100644 index 0000000000000..11f28871b6eab --- /dev/null +++ b/tests/baselines/reference/awaitUsingDeclarationsWithIteratorObject.symbols @@ -0,0 +1,72 @@ +//// [tests/cases/conformance/statements/VariableStatements/usingDeclarations/awaitUsingDeclarationsWithIteratorObject.ts] //// + +=== awaitUsingDeclarationsWithIteratorObject.ts === +declare const i: Iterator; +>i : Symbol(i, Decl(awaitUsingDeclarationsWithIteratorObject.ts, 0, 13)) +>Iterator : Symbol(Iterator, Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --)) + +declare const io: IteratorObject; +>io : Symbol(io, Decl(awaitUsingDeclarationsWithIteratorObject.ts, 1, 13)) +>IteratorObject : Symbol(IteratorObject, Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.esnext.disposable.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --)) + +declare const g: Generator; +>g : Symbol(g, Decl(awaitUsingDeclarationsWithIteratorObject.ts, 2, 13)) +>Generator : Symbol(Generator, Decl(lib.es2015.generator.d.ts, --, --)) + +class MyIterator extends Iterator { +>MyIterator : Symbol(MyIterator, Decl(awaitUsingDeclarationsWithIteratorObject.ts, 2, 41)) +>Iterator : Symbol(Iterator, Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --)) + + next() { return { done: true, value: undefined }; } +>next : Symbol(MyIterator.next, Decl(awaitUsingDeclarationsWithIteratorObject.ts, 4, 43)) +>done : Symbol(done, Decl(awaitUsingDeclarationsWithIteratorObject.ts, 5, 21)) +>value : Symbol(value, Decl(awaitUsingDeclarationsWithIteratorObject.ts, 5, 33)) +>undefined : Symbol(undefined) +} + +async function f() { +>f : Symbol(f, Decl(awaitUsingDeclarationsWithIteratorObject.ts, 6, 1)) + + // should pass + await using it0 = io; +>it0 : Symbol(it0, Decl(awaitUsingDeclarationsWithIteratorObject.ts, 10, 15)) +>io : Symbol(io, Decl(awaitUsingDeclarationsWithIteratorObject.ts, 1, 13)) + + await using it1 = g; +>it1 : Symbol(it1, Decl(awaitUsingDeclarationsWithIteratorObject.ts, 11, 15)) +>g : Symbol(g, Decl(awaitUsingDeclarationsWithIteratorObject.ts, 2, 13)) + + await using it2 = Iterator.from(i) +>it2 : Symbol(it2, Decl(awaitUsingDeclarationsWithIteratorObject.ts, 12, 15)) +>Iterator.from : Symbol(IteratorConstructor.from, Decl(lib.esnext.iterator.d.ts, --, --)) +>Iterator : Symbol(Iterator, Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --)) +>from : Symbol(IteratorConstructor.from, Decl(lib.esnext.iterator.d.ts, --, --)) +>i : Symbol(i, Decl(awaitUsingDeclarationsWithIteratorObject.ts, 0, 13)) + + await using it3 = new MyIterator(); +>it3 : Symbol(it3, Decl(awaitUsingDeclarationsWithIteratorObject.ts, 13, 15)) +>MyIterator : Symbol(MyIterator, Decl(awaitUsingDeclarationsWithIteratorObject.ts, 2, 41)) + + await using it4 = [].values(); +>it4 : Symbol(it4, Decl(awaitUsingDeclarationsWithIteratorObject.ts, 14, 15)) +>[].values : Symbol(Array.values, Decl(lib.es2015.iterable.d.ts, --, --)) +>values : Symbol(Array.values, Decl(lib.es2015.iterable.d.ts, --, --)) + + await using it5 = new Map().entries(); +>it5 : Symbol(it5, Decl(awaitUsingDeclarationsWithIteratorObject.ts, 15, 15)) +>new Map().entries : Symbol(Map.entries, Decl(lib.es2015.iterable.d.ts, --, --)) +>Map : Symbol(Map, Decl(lib.es2015.collection.d.ts, --, --), Decl(lib.es2015.collection.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>entries : Symbol(Map.entries, Decl(lib.es2015.iterable.d.ts, --, --)) + + await using it6 = new Set().keys(); +>it6 : Symbol(it6, Decl(awaitUsingDeclarationsWithIteratorObject.ts, 16, 15)) +>new Set().keys : Symbol(Set.keys, Decl(lib.es2015.iterable.d.ts, --, --)) +>Set : Symbol(Set, Decl(lib.es2015.collection.d.ts, --, --), Decl(lib.es2015.collection.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.esnext.collection.d.ts, --, --)) +>keys : Symbol(Set.keys, Decl(lib.es2015.iterable.d.ts, --, --)) + + // should fail + await using it7 = i; +>it7 : Symbol(it7, Decl(awaitUsingDeclarationsWithIteratorObject.ts, 19, 15)) +>i : Symbol(i, Decl(awaitUsingDeclarationsWithIteratorObject.ts, 0, 13)) +} + diff --git a/tests/baselines/reference/awaitUsingDeclarationsWithIteratorObject.types b/tests/baselines/reference/awaitUsingDeclarationsWithIteratorObject.types new file mode 100644 index 0000000000000..54cd3d16dd0e9 --- /dev/null +++ b/tests/baselines/reference/awaitUsingDeclarationsWithIteratorObject.types @@ -0,0 +1,123 @@ +//// [tests/cases/conformance/statements/VariableStatements/usingDeclarations/awaitUsingDeclarationsWithIteratorObject.ts] //// + +=== awaitUsingDeclarationsWithIteratorObject.ts === +declare const i: Iterator; +>i : Iterator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +declare const io: IteratorObject; +>io : IteratorObject +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +declare const g: Generator; +>g : Generator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +class MyIterator extends Iterator { +>MyIterator : MyIterator +> : ^^^^^^^^^^ +>Iterator : Iterator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + next() { return { done: true, value: undefined }; } +>next : () => { done: boolean; value: any; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>{ done: true, value: undefined } : { done: boolean; value: undefined; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>done : boolean +> : ^^^^^^^ +>true : true +> : ^^^^ +>value : undefined +> : ^^^^^^^^^ +>undefined : undefined +> : ^^^^^^^^^ +} + +async function f() { +>f : () => Promise +> : ^^^^^^^^^^^^^^^^^^^ + + // should pass + await using it0 = io; +>it0 : IteratorObject +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>io : IteratorObject +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + await using it1 = g; +>it1 : Generator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>g : Generator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + await using it2 = Iterator.from(i) +>it2 : IteratorObject +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>Iterator.from(i) : IteratorObject +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>Iterator.from : (value: Iterator | Iterable) => IteratorObject +> : ^ ^^ ^^ ^^^^^ +>Iterator : IteratorConstructor +> : ^^^^^^^^^^^^^^^^^^^ +>from : (value: Iterator | Iterable) => IteratorObject +> : ^ ^^ ^^ ^^^^^ +>i : Iterator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + await using it3 = new MyIterator(); +>it3 : MyIterator +> : ^^^^^^^^^^ +>new MyIterator() : MyIterator +> : ^^^^^^^^^^ +>MyIterator : typeof MyIterator +> : ^^^^^^^^^^^^^^^^^ + + await using it4 = [].values(); +>it4 : ArrayIterator +> : ^^^^^^^^^^^^^^^^^^ +>[].values() : ArrayIterator +> : ^^^^^^^^^^^^^^^^^^ +>[].values : () => ArrayIterator +> : ^^^^^^^^^^^^^^^^^^^^^^^^ +>[] : undefined[] +> : ^^^^^^^^^^^ +>values : () => ArrayIterator +> : ^^^^^^^^^^^^^^^^^^^^^^^^ + + await using it5 = new Map().entries(); +>it5 : MapIterator<[string, string]> +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>new Map().entries() : MapIterator<[string, string]> +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>new Map().entries : () => MapIterator<[string, string]> +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>new Map() : Map +> : ^^^^^^^^^^^^^^^^^^^ +>Map : MapConstructor +> : ^^^^^^^^^^^^^^ +>entries : () => MapIterator<[string, string]> +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + await using it6 = new Set().keys(); +>it6 : SetIterator +> : ^^^^^^^^^^^^^^^^^^^ +>new Set().keys() : SetIterator +> : ^^^^^^^^^^^^^^^^^^^ +>new Set().keys : () => SetIterator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^ +>new Set() : Set +> : ^^^^^^^^^^^ +>Set : SetConstructor +> : ^^^^^^^^^^^^^^ +>keys : () => SetIterator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^ + + // should fail + await using it7 = i; +>it7 : Iterator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>i : Iterator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +} + diff --git a/tests/baselines/reference/builtinIterator.symbols b/tests/baselines/reference/builtinIterator.symbols index 00c37ef1982b3..34ba5eea534dd 100644 --- a/tests/baselines/reference/builtinIterator.symbols +++ b/tests/baselines/reference/builtinIterator.symbols @@ -184,7 +184,7 @@ const iter1 = Iterator.from(g1); declare const iter2: IteratorObject; >iter2 : Symbol(iter2, Decl(builtinIterator.ts, 71, 13)) ->IteratorObject : Symbol(IteratorObject, Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --)) +>IteratorObject : Symbol(IteratorObject, Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.esnext.disposable.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --)) const iter3 = iter2.flatMap(() => g1); >iter3 : Symbol(iter3, Decl(builtinIterator.ts, 72, 5)) diff --git a/tests/baselines/reference/discriminateWithOptionalProperty2(exactoptionalpropertytypes=false).symbols b/tests/baselines/reference/discriminateWithOptionalProperty2(exactoptionalpropertytypes=false).symbols index 92e1297495f1b..d0e1cd81e8272 100644 --- a/tests/baselines/reference/discriminateWithOptionalProperty2(exactoptionalpropertytypes=false).symbols +++ b/tests/baselines/reference/discriminateWithOptionalProperty2(exactoptionalpropertytypes=false).symbols @@ -110,8 +110,10 @@ function mapAsyncIterable( >next : Symbol(AsyncIterator.next, Decl(lib.es2018.asynciterable.d.ts, --, --)) }, - async return(): Promise> { + async return(value: R): Promise> { >return : Symbol(return, Decl(discriminateWithOptionalProperty2.ts, 32, 6)) +>value : Symbol(value, Decl(discriminateWithOptionalProperty2.ts, 33, 17)) +>R : Symbol(R, Decl(discriminateWithOptionalProperty2.ts, 4, 31)) >Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2018.promise.d.ts, --, --)) >IteratorResult : Symbol(IteratorResult, Decl(lib.es2015.iterable.d.ts, --, --)) >U : Symbol(U, Decl(discriminateWithOptionalProperty2.ts, 4, 28)) @@ -122,11 +124,12 @@ function mapAsyncIterable( >iterator : Symbol(iterator, Decl(discriminateWithOptionalProperty2.ts, 8, 7)) >return : Symbol(AsyncIterator.return, Decl(lib.es2018.asynciterable.d.ts, --, --)) - ? mapResult(await iterator.return()) + ? mapResult(await iterator.return(value)) >mapResult : Symbol(mapResult, Decl(discriminateWithOptionalProperty2.ts, 8, 52)) >iterator.return : Symbol(AsyncIterator.return, Decl(lib.es2018.asynciterable.d.ts, --, --)) >iterator : Symbol(iterator, Decl(discriminateWithOptionalProperty2.ts, 8, 7)) >return : Symbol(AsyncIterator.return, Decl(lib.es2018.asynciterable.d.ts, --, --)) +>value : Symbol(value, Decl(discriminateWithOptionalProperty2.ts, 33, 17)) : { value: undefined as any, done: true }; >value : Symbol(value, Decl(discriminateWithOptionalProperty2.ts, 36, 11)) @@ -164,35 +167,47 @@ function mapAsyncIterable( >this : Symbol(AsyncGenerator, Decl(lib.es2018.asyncgenerator.d.ts, --, --)) }, + async [Symbol.asyncDispose]() { +>[Symbol.asyncDispose] : Symbol([Symbol.asyncDispose], Decl(discriminateWithOptionalProperty2.ts, 46, 6)) +>Symbol.asyncDispose : Symbol(SymbolConstructor.asyncDispose, Decl(lib.esnext.disposable.d.ts, --, --)) +>Symbol : Symbol(Symbol, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2019.symbol.d.ts, --, --)) +>asyncDispose : Symbol(SymbolConstructor.asyncDispose, Decl(lib.esnext.disposable.d.ts, --, --)) + + await this.return(undefined!); +>this.return : Symbol(AsyncGenerator.return, Decl(lib.es2018.asyncgenerator.d.ts, --, --)) +>this : Symbol(AsyncGenerator, Decl(lib.es2018.asyncgenerator.d.ts, --, --)) +>return : Symbol(AsyncGenerator.return, Decl(lib.es2018.asyncgenerator.d.ts, --, --)) +>undefined : Symbol(undefined) + } }; } const items = [1, 2, 3]; ->items : Symbol(items, Decl(discriminateWithOptionalProperty2.ts, 50, 5)) +>items : Symbol(items, Decl(discriminateWithOptionalProperty2.ts, 53, 5)) const iterable = { ->iterable : Symbol(iterable, Decl(discriminateWithOptionalProperty2.ts, 52, 5)) +>iterable : Symbol(iterable, Decl(discriminateWithOptionalProperty2.ts, 55, 5)) [Symbol.asyncIterator]() { ->[Symbol.asyncIterator] : Symbol([Symbol.asyncIterator], Decl(discriminateWithOptionalProperty2.ts, 52, 18)) +>[Symbol.asyncIterator] : Symbol([Symbol.asyncIterator], Decl(discriminateWithOptionalProperty2.ts, 55, 18)) >Symbol.asyncIterator : Symbol(SymbolConstructor.asyncIterator, Decl(lib.es2018.asynciterable.d.ts, --, --)) >Symbol : Symbol(Symbol, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2019.symbol.d.ts, --, --)) >asyncIterator : Symbol(SymbolConstructor.asyncIterator, Decl(lib.es2018.asynciterable.d.ts, --, --)) return this; ->this : Symbol(iterable, Decl(discriminateWithOptionalProperty2.ts, 52, 16)) +>this : Symbol(iterable, Decl(discriminateWithOptionalProperty2.ts, 55, 16)) }, next() { ->next : Symbol(next, Decl(discriminateWithOptionalProperty2.ts, 55, 4)) +>next : Symbol(next, Decl(discriminateWithOptionalProperty2.ts, 58, 4)) const value = items[0]; ->value : Symbol(value, Decl(discriminateWithOptionalProperty2.ts, 57, 9)) ->items : Symbol(items, Decl(discriminateWithOptionalProperty2.ts, 50, 5)) +>value : Symbol(value, Decl(discriminateWithOptionalProperty2.ts, 60, 9)) +>items : Symbol(items, Decl(discriminateWithOptionalProperty2.ts, 53, 5)) items.shift(); >items.shift : Symbol(Array.shift, Decl(lib.es5.d.ts, --, --)) ->items : Symbol(items, Decl(discriminateWithOptionalProperty2.ts, 50, 5)) +>items : Symbol(items, Decl(discriminateWithOptionalProperty2.ts, 53, 5)) >shift : Symbol(Array.shift, Decl(lib.es5.d.ts, --, --)) return Promise.resolve({ @@ -201,23 +216,23 @@ const iterable = { >resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) done: items.length === 0, ->done : Symbol(done, Decl(discriminateWithOptionalProperty2.ts, 59, 28)) +>done : Symbol(done, Decl(discriminateWithOptionalProperty2.ts, 62, 28)) >items.length : Symbol(Array.length, Decl(lib.es5.d.ts, --, --)) ->items : Symbol(items, Decl(discriminateWithOptionalProperty2.ts, 50, 5)) +>items : Symbol(items, Decl(discriminateWithOptionalProperty2.ts, 53, 5)) >length : Symbol(Array.length, Decl(lib.es5.d.ts, --, --)) value, ->value : Symbol(value, Decl(discriminateWithOptionalProperty2.ts, 60, 31)) +>value : Symbol(value, Decl(discriminateWithOptionalProperty2.ts, 63, 31)) }); }, }; const doubles = mapAsyncIterable(iterable, (x) => x + x); ->doubles : Symbol(doubles, Decl(discriminateWithOptionalProperty2.ts, 66, 5)) +>doubles : Symbol(doubles, Decl(discriminateWithOptionalProperty2.ts, 69, 5)) >mapAsyncIterable : Symbol(mapAsyncIterable, Decl(discriminateWithOptionalProperty2.ts, 2, 40)) ->iterable : Symbol(iterable, Decl(discriminateWithOptionalProperty2.ts, 52, 5)) ->x : Symbol(x, Decl(discriminateWithOptionalProperty2.ts, 66, 44)) ->x : Symbol(x, Decl(discriminateWithOptionalProperty2.ts, 66, 44)) ->x : Symbol(x, Decl(discriminateWithOptionalProperty2.ts, 66, 44)) +>iterable : Symbol(iterable, Decl(discriminateWithOptionalProperty2.ts, 55, 5)) +>x : Symbol(x, Decl(discriminateWithOptionalProperty2.ts, 69, 44)) +>x : Symbol(x, Decl(discriminateWithOptionalProperty2.ts, 69, 44)) +>x : Symbol(x, Decl(discriminateWithOptionalProperty2.ts, 69, 44)) diff --git a/tests/baselines/reference/discriminateWithOptionalProperty2(exactoptionalpropertytypes=false).types b/tests/baselines/reference/discriminateWithOptionalProperty2(exactoptionalpropertytypes=false).types index ef7c8c5ae73d8..e0c4f8568b68e 100644 --- a/tests/baselines/reference/discriminateWithOptionalProperty2(exactoptionalpropertytypes=false).types +++ b/tests/baselines/reference/discriminateWithOptionalProperty2(exactoptionalpropertytypes=false).types @@ -125,8 +125,8 @@ function mapAsyncIterable( } return { ->{ async next() { return mapResult(await iterator.next()); }, async return(): Promise> { return typeof iterator.return === "function" ? mapResult(await iterator.return()) : { value: undefined as any, done: true }; }, async throw(error?: unknown) { if (typeof iterator.throw === "function") { return mapResult(await iterator.throw(error)); } throw error; }, [Symbol.asyncIterator]() { return this; }, } : { next(): Promise>; return(): Promise>; throw(error?: unknown): Promise>; [Symbol.asyncIterator](): AsyncGenerator; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^ ^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>{ async next() { return mapResult(await iterator.next()); }, async return(value: R): Promise> { return typeof iterator.return === "function" ? mapResult(await iterator.return(value)) : { value: undefined as any, done: true }; }, async throw(error?: unknown) { if (typeof iterator.throw === "function") { return mapResult(await iterator.throw(error)); } throw error; }, [Symbol.asyncIterator]() { return this; }, async [Symbol.asyncDispose]() { await this.return(undefined!); } } : { next(): Promise>; return(value: R): Promise>; throw(error?: unknown): Promise>; [Symbol.asyncIterator](): AsyncGenerator; [Symbol.asyncDispose](): Promise; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^^ ^^^^^^^^ ^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ async next() { >next : () => Promise> @@ -149,13 +149,15 @@ function mapAsyncIterable( > : ^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ }, - async return(): Promise> { ->return : () => Promise> -> : ^^^^^^ + async return(value: R): Promise> { +>return : (value: R) => Promise> +> : ^ ^^ ^^^^^ +>value : R +> : ^ return typeof iterator.return === "function" ->typeof iterator.return === "function" ? mapResult(await iterator.return()) : { value: undefined as any, done: true } : Promise> | { value: any; done: true; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^ +>typeof iterator.return === "function" ? mapResult(await iterator.return(value)) : { value: undefined as any, done: true } : Promise> | { value: any; done: true; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^ >typeof iterator.return === "function" : boolean > : ^^^^^^^ >typeof iterator.return : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" @@ -169,21 +171,23 @@ function mapAsyncIterable( >"function" : "function" > : ^^^^^^^^^^ - ? mapResult(await iterator.return()) ->mapResult(await iterator.return()) : Promise> -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + ? mapResult(await iterator.return(value)) +>mapResult(await iterator.return(value)) : Promise> +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >mapResult : (result: IteratorResult) => Promise> > : ^ ^^ ^^^^^ ->await iterator.return() : IteratorResult -> : ^^^^^^^^^^^^^^^^^^^^ ->iterator.return() : Promise> -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>await iterator.return(value) : IteratorResult +> : ^^^^^^^^^^^^^^^^^^^^ +>iterator.return(value) : Promise> +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >iterator.return : (value?: R | PromiseLike | undefined) => Promise> > : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >iterator : AsyncIterator > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >return : (value?: R | PromiseLike | undefined) => Promise> > : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>value : R +> : ^ : { value: undefined as any, done: true }; >{ value: undefined as any, done: true } : { value: any; done: true; } @@ -256,6 +260,32 @@ function mapAsyncIterable( > : ^^^^^^^^^^^^^^^^^^^^^^^^^^ }, + async [Symbol.asyncDispose]() { +>[Symbol.asyncDispose] : () => Promise +> : ^^^^^^^^^^^^^^^^^^^ +>Symbol.asyncDispose : unique symbol +> : ^^^^^^^^^^^^^ +>Symbol : SymbolConstructor +> : ^^^^^^^^^^^^^^^^^ +>asyncDispose : unique symbol +> : ^^^^^^^^^^^^^ + + await this.return(undefined!); +>await this.return(undefined!) : IteratorResult +> : ^^^^^^^^^^^^^^^^^^^^ +>this.return(undefined!) : Promise> +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>this.return : (value: R | PromiseLike) => Promise> +> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>this : AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^ +>return : (value: R | PromiseLike) => Promise> +> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>undefined! : never +> : ^^^^^ +>undefined : undefined +> : ^^^^^^^^^ + } }; } diff --git a/tests/baselines/reference/discriminateWithOptionalProperty2(exactoptionalpropertytypes=true).symbols b/tests/baselines/reference/discriminateWithOptionalProperty2(exactoptionalpropertytypes=true).symbols index 92e1297495f1b..d0e1cd81e8272 100644 --- a/tests/baselines/reference/discriminateWithOptionalProperty2(exactoptionalpropertytypes=true).symbols +++ b/tests/baselines/reference/discriminateWithOptionalProperty2(exactoptionalpropertytypes=true).symbols @@ -110,8 +110,10 @@ function mapAsyncIterable( >next : Symbol(AsyncIterator.next, Decl(lib.es2018.asynciterable.d.ts, --, --)) }, - async return(): Promise> { + async return(value: R): Promise> { >return : Symbol(return, Decl(discriminateWithOptionalProperty2.ts, 32, 6)) +>value : Symbol(value, Decl(discriminateWithOptionalProperty2.ts, 33, 17)) +>R : Symbol(R, Decl(discriminateWithOptionalProperty2.ts, 4, 31)) >Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2018.promise.d.ts, --, --)) >IteratorResult : Symbol(IteratorResult, Decl(lib.es2015.iterable.d.ts, --, --)) >U : Symbol(U, Decl(discriminateWithOptionalProperty2.ts, 4, 28)) @@ -122,11 +124,12 @@ function mapAsyncIterable( >iterator : Symbol(iterator, Decl(discriminateWithOptionalProperty2.ts, 8, 7)) >return : Symbol(AsyncIterator.return, Decl(lib.es2018.asynciterable.d.ts, --, --)) - ? mapResult(await iterator.return()) + ? mapResult(await iterator.return(value)) >mapResult : Symbol(mapResult, Decl(discriminateWithOptionalProperty2.ts, 8, 52)) >iterator.return : Symbol(AsyncIterator.return, Decl(lib.es2018.asynciterable.d.ts, --, --)) >iterator : Symbol(iterator, Decl(discriminateWithOptionalProperty2.ts, 8, 7)) >return : Symbol(AsyncIterator.return, Decl(lib.es2018.asynciterable.d.ts, --, --)) +>value : Symbol(value, Decl(discriminateWithOptionalProperty2.ts, 33, 17)) : { value: undefined as any, done: true }; >value : Symbol(value, Decl(discriminateWithOptionalProperty2.ts, 36, 11)) @@ -164,35 +167,47 @@ function mapAsyncIterable( >this : Symbol(AsyncGenerator, Decl(lib.es2018.asyncgenerator.d.ts, --, --)) }, + async [Symbol.asyncDispose]() { +>[Symbol.asyncDispose] : Symbol([Symbol.asyncDispose], Decl(discriminateWithOptionalProperty2.ts, 46, 6)) +>Symbol.asyncDispose : Symbol(SymbolConstructor.asyncDispose, Decl(lib.esnext.disposable.d.ts, --, --)) +>Symbol : Symbol(Symbol, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2019.symbol.d.ts, --, --)) +>asyncDispose : Symbol(SymbolConstructor.asyncDispose, Decl(lib.esnext.disposable.d.ts, --, --)) + + await this.return(undefined!); +>this.return : Symbol(AsyncGenerator.return, Decl(lib.es2018.asyncgenerator.d.ts, --, --)) +>this : Symbol(AsyncGenerator, Decl(lib.es2018.asyncgenerator.d.ts, --, --)) +>return : Symbol(AsyncGenerator.return, Decl(lib.es2018.asyncgenerator.d.ts, --, --)) +>undefined : Symbol(undefined) + } }; } const items = [1, 2, 3]; ->items : Symbol(items, Decl(discriminateWithOptionalProperty2.ts, 50, 5)) +>items : Symbol(items, Decl(discriminateWithOptionalProperty2.ts, 53, 5)) const iterable = { ->iterable : Symbol(iterable, Decl(discriminateWithOptionalProperty2.ts, 52, 5)) +>iterable : Symbol(iterable, Decl(discriminateWithOptionalProperty2.ts, 55, 5)) [Symbol.asyncIterator]() { ->[Symbol.asyncIterator] : Symbol([Symbol.asyncIterator], Decl(discriminateWithOptionalProperty2.ts, 52, 18)) +>[Symbol.asyncIterator] : Symbol([Symbol.asyncIterator], Decl(discriminateWithOptionalProperty2.ts, 55, 18)) >Symbol.asyncIterator : Symbol(SymbolConstructor.asyncIterator, Decl(lib.es2018.asynciterable.d.ts, --, --)) >Symbol : Symbol(Symbol, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2019.symbol.d.ts, --, --)) >asyncIterator : Symbol(SymbolConstructor.asyncIterator, Decl(lib.es2018.asynciterable.d.ts, --, --)) return this; ->this : Symbol(iterable, Decl(discriminateWithOptionalProperty2.ts, 52, 16)) +>this : Symbol(iterable, Decl(discriminateWithOptionalProperty2.ts, 55, 16)) }, next() { ->next : Symbol(next, Decl(discriminateWithOptionalProperty2.ts, 55, 4)) +>next : Symbol(next, Decl(discriminateWithOptionalProperty2.ts, 58, 4)) const value = items[0]; ->value : Symbol(value, Decl(discriminateWithOptionalProperty2.ts, 57, 9)) ->items : Symbol(items, Decl(discriminateWithOptionalProperty2.ts, 50, 5)) +>value : Symbol(value, Decl(discriminateWithOptionalProperty2.ts, 60, 9)) +>items : Symbol(items, Decl(discriminateWithOptionalProperty2.ts, 53, 5)) items.shift(); >items.shift : Symbol(Array.shift, Decl(lib.es5.d.ts, --, --)) ->items : Symbol(items, Decl(discriminateWithOptionalProperty2.ts, 50, 5)) +>items : Symbol(items, Decl(discriminateWithOptionalProperty2.ts, 53, 5)) >shift : Symbol(Array.shift, Decl(lib.es5.d.ts, --, --)) return Promise.resolve({ @@ -201,23 +216,23 @@ const iterable = { >resolve : Symbol(PromiseConstructor.resolve, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --)) done: items.length === 0, ->done : Symbol(done, Decl(discriminateWithOptionalProperty2.ts, 59, 28)) +>done : Symbol(done, Decl(discriminateWithOptionalProperty2.ts, 62, 28)) >items.length : Symbol(Array.length, Decl(lib.es5.d.ts, --, --)) ->items : Symbol(items, Decl(discriminateWithOptionalProperty2.ts, 50, 5)) +>items : Symbol(items, Decl(discriminateWithOptionalProperty2.ts, 53, 5)) >length : Symbol(Array.length, Decl(lib.es5.d.ts, --, --)) value, ->value : Symbol(value, Decl(discriminateWithOptionalProperty2.ts, 60, 31)) +>value : Symbol(value, Decl(discriminateWithOptionalProperty2.ts, 63, 31)) }); }, }; const doubles = mapAsyncIterable(iterable, (x) => x + x); ->doubles : Symbol(doubles, Decl(discriminateWithOptionalProperty2.ts, 66, 5)) +>doubles : Symbol(doubles, Decl(discriminateWithOptionalProperty2.ts, 69, 5)) >mapAsyncIterable : Symbol(mapAsyncIterable, Decl(discriminateWithOptionalProperty2.ts, 2, 40)) ->iterable : Symbol(iterable, Decl(discriminateWithOptionalProperty2.ts, 52, 5)) ->x : Symbol(x, Decl(discriminateWithOptionalProperty2.ts, 66, 44)) ->x : Symbol(x, Decl(discriminateWithOptionalProperty2.ts, 66, 44)) ->x : Symbol(x, Decl(discriminateWithOptionalProperty2.ts, 66, 44)) +>iterable : Symbol(iterable, Decl(discriminateWithOptionalProperty2.ts, 55, 5)) +>x : Symbol(x, Decl(discriminateWithOptionalProperty2.ts, 69, 44)) +>x : Symbol(x, Decl(discriminateWithOptionalProperty2.ts, 69, 44)) +>x : Symbol(x, Decl(discriminateWithOptionalProperty2.ts, 69, 44)) diff --git a/tests/baselines/reference/discriminateWithOptionalProperty2(exactoptionalpropertytypes=true).types b/tests/baselines/reference/discriminateWithOptionalProperty2(exactoptionalpropertytypes=true).types index ef7c8c5ae73d8..e0c4f8568b68e 100644 --- a/tests/baselines/reference/discriminateWithOptionalProperty2(exactoptionalpropertytypes=true).types +++ b/tests/baselines/reference/discriminateWithOptionalProperty2(exactoptionalpropertytypes=true).types @@ -125,8 +125,8 @@ function mapAsyncIterable( } return { ->{ async next() { return mapResult(await iterator.next()); }, async return(): Promise> { return typeof iterator.return === "function" ? mapResult(await iterator.return()) : { value: undefined as any, done: true }; }, async throw(error?: unknown) { if (typeof iterator.throw === "function") { return mapResult(await iterator.throw(error)); } throw error; }, [Symbol.asyncIterator]() { return this; }, } : { next(): Promise>; return(): Promise>; throw(error?: unknown): Promise>; [Symbol.asyncIterator](): AsyncGenerator; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^ ^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>{ async next() { return mapResult(await iterator.next()); }, async return(value: R): Promise> { return typeof iterator.return === "function" ? mapResult(await iterator.return(value)) : { value: undefined as any, done: true }; }, async throw(error?: unknown) { if (typeof iterator.throw === "function") { return mapResult(await iterator.throw(error)); } throw error; }, [Symbol.asyncIterator]() { return this; }, async [Symbol.asyncDispose]() { await this.return(undefined!); } } : { next(): Promise>; return(value: R): Promise>; throw(error?: unknown): Promise>; [Symbol.asyncIterator](): AsyncGenerator; [Symbol.asyncDispose](): Promise; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^^ ^^^^^^^^ ^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ async next() { >next : () => Promise> @@ -149,13 +149,15 @@ function mapAsyncIterable( > : ^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ }, - async return(): Promise> { ->return : () => Promise> -> : ^^^^^^ + async return(value: R): Promise> { +>return : (value: R) => Promise> +> : ^ ^^ ^^^^^ +>value : R +> : ^ return typeof iterator.return === "function" ->typeof iterator.return === "function" ? mapResult(await iterator.return()) : { value: undefined as any, done: true } : Promise> | { value: any; done: true; } -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^ +>typeof iterator.return === "function" ? mapResult(await iterator.return(value)) : { value: undefined as any, done: true } : Promise> | { value: any; done: true; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^ >typeof iterator.return === "function" : boolean > : ^^^^^^^ >typeof iterator.return : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" @@ -169,21 +171,23 @@ function mapAsyncIterable( >"function" : "function" > : ^^^^^^^^^^ - ? mapResult(await iterator.return()) ->mapResult(await iterator.return()) : Promise> -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + ? mapResult(await iterator.return(value)) +>mapResult(await iterator.return(value)) : Promise> +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >mapResult : (result: IteratorResult) => Promise> > : ^ ^^ ^^^^^ ->await iterator.return() : IteratorResult -> : ^^^^^^^^^^^^^^^^^^^^ ->iterator.return() : Promise> -> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>await iterator.return(value) : IteratorResult +> : ^^^^^^^^^^^^^^^^^^^^ +>iterator.return(value) : Promise> +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >iterator.return : (value?: R | PromiseLike | undefined) => Promise> > : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >iterator : AsyncIterator > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >return : (value?: R | PromiseLike | undefined) => Promise> > : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>value : R +> : ^ : { value: undefined as any, done: true }; >{ value: undefined as any, done: true } : { value: any; done: true; } @@ -256,6 +260,32 @@ function mapAsyncIterable( > : ^^^^^^^^^^^^^^^^^^^^^^^^^^ }, + async [Symbol.asyncDispose]() { +>[Symbol.asyncDispose] : () => Promise +> : ^^^^^^^^^^^^^^^^^^^ +>Symbol.asyncDispose : unique symbol +> : ^^^^^^^^^^^^^ +>Symbol : SymbolConstructor +> : ^^^^^^^^^^^^^^^^^ +>asyncDispose : unique symbol +> : ^^^^^^^^^^^^^ + + await this.return(undefined!); +>await this.return(undefined!) : IteratorResult +> : ^^^^^^^^^^^^^^^^^^^^ +>this.return(undefined!) : Promise> +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>this.return : (value: R | PromiseLike) => Promise> +> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>this : AsyncGenerator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^ +>return : (value: R | PromiseLike) => Promise> +> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>undefined! : never +> : ^^^^^ +>undefined : undefined +> : ^^^^^^^^^ + } }; } diff --git a/tests/baselines/reference/usingDeclarationsWithIteratorObject.errors.txt b/tests/baselines/reference/usingDeclarationsWithIteratorObject.errors.txt new file mode 100644 index 0000000000000..3737d17d3f37c --- /dev/null +++ b/tests/baselines/reference/usingDeclarationsWithIteratorObject.errors.txt @@ -0,0 +1,31 @@ +usingDeclarationsWithIteratorObject.ts(20,17): error TS2850: The initializer of a 'using' declaration must be either an object with a '[Symbol.dispose]()' method, or be 'null' or 'undefined'. + Property '[Symbol.dispose]' is missing in type 'Iterator' but required in type 'Disposable'. + + +==== usingDeclarationsWithIteratorObject.ts (1 errors) ==== + declare const i: Iterator; + declare const io: IteratorObject; + declare const g: Generator; + + class MyIterator extends Iterator { + next() { return { done: true, value: undefined }; } + } + + function f() { + // should pass + using it0 = io; + using it1 = g; + using it2 = Iterator.from(i) + using it3 = new MyIterator(); + using it4 = [].values(); + using it5 = new Map().entries(); + using it6 = new Set().keys(); + + // should fail + using it7 = i; + ~ +!!! error TS2850: The initializer of a 'using' declaration must be either an object with a '[Symbol.dispose]()' method, or be 'null' or 'undefined'. +!!! error TS2850: Property '[Symbol.dispose]' is missing in type 'Iterator' but required in type 'Disposable'. +!!! related TS2728 lib.esnext.disposable.d.ts:--:--: '[Symbol.dispose]' is declared here. + } + \ No newline at end of file diff --git a/tests/baselines/reference/usingDeclarationsWithIteratorObject.symbols b/tests/baselines/reference/usingDeclarationsWithIteratorObject.symbols new file mode 100644 index 0000000000000..caf73d6c9baeb --- /dev/null +++ b/tests/baselines/reference/usingDeclarationsWithIteratorObject.symbols @@ -0,0 +1,72 @@ +//// [tests/cases/conformance/statements/VariableStatements/usingDeclarations/usingDeclarationsWithIteratorObject.ts] //// + +=== usingDeclarationsWithIteratorObject.ts === +declare const i: Iterator; +>i : Symbol(i, Decl(usingDeclarationsWithIteratorObject.ts, 0, 13)) +>Iterator : Symbol(Iterator, Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --)) + +declare const io: IteratorObject; +>io : Symbol(io, Decl(usingDeclarationsWithIteratorObject.ts, 1, 13)) +>IteratorObject : Symbol(IteratorObject, Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.esnext.disposable.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --)) + +declare const g: Generator; +>g : Symbol(g, Decl(usingDeclarationsWithIteratorObject.ts, 2, 13)) +>Generator : Symbol(Generator, Decl(lib.es2015.generator.d.ts, --, --)) + +class MyIterator extends Iterator { +>MyIterator : Symbol(MyIterator, Decl(usingDeclarationsWithIteratorObject.ts, 2, 41)) +>Iterator : Symbol(Iterator, Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --)) + + next() { return { done: true, value: undefined }; } +>next : Symbol(MyIterator.next, Decl(usingDeclarationsWithIteratorObject.ts, 4, 43)) +>done : Symbol(done, Decl(usingDeclarationsWithIteratorObject.ts, 5, 21)) +>value : Symbol(value, Decl(usingDeclarationsWithIteratorObject.ts, 5, 33)) +>undefined : Symbol(undefined) +} + +function f() { +>f : Symbol(f, Decl(usingDeclarationsWithIteratorObject.ts, 6, 1)) + + // should pass + using it0 = io; +>it0 : Symbol(it0, Decl(usingDeclarationsWithIteratorObject.ts, 10, 9)) +>io : Symbol(io, Decl(usingDeclarationsWithIteratorObject.ts, 1, 13)) + + using it1 = g; +>it1 : Symbol(it1, Decl(usingDeclarationsWithIteratorObject.ts, 11, 9)) +>g : Symbol(g, Decl(usingDeclarationsWithIteratorObject.ts, 2, 13)) + + using it2 = Iterator.from(i) +>it2 : Symbol(it2, Decl(usingDeclarationsWithIteratorObject.ts, 12, 9)) +>Iterator.from : Symbol(IteratorConstructor.from, Decl(lib.esnext.iterator.d.ts, --, --)) +>Iterator : Symbol(Iterator, Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.esnext.iterator.d.ts, --, --)) +>from : Symbol(IteratorConstructor.from, Decl(lib.esnext.iterator.d.ts, --, --)) +>i : Symbol(i, Decl(usingDeclarationsWithIteratorObject.ts, 0, 13)) + + using it3 = new MyIterator(); +>it3 : Symbol(it3, Decl(usingDeclarationsWithIteratorObject.ts, 13, 9)) +>MyIterator : Symbol(MyIterator, Decl(usingDeclarationsWithIteratorObject.ts, 2, 41)) + + using it4 = [].values(); +>it4 : Symbol(it4, Decl(usingDeclarationsWithIteratorObject.ts, 14, 9)) +>[].values : Symbol(Array.values, Decl(lib.es2015.iterable.d.ts, --, --)) +>values : Symbol(Array.values, Decl(lib.es2015.iterable.d.ts, --, --)) + + using it5 = new Map().entries(); +>it5 : Symbol(it5, Decl(usingDeclarationsWithIteratorObject.ts, 15, 9)) +>new Map().entries : Symbol(Map.entries, Decl(lib.es2015.iterable.d.ts, --, --)) +>Map : Symbol(Map, Decl(lib.es2015.collection.d.ts, --, --), Decl(lib.es2015.collection.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --)) +>entries : Symbol(Map.entries, Decl(lib.es2015.iterable.d.ts, --, --)) + + using it6 = new Set().keys(); +>it6 : Symbol(it6, Decl(usingDeclarationsWithIteratorObject.ts, 16, 9)) +>new Set().keys : Symbol(Set.keys, Decl(lib.es2015.iterable.d.ts, --, --)) +>Set : Symbol(Set, Decl(lib.es2015.collection.d.ts, --, --), Decl(lib.es2015.collection.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.esnext.collection.d.ts, --, --)) +>keys : Symbol(Set.keys, Decl(lib.es2015.iterable.d.ts, --, --)) + + // should fail + using it7 = i; +>it7 : Symbol(it7, Decl(usingDeclarationsWithIteratorObject.ts, 19, 9)) +>i : Symbol(i, Decl(usingDeclarationsWithIteratorObject.ts, 0, 13)) +} + diff --git a/tests/baselines/reference/usingDeclarationsWithIteratorObject.types b/tests/baselines/reference/usingDeclarationsWithIteratorObject.types new file mode 100644 index 0000000000000..ae0dcfe5b55db --- /dev/null +++ b/tests/baselines/reference/usingDeclarationsWithIteratorObject.types @@ -0,0 +1,123 @@ +//// [tests/cases/conformance/statements/VariableStatements/usingDeclarations/usingDeclarationsWithIteratorObject.ts] //// + +=== usingDeclarationsWithIteratorObject.ts === +declare const i: Iterator; +>i : Iterator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +declare const io: IteratorObject; +>io : IteratorObject +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +declare const g: Generator; +>g : Generator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +class MyIterator extends Iterator { +>MyIterator : MyIterator +> : ^^^^^^^^^^ +>Iterator : Iterator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + next() { return { done: true, value: undefined }; } +>next : () => { done: boolean; value: any; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>{ done: true, value: undefined } : { done: boolean; value: undefined; } +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>done : boolean +> : ^^^^^^^ +>true : true +> : ^^^^ +>value : undefined +> : ^^^^^^^^^ +>undefined : undefined +> : ^^^^^^^^^ +} + +function f() { +>f : () => void +> : ^^^^^^^^^^ + + // should pass + using it0 = io; +>it0 : IteratorObject +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>io : IteratorObject +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + using it1 = g; +>it1 : Generator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>g : Generator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + using it2 = Iterator.from(i) +>it2 : IteratorObject +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>Iterator.from(i) : IteratorObject +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>Iterator.from : (value: Iterator | Iterable) => IteratorObject +> : ^ ^^ ^^ ^^^^^ +>Iterator : IteratorConstructor +> : ^^^^^^^^^^^^^^^^^^^ +>from : (value: Iterator | Iterable) => IteratorObject +> : ^ ^^ ^^ ^^^^^ +>i : Iterator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + using it3 = new MyIterator(); +>it3 : MyIterator +> : ^^^^^^^^^^ +>new MyIterator() : MyIterator +> : ^^^^^^^^^^ +>MyIterator : typeof MyIterator +> : ^^^^^^^^^^^^^^^^^ + + using it4 = [].values(); +>it4 : ArrayIterator +> : ^^^^^^^^^^^^^^^^^^ +>[].values() : ArrayIterator +> : ^^^^^^^^^^^^^^^^^^ +>[].values : () => ArrayIterator +> : ^^^^^^^^^^^^^^^^^^^^^^^^ +>[] : undefined[] +> : ^^^^^^^^^^^ +>values : () => ArrayIterator +> : ^^^^^^^^^^^^^^^^^^^^^^^^ + + using it5 = new Map().entries(); +>it5 : MapIterator<[string, string]> +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>new Map().entries() : MapIterator<[string, string]> +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>new Map().entries : () => MapIterator<[string, string]> +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>new Map() : Map +> : ^^^^^^^^^^^^^^^^^^^ +>Map : MapConstructor +> : ^^^^^^^^^^^^^^ +>entries : () => MapIterator<[string, string]> +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + using it6 = new Set().keys(); +>it6 : SetIterator +> : ^^^^^^^^^^^^^^^^^^^ +>new Set().keys() : SetIterator +> : ^^^^^^^^^^^^^^^^^^^ +>new Set().keys : () => SetIterator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^ +>new Set() : Set +> : ^^^^^^^^^^^ +>Set : SetConstructor +> : ^^^^^^^^^^^^^^ +>keys : () => SetIterator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^ + + // should fail + using it7 = i; +>it7 : Iterator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +>i : Iterator +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +} + diff --git a/tests/cases/compiler/discriminateWithOptionalProperty2.ts b/tests/cases/compiler/discriminateWithOptionalProperty2.ts index a8b36cb497489..3cf706f3b95c4 100644 --- a/tests/cases/compiler/discriminateWithOptionalProperty2.ts +++ b/tests/cases/compiler/discriminateWithOptionalProperty2.ts @@ -36,9 +36,9 @@ function mapAsyncIterable( async next() { return mapResult(await iterator.next()); }, - async return(): Promise> { + async return(value: R): Promise> { return typeof iterator.return === "function" - ? mapResult(await iterator.return()) + ? mapResult(await iterator.return(value)) : { value: undefined as any, done: true }; }, async throw(error?: unknown) { @@ -50,6 +50,9 @@ function mapAsyncIterable( [Symbol.asyncIterator]() { return this; }, + async [Symbol.asyncDispose]() { + await this.return(undefined!); + } }; } diff --git a/tests/cases/conformance/statements/VariableStatements/usingDeclarations/awaitUsingDeclarationsWithAsyncIteratorObject.ts b/tests/cases/conformance/statements/VariableStatements/usingDeclarations/awaitUsingDeclarationsWithAsyncIteratorObject.ts new file mode 100644 index 0000000000000..f20f51eb46abc --- /dev/null +++ b/tests/cases/conformance/statements/VariableStatements/usingDeclarations/awaitUsingDeclarationsWithAsyncIteratorObject.ts @@ -0,0 +1,17 @@ +// @target: esnext +// @module: esnext +// @lib: esnext +// @noEmit: true + +declare const ai: AsyncIterator; +declare const aio: AsyncIteratorObject; +declare const ag: AsyncGenerator; + +async function f() { + // should pass + await using it0 = aio; + await using it1 = ag; + + // should fail + await using it2 = ai; +} diff --git a/tests/cases/conformance/statements/VariableStatements/usingDeclarations/awaitUsingDeclarationsWithIteratorObject.ts b/tests/cases/conformance/statements/VariableStatements/usingDeclarations/awaitUsingDeclarationsWithIteratorObject.ts new file mode 100644 index 0000000000000..de8fdd378da79 --- /dev/null +++ b/tests/cases/conformance/statements/VariableStatements/usingDeclarations/awaitUsingDeclarationsWithIteratorObject.ts @@ -0,0 +1,26 @@ +// @target: esnext +// @module: esnext +// @lib: esnext +// @noEmit: true + +declare const i: Iterator; +declare const io: IteratorObject; +declare const g: Generator; + +class MyIterator extends Iterator { + next() { return { done: true, value: undefined }; } +} + +async function f() { + // should pass + await using it0 = io; + await using it1 = g; + await using it2 = Iterator.from(i) + await using it3 = new MyIterator(); + await using it4 = [].values(); + await using it5 = new Map().entries(); + await using it6 = new Set().keys(); + + // should fail + await using it7 = i; +} diff --git a/tests/cases/conformance/statements/VariableStatements/usingDeclarations/usingDeclarationsWithIteratorObject.ts b/tests/cases/conformance/statements/VariableStatements/usingDeclarations/usingDeclarationsWithIteratorObject.ts new file mode 100644 index 0000000000000..59ba2516fea27 --- /dev/null +++ b/tests/cases/conformance/statements/VariableStatements/usingDeclarations/usingDeclarationsWithIteratorObject.ts @@ -0,0 +1,26 @@ +// @target: esnext +// @module: esnext +// @lib: esnext +// @noEmit: true + +declare const i: Iterator; +declare const io: IteratorObject; +declare const g: Generator; + +class MyIterator extends Iterator { + next() { return { done: true, value: undefined }; } +} + +function f() { + // should pass + using it0 = io; + using it1 = g; + using it2 = Iterator.from(i) + using it3 = new MyIterator(); + using it4 = [].values(); + using it5 = new Map().entries(); + using it6 = new Set().keys(); + + // should fail + using it7 = i; +} From 26c4320757d10e1a3fe170ee14b4f6994f0995cb Mon Sep 17 00:00:00 2001 From: Isabel Duan Date: Fri, 16 Aug 2024 13:58:29 -0700 Subject: [PATCH 46/50] also return classes when caling goToDef on a constructor call (#59421) --- src/services/goToDefinition.ts | 24 +- .../goToDefinitionAmbiants.baseline.jsonc | 17 +- ...DefinitionClassConstructors.baseline.jsonc | 100 +++++++ ...structorOfClassExpression01.baseline.jsonc | 272 +++++++++++++++++- ...lassIsPrecededByNamespace01.baseline.jsonc | 17 +- ...initionConstructorOverloads.baseline.jsonc | 129 ++++++++- .../goToDefinitionClassConstructors.ts | 39 +++ ...efinitionConstructorOfClassExpression01.ts | 21 +- .../goToDefinitionConstructorOverloads.ts | 8 + 9 files changed, 601 insertions(+), 26 deletions(-) create mode 100644 tests/baselines/reference/goToDefinitionClassConstructors.baseline.jsonc create mode 100644 tests/cases/fourslash/goToDefinitionClassConstructors.ts diff --git a/src/services/goToDefinition.ts b/src/services/goToDefinition.ts index 0d388a808c628..9a47d90ce1deb 100644 --- a/src/services/goToDefinition.ts +++ b/src/services/goToDefinition.ts @@ -46,6 +46,7 @@ import { isBindingElement, isCallLikeExpression, isCallOrNewExpressionTarget, + isClassDeclaration, isClassElement, isClassExpression, isClassLike, @@ -228,16 +229,20 @@ export function getDefinitionAtPosition(program: Program, sourceFile: SourceFile // Don't go to the component constructor definition for a JSX element, just go to the component definition. if (calledDeclaration && !(isJsxOpeningLikeElement(node.parent) && isJsxConstructorLike(calledDeclaration))) { const sigInfo = createDefinitionFromSignatureDeclaration(typeChecker, calledDeclaration, failedAliasResolution); + // For a function, if this is the original function definition, return just sigInfo. // If this is the original constructor definition, parent is the class. + // Here, we filter declarations to not duplicate returned definitions. + let declarationFilter: (d: Declaration) => boolean = d => d !== calledDeclaration; if (typeChecker.getRootSymbols(symbol).some(s => symbolMatchesSignature(s, calledDeclaration))) { - return [sigInfo]; - } - else { - const defs = getDefinitionFromSymbol(typeChecker, symbol, node, failedAliasResolution, calledDeclaration) || emptyArray; - // For a 'super()' call, put the signature first, else put the variable first. - return node.kind === SyntaxKind.SuperKeyword ? [sigInfo, ...defs] : [...defs, sigInfo]; + if (!isConstructorDeclaration(calledDeclaration)) return [sigInfo]; + + // If we found a constructor declaration, we also look for class declarations as definitions + declarationFilter = (d: Declaration) => d !== calledDeclaration && (isClassDeclaration(d) || isClassExpression(d)); } + const defs = getDefinitionFromSymbol(typeChecker, symbol, node, failedAliasResolution, declarationFilter) || emptyArray; + // For a 'super()' call, put the signature first, else put the variable first. + return node.kind === SyntaxKind.SuperKeyword ? [sigInfo, ...defs] : [...defs, sigInfo]; } // Because name in short-hand property assignment has two different meanings: property name and property value, @@ -584,9 +589,10 @@ function isExpandoDeclaration(node: Declaration): boolean { return !!containingAssignment && getAssignmentDeclarationKind(containingAssignment) === AssignmentDeclarationKind.Property; } -function getDefinitionFromSymbol(typeChecker: TypeChecker, symbol: Symbol, node: Node, failedAliasResolution?: boolean, excludeDeclaration?: Node): DefinitionInfo[] | undefined { - const filteredDeclarations = filter(symbol.declarations, d => d !== excludeDeclaration); - const signatureDefinition = getConstructSignatureDefinition() || getCallSignatureDefinition(); +function getDefinitionFromSymbol(typeChecker: TypeChecker, symbol: Symbol, node: Node, failedAliasResolution?: boolean, declarationFilter?: (d: Declaration) => boolean): DefinitionInfo[] | undefined { + const filteredDeclarations = declarationFilter !== undefined ? filter(symbol.declarations, declarationFilter) : symbol.declarations; + // If we have a declaration filter, we are looking for specific declaration(s), so we should not return prematurely. + const signatureDefinition = !declarationFilter && (getConstructSignatureDefinition() || getCallSignatureDefinition()); if (signatureDefinition) { return signatureDefinition; } diff --git a/tests/baselines/reference/goToDefinitionAmbiants.baseline.jsonc b/tests/baselines/reference/goToDefinitionAmbiants.baseline.jsonc index d6afdd5a52f39..987778aebe9cd 100644 --- a/tests/baselines/reference/goToDefinitionAmbiants.baseline.jsonc +++ b/tests/baselines/reference/goToDefinitionAmbiants.baseline.jsonc @@ -64,11 +64,11 @@ // === /tests/cases/fourslash/goToDefinitionAmbiants.ts === // declare var ambientVar; // declare function ambientFunction(); -// declare class ambientClass { -// [|constructor();|] +// <|declare class [|{| defId: 0 |}ambientClass|] { +// [|{| defId: 1 |}constructor();|] // static method(); // public method(); -// } +// }|> // // ambientVar = 1; // ambientFunction(); @@ -79,6 +79,17 @@ // === Details === [ { + "defId": 0, + "kind": "class", + "name": "ambientClass", + "containerName": "", + "isLocal": false, + "isAmbient": true, + "unverified": false, + "failedAliasResolution": false + }, + { + "defId": 1, "kind": "constructor", "name": "__constructor", "containerName": "ambientClass", diff --git a/tests/baselines/reference/goToDefinitionClassConstructors.baseline.jsonc b/tests/baselines/reference/goToDefinitionClassConstructors.baseline.jsonc new file mode 100644 index 0000000000000..f9ffb95544996 --- /dev/null +++ b/tests/baselines/reference/goToDefinitionClassConstructors.baseline.jsonc @@ -0,0 +1,100 @@ +// === goToDefinition === +// === /tests/cases/fourslash/main.ts === +// <|import { [|Derived|] } from './base'|> +// const derived = new /*GOTO DEF*/Derived(cArg) + + // === Details === + [ + { + "kind": "alias", + "name": "Derived", + "containerName": "", + "isLocal": true, + "isAmbient": false, + "unverified": false, + "failedAliasResolution": true + } + ] + + + +// === goToDefinition === +// === /tests/cases/fourslash/defInSameFile.ts === +// import { Base } from './base' +// <|class [|SameFile|] extends Base { +// readonly name: string = 'SameFile' +// }|> +// const SameFile = new /*GOTO DEF*/SameFile(cArg) +// const wrapper = new Base(cArg) + + // === Details === + [ + { + "kind": "class", + "name": "SameFile", + "containerName": "", + "isLocal": true, + "isAmbient": false, + "unverified": false, + "failedAliasResolution": false + } + ] + + + +// === goToDefinition === +// === /tests/cases/fourslash/hasConstructor.ts === +// import { Base } from './base' +// <|class [|{| defId: 0 |}HasConstructor|] extends Base { +// [|{| defId: 1 |}constructor() {}|] +// readonly name: string = ''; +// }|> +// const hasConstructor = new /*GOTO DEF*/HasConstructor(cArg) + + // === Details === + [ + { + "defId": 0, + "kind": "class", + "name": "HasConstructor", + "containerName": "", + "isLocal": true, + "isAmbient": false, + "unverified": false, + "failedAliasResolution": false + }, + { + "defId": 1, + "kind": "constructor", + "name": "__constructor", + "containerName": "HasConstructor", + "isLocal": true, + "isAmbient": false, + "unverified": false, + "failedAliasResolution": false + } + ] + + + +// === goToDefinition === +// === /tests/cases/fourslash/defInSameFile.ts === +// <|import { [|Base|] } from './base'|> +// class SameFile extends Base { +// readonly name: string = 'SameFile' +// } +// const SameFile = new SameFile(cArg) +// const wrapper = new /*GOTO DEF*/Base(cArg) + + // === Details === + [ + { + "kind": "alias", + "name": "Base", + "containerName": "", + "isLocal": true, + "isAmbient": false, + "unverified": false, + "failedAliasResolution": true + } + ] \ No newline at end of file diff --git a/tests/baselines/reference/goToDefinitionConstructorOfClassExpression01.baseline.jsonc b/tests/baselines/reference/goToDefinitionConstructorOfClassExpression01.baseline.jsonc index c888ae3719bfc..7bb69d20e1ae9 100644 --- a/tests/baselines/reference/goToDefinitionConstructorOfClassExpression01.baseline.jsonc +++ b/tests/baselines/reference/goToDefinitionConstructorOfClassExpression01.baseline.jsonc @@ -1,14 +1,282 @@ // === goToDefinition === // === /tests/cases/fourslash/goToDefinitionConstructorOfClassExpression01.ts === -// var x = class C { -// [|constructor() { +// var x = <|class [|{| defId: 0 |}C|] { +// [|{| defId: 1 |}constructor() { // var other = new /*GOTO DEF*/C; // }|] +// }|> +// +// var y = class C extends x { +// constructor() { +// --- (line: 9) skipped --- + + // === Details === + [ + { + "defId": 0, + "kind": "local class", + "name": "C", + "containerName": "", + "isLocal": false, + "isAmbient": false, + "unverified": false, + "failedAliasResolution": false + }, + { + "defId": 1, + "kind": "constructor", + "name": "__constructor", + "containerName": "C", + "isLocal": false, + "isAmbient": false, + "unverified": false, + "failedAliasResolution": false + } + ] + + + +// === goToDefinition === +// === /tests/cases/fourslash/goToDefinitionConstructorOfClassExpression01.ts === +// --- (line: 3) skipped --- +// } +// } +// +// var y = <|class [|{| defId: 0 |}C|] extends x { +// [|{| defId: 1 |}constructor() { +// super(); +// var other = new /*GOTO DEF*/C; +// }|] +// }|> +// var z = class C extends x { +// m() { +// return new C; +// --- (line: 16) skipped --- + + // === Details === + [ + { + "defId": 0, + "kind": "local class", + "name": "C", + "containerName": "", + "isLocal": false, + "isAmbient": false, + "unverified": false, + "failedAliasResolution": false + }, + { + "defId": 1, + "kind": "constructor", + "name": "__constructor", + "containerName": "C", + "isLocal": false, + "isAmbient": false, + "unverified": false, + "failedAliasResolution": false + } + ] + + + +// === goToDefinition === +// === /tests/cases/fourslash/goToDefinitionConstructorOfClassExpression01.ts === +// var x = class C { +// [|{| defId: 1 |}constructor() { +// var other = new C; +// }|] +// } +// +// var y = class C extends x { +// constructor() { +// super(); +// var other = new C; +// } +// } +// var z = <|class [|{| defId: 0 |}C|] extends x { +// m() { +// return new /*GOTO DEF*/C; +// } +// }|> +// +// var x1 = new C(); +// var x2 = new x(); +// var y1 = new y(); +// var z1 = new z(); + + // === Details === + [ + { + "defId": 0, + "kind": "local class", + "name": "C", + "containerName": "", + "isLocal": false, + "isAmbient": false, + "unverified": false, + "failedAliasResolution": false + }, + { + "defId": 1, + "kind": "constructor", + "name": "__constructor", + "containerName": "C", + "isLocal": false, + "isAmbient": false, + "unverified": false, + "failedAliasResolution": false + } + ] + + + +// === goToDefinition === +// === /tests/cases/fourslash/goToDefinitionConstructorOfClassExpression01.ts === +// --- (line: 15) skipped --- +// } +// } +// +// var x1 = new /*GOTO DEF*/C(); +// var x2 = new x(); +// var y1 = new y(); +// var z1 = new z(); + + + +// === goToDefinition === +// === /tests/cases/fourslash/goToDefinitionConstructorOfClassExpression01.ts === +// <|var [|{| defId: 0 |}x|] = class C { +// [|{| defId: 1 |}constructor() { +// var other = new C; +// }|] +// }|> +// +// var y = class C extends x { +// constructor() { +// --- (line: 9) skipped --- + +// --- (line: 16) skipped --- // } +// +// var x1 = new C(); +// var x2 = new /*GOTO DEF*/x(); +// var y1 = new y(); +// var z1 = new z(); // === Details === [ { + "defId": 0, + "kind": "var", + "name": "x", + "containerName": "", + "isLocal": false, + "isAmbient": false, + "unverified": false, + "failedAliasResolution": false + }, + { + "defId": 1, + "kind": "constructor", + "name": "__constructor", + "containerName": "C", + "isLocal": false, + "isAmbient": false, + "unverified": false, + "failedAliasResolution": false + } + ] + + + +// === goToDefinition === +// === /tests/cases/fourslash/goToDefinitionConstructorOfClassExpression01.ts === +// --- (line: 3) skipped --- +// } +// } +// +// <|var [|{| defId: 0 |}y|] = class C extends x { +// [|{| defId: 1 |}constructor() { +// super(); +// var other = new C; +// }|] +// }|> +// var z = class C extends x { +// m() { +// return new C; +// } +// } +// +// var x1 = new C(); +// var x2 = new x(); +// var y1 = new /*GOTO DEF*/y(); +// var z1 = new z(); + + // === Details === + [ + { + "defId": 0, + "kind": "var", + "name": "y", + "containerName": "", + "isLocal": false, + "isAmbient": false, + "unverified": false, + "failedAliasResolution": false + }, + { + "defId": 1, + "kind": "constructor", + "name": "__constructor", + "containerName": "C", + "isLocal": false, + "isAmbient": false, + "unverified": false, + "failedAliasResolution": false + } + ] + + + +// === goToDefinition === +// === /tests/cases/fourslash/goToDefinitionConstructorOfClassExpression01.ts === +// var x = class C { +// [|{| defId: 1 |}constructor() { +// var other = new C; +// }|] +// } +// +// var y = class C extends x { +// constructor() { +// super(); +// var other = new C; +// } +// } +// <|var [|{| defId: 0 |}z|] = class C extends x { +// m() { +// return new C; +// } +// }|> +// +// var x1 = new C(); +// var x2 = new x(); +// var y1 = new y(); +// var z1 = new /*GOTO DEF*/z(); + + // === Details === + [ + { + "defId": 0, + "kind": "var", + "name": "z", + "containerName": "", + "isLocal": false, + "isAmbient": false, + "unverified": false, + "failedAliasResolution": false + }, + { + "defId": 1, "kind": "constructor", "name": "__constructor", "containerName": "C", diff --git a/tests/baselines/reference/goToDefinitionConstructorOfClassWhenClassIsPrecededByNamespace01.baseline.jsonc b/tests/baselines/reference/goToDefinitionConstructorOfClassWhenClassIsPrecededByNamespace01.baseline.jsonc index ddce59197c58c..d6bbd2049c3dc 100644 --- a/tests/baselines/reference/goToDefinitionConstructorOfClassWhenClassIsPrecededByNamespace01.baseline.jsonc +++ b/tests/baselines/reference/goToDefinitionConstructorOfClassWhenClassIsPrecededByNamespace01.baseline.jsonc @@ -4,16 +4,27 @@ // export var x; // } // -// class Foo { -// [|constructor() { +// <|class [|{| defId: 0 |}Foo|] { +// [|{| defId: 1 |}constructor() { // }|] -// } +// }|> // // var x = new /*GOTO DEF*/Foo(); // === Details === [ { + "defId": 0, + "kind": "class", + "name": "Foo", + "containerName": "", + "isLocal": false, + "isAmbient": false, + "unverified": false, + "failedAliasResolution": false + }, + { + "defId": 1, "kind": "constructor", "name": "__constructor", "containerName": "Foo", diff --git a/tests/baselines/reference/goToDefinitionConstructorOverloads.baseline.jsonc b/tests/baselines/reference/goToDefinitionConstructorOverloads.baseline.jsonc index 5b02b3f55a46a..0ac43a8742c05 100644 --- a/tests/baselines/reference/goToDefinitionConstructorOverloads.baseline.jsonc +++ b/tests/baselines/reference/goToDefinitionConstructorOverloads.baseline.jsonc @@ -1,17 +1,31 @@ // === goToDefinition === // === /tests/cases/fourslash/goToDefinitionConstructorOverloads.ts === -// class ConstructorOverload { -// [|constructor();|] +// <|class [|{| defId: 0 |}ConstructorOverload|] { +// [|{| defId: 1 |}constructor();|] // constructor(foo: string); // constructor(foo: any) { } -// } +// }|> // // var constructorOverload = new /*GOTO DEF*/ConstructorOverload(); // var constructorOverload = new ConstructorOverload("foo"); +// +// class Extended extends ConstructorOverload { +// --- (line: 11) skipped --- // === Details === [ { + "defId": 0, + "kind": "class", + "name": "ConstructorOverload", + "containerName": "", + "isLocal": false, + "isAmbient": false, + "unverified": false, + "failedAliasResolution": false + }, + { + "defId": 1, "kind": "constructor", "name": "__constructor", "containerName": "ConstructorOverload", @@ -26,18 +40,33 @@ // === goToDefinition === // === /tests/cases/fourslash/goToDefinitionConstructorOverloads.ts === -// class ConstructorOverload { +// <|class [|{| defId: 0 |}ConstructorOverload|] { // constructor(); -// [|constructor(foo: string);|] +// [|{| defId: 1 |}constructor(foo: string);|] // constructor(foo: any) { } -// } +// }|> // // var constructorOverload = new ConstructorOverload(); // var constructorOverload = new /*GOTO DEF*/ConstructorOverload("foo"); +// +// class Extended extends ConstructorOverload { +// readonly name = "extended"; +// --- (line: 12) skipped --- // === Details === [ { + "defId": 0, + "kind": "class", + "name": "ConstructorOverload", + "containerName": "", + "isLocal": false, + "isAmbient": false, + "unverified": false, + "failedAliasResolution": false + }, + { + "defId": 1, "kind": "constructor", "name": "__constructor", "containerName": "ConstructorOverload", @@ -59,7 +88,7 @@ // } // // var constructorOverload = new ConstructorOverload(); -// var constructorOverload = new ConstructorOverload("foo"); +// --- (line: 8) skipped --- // === Details === [ @@ -70,4 +99,90 @@ "isLocal": false, "isAmbient": false } + ] + + + +// === goToDefinition === +// === /tests/cases/fourslash/goToDefinitionConstructorOverloads.ts === +// class ConstructorOverload { +// [|{| defId: 1 |}constructor();|] +// constructor(foo: string); +// constructor(foo: any) { } +// } +// +// var constructorOverload = new ConstructorOverload(); +// var constructorOverload = new ConstructorOverload("foo"); +// +// <|class [|{| defId: 0 |}Extended|] extends ConstructorOverload { +// readonly name = "extended"; +// }|> +// var extended1 = new /*GOTO DEF*/Extended(); +// var extended2 = new Extended("foo"); + + // === Details === + [ + { + "defId": 0, + "kind": "class", + "name": "Extended", + "containerName": "", + "isLocal": false, + "isAmbient": false, + "unverified": false, + "failedAliasResolution": false + }, + { + "defId": 1, + "kind": "constructor", + "name": "__constructor", + "containerName": "ConstructorOverload", + "isLocal": false, + "isAmbient": false, + "unverified": false, + "failedAliasResolution": false + } + ] + + + +// === goToDefinition === +// === /tests/cases/fourslash/goToDefinitionConstructorOverloads.ts === +// class ConstructorOverload { +// constructor(); +// [|{| defId: 1 |}constructor(foo: string);|] +// constructor(foo: any) { } +// } +// +// var constructorOverload = new ConstructorOverload(); +// var constructorOverload = new ConstructorOverload("foo"); +// +// <|class [|{| defId: 0 |}Extended|] extends ConstructorOverload { +// readonly name = "extended"; +// }|> +// var extended1 = new Extended(); +// var extended2 = new /*GOTO DEF*/Extended("foo"); + + // === Details === + [ + { + "defId": 0, + "kind": "class", + "name": "Extended", + "containerName": "", + "isLocal": false, + "isAmbient": false, + "unverified": false, + "failedAliasResolution": false + }, + { + "defId": 1, + "kind": "constructor", + "name": "__constructor", + "containerName": "ConstructorOverload", + "isLocal": false, + "isAmbient": false, + "unverified": false, + "failedAliasResolution": false + } ] \ No newline at end of file diff --git a/tests/cases/fourslash/goToDefinitionClassConstructors.ts b/tests/cases/fourslash/goToDefinitionClassConstructors.ts new file mode 100644 index 0000000000000..c5afeedc82aac --- /dev/null +++ b/tests/cases/fourslash/goToDefinitionClassConstructors.ts @@ -0,0 +1,39 @@ +/// + +// @filename: definitions.ts +//// export class Base { +//// constructor(protected readonly cArg: string) {} +//// } +//// +//// export class Derived extends Base { +//// readonly email = this.cArg.getByLabel('Email') +//// readonly password = this.cArg.getByLabel('Password') +//// } + +// @filename: main.ts +//// import { Derived } from './base' +//// const derived = new [|/*Derived*/Derived|](cArg) + +// @filename: defInSameFile.ts +//// import { Base } from './base' +//// class SameFile extends Base { +//// readonly name: string = 'SameFile' +//// } +//// const SameFile = new [|/*SameFile*/SameFile|](cArg) +//// const wrapper = new [|/*Base*/Base|](cArg) + +// @filename: hasConstructor.ts +//// import { Base } from './base' +//// class HasConstructor extends Base { +//// constructor() {} +//// readonly name: string = ''; +//// } +//// const hasConstructor = new [|/*HasConstructor*/HasConstructor|](cArg) + + +verify.baselineGoToDefinition( + "Derived", + "SameFile", + "HasConstructor", + "Base", +); diff --git a/tests/cases/fourslash/goToDefinitionConstructorOfClassExpression01.ts b/tests/cases/fourslash/goToDefinitionConstructorOfClassExpression01.ts index a5b149932134c..4c127338ba5f1 100644 --- a/tests/cases/fourslash/goToDefinitionConstructorOfClassExpression01.ts +++ b/tests/cases/fourslash/goToDefinitionConstructorOfClassExpression01.ts @@ -2,8 +2,25 @@ ////var x = class C { //// /*definition*/constructor() { -//// var other = new [|/*usage*/C|]; +//// var other = new [|/*xusage*/C|]; //// } ////} +//// +////var y = class C extends x { +//// constructor() { +//// super(); +//// var other = new [|/*yusage*/C|]; +//// } +////} +////var z = class C extends x { +//// m() { +//// return new [|/*zusage*/C|]; +//// } +////} +//// +////var x1 = new [|/*cref*/C|](); +////var x2 = new [|/*xref*/x|](); +////var y1 = new [|/*yref*/y|](); +////var z1 = new [|/*zref*/z|](); -verify.baselineGoToDefinition("usage"); +verify.baselineGoToDefinition("xusage", "yusage", "zusage", "cref", "xref", "yref", "zref"); diff --git a/tests/cases/fourslash/goToDefinitionConstructorOverloads.ts b/tests/cases/fourslash/goToDefinitionConstructorOverloads.ts index 4151e7c708fb8..d3cb9ec9d517e 100644 --- a/tests/cases/fourslash/goToDefinitionConstructorOverloads.ts +++ b/tests/cases/fourslash/goToDefinitionConstructorOverloads.ts @@ -8,9 +8,17 @@ //// ////var constructorOverload = new [|/*constructorOverloadReference1*/ConstructorOverload|](); ////var constructorOverload = new [|/*constructorOverloadReference2*/ConstructorOverload|]("foo"); +//// +////class Extended extends ConstructorOverload { +//// readonly name = "extended"; +////} +////var extended1 = new [|/*extendedRef1*/Extended|](); +////var extended2 = new [|/*extendedRef2*/Extended|]("foo"); verify.baselineGoToDefinition( "constructorOverloadReference1", "constructorOverloadReference2", "constructorOverload1", + "extendedRef1", + "extendedRef2", ); From 8ec38046115312910f3bde2bcab2dc20d1850c97 Mon Sep 17 00:00:00 2001 From: Isabel Duan Date: Fri, 16 Aug 2024 15:17:45 -0700 Subject: [PATCH 47/50] fix test/basellines (#59663) --- ...DefinitionClassConstructors.baseline.jsonc | 91 +++++++++++++++---- .../goToDefinitionClassConstructors.ts | 6 +- 2 files changed, 77 insertions(+), 20 deletions(-) diff --git a/tests/baselines/reference/goToDefinitionClassConstructors.baseline.jsonc b/tests/baselines/reference/goToDefinitionClassConstructors.baseline.jsonc index f9ffb95544996..684c2c26c44a7 100644 --- a/tests/baselines/reference/goToDefinitionClassConstructors.baseline.jsonc +++ b/tests/baselines/reference/goToDefinitionClassConstructors.baseline.jsonc @@ -1,18 +1,37 @@ // === goToDefinition === +// === /tests/cases/fourslash/definitions.ts === +// export class Base { +// [|{| defId: 1 |}constructor(protected readonly cArg: string) {}|] +// } +// +// <|export class [|{| defId: 0 |}Derived|] extends Base { +// readonly email = this.cArg.getByLabel('Email') +// readonly password = this.cArg.getByLabel('Password') +// }|> + // === /tests/cases/fourslash/main.ts === -// <|import { [|Derived|] } from './base'|> -// const derived = new /*GOTO DEF*/Derived(cArg) +// import { Derived } from './definitions' +// const derived = new /*GOTO DEF*/[|Derived|](cArg) // === Details === [ { - "kind": "alias", + "defId": 0, + "kind": "class", "name": "Derived", - "containerName": "", - "isLocal": true, + "containerName": "\"/tests/cases/fourslash/definitions\"", + "isLocal": false, "isAmbient": false, - "unverified": false, - "failedAliasResolution": true + "unverified": false + }, + { + "defId": 1, + "kind": "constructor", + "name": "__constructor", + "containerName": "Base", + "isLocal": false, + "isAmbient": false, + "unverified": false } ] @@ -20,16 +39,25 @@ // === goToDefinition === // === /tests/cases/fourslash/defInSameFile.ts === -// import { Base } from './base' -// <|class [|SameFile|] extends Base { +// import { Base } from './definitions' +// <|class [|{| defId: 0 |}SameFile|] extends Base { // readonly name: string = 'SameFile' // }|> // const SameFile = new /*GOTO DEF*/SameFile(cArg) // const wrapper = new Base(cArg) +// === /tests/cases/fourslash/definitions.ts === +// export class Base { +// [|{| defId: 1 |}constructor(protected readonly cArg: string) {}|] +// } +// +// export class Derived extends Base { +// --- (line: 6) skipped --- + // === Details === [ { + "defId": 0, "kind": "class", "name": "SameFile", "containerName": "", @@ -37,6 +65,16 @@ "isAmbient": false, "unverified": false, "failedAliasResolution": false + }, + { + "defId": 1, + "kind": "constructor", + "name": "__constructor", + "containerName": "Base", + "isLocal": false, + "isAmbient": false, + "unverified": false, + "failedAliasResolution": false } ] @@ -44,7 +82,7 @@ // === goToDefinition === // === /tests/cases/fourslash/hasConstructor.ts === -// import { Base } from './base' +// import { Base } from './definitions' // <|class [|{| defId: 0 |}HasConstructor|] extends Base { // [|{| defId: 1 |}constructor() {}|] // readonly name: string = ''; @@ -78,23 +116,42 @@ // === goToDefinition === +// === /tests/cases/fourslash/definitions.ts === +// <|export class [|{| defId: 0 |}Base|] { +// [|{| defId: 1 |}constructor(protected readonly cArg: string) {}|] +// }|> +// +// export class Derived extends Base { +// readonly email = this.cArg.getByLabel('Email') +// readonly password = this.cArg.getByLabel('Password') +// } + // === /tests/cases/fourslash/defInSameFile.ts === -// <|import { [|Base|] } from './base'|> +// import { Base } from './definitions' // class SameFile extends Base { // readonly name: string = 'SameFile' // } // const SameFile = new SameFile(cArg) -// const wrapper = new /*GOTO DEF*/Base(cArg) +// const wrapper = new /*GOTO DEF*/[|Base|](cArg) // === Details === [ { - "kind": "alias", + "defId": 0, + "kind": "class", "name": "Base", - "containerName": "", - "isLocal": true, + "containerName": "\"/tests/cases/fourslash/definitions\"", + "isLocal": false, "isAmbient": false, - "unverified": false, - "failedAliasResolution": true + "unverified": false + }, + { + "defId": 1, + "kind": "constructor", + "name": "__constructor", + "containerName": "Base", + "isLocal": false, + "isAmbient": false, + "unverified": false } ] \ No newline at end of file diff --git a/tests/cases/fourslash/goToDefinitionClassConstructors.ts b/tests/cases/fourslash/goToDefinitionClassConstructors.ts index c5afeedc82aac..8e57de62f17da 100644 --- a/tests/cases/fourslash/goToDefinitionClassConstructors.ts +++ b/tests/cases/fourslash/goToDefinitionClassConstructors.ts @@ -11,11 +11,11 @@ //// } // @filename: main.ts -//// import { Derived } from './base' +//// import { Derived } from './definitions' //// const derived = new [|/*Derived*/Derived|](cArg) // @filename: defInSameFile.ts -//// import { Base } from './base' +//// import { Base } from './definitions' //// class SameFile extends Base { //// readonly name: string = 'SameFile' //// } @@ -23,7 +23,7 @@ //// const wrapper = new [|/*Base*/Base|](cArg) // @filename: hasConstructor.ts -//// import { Base } from './base' +//// import { Base } from './definitions' //// class HasConstructor extends Base { //// constructor() {} //// readonly name: string = ''; From f850298f70785b94f0a99af97faaa4cc5402a0bd Mon Sep 17 00:00:00 2001 From: "Oleksandr T." Date: Sat, 17 Aug 2024 01:17:58 +0300 Subject: [PATCH 48/50] fix(59558): Implement Interface Quick Fix generates duplicate declarations (#59563) --- src/services/codefixes/helpers.ts | 3 ++ ...mplementInterfaceWithAmbientSignatures1.ts | 32 +++++++++++++++++++ ...mplementInterfaceWithAmbientSignatures2.ts | 19 +++++++++++ ...mplementInterfaceWithAmbientSignatures3.ts | 19 +++++++++++ 4 files changed, 73 insertions(+) create mode 100644 tests/cases/fourslash/codeFixClassImplementInterfaceWithAmbientSignatures1.ts create mode 100644 tests/cases/fourslash/codeFixClassImplementInterfaceWithAmbientSignatures2.ts create mode 100644 tests/cases/fourslash/codeFixClassImplementInterfaceWithAmbientSignatures3.ts diff --git a/src/services/codefixes/helpers.ts b/src/services/codefixes/helpers.ts index f4a29c3751d12..656f3dce112b7 100644 --- a/src/services/codefixes/helpers.ts +++ b/src/services/codefixes/helpers.ts @@ -301,6 +301,9 @@ export function addNewNodeForMemberSymbol( } for (const signature of signatures) { + if (signature.declaration && (signature.declaration.flags & NodeFlags.Ambient)) { + continue; + } // Ensure nodes are fresh so they can have different positions when going through formatting. outputMethod(quotePreference, signature, modifiers, createName(declarationName)); } diff --git a/tests/cases/fourslash/codeFixClassImplementInterfaceWithAmbientSignatures1.ts b/tests/cases/fourslash/codeFixClassImplementInterfaceWithAmbientSignatures1.ts new file mode 100644 index 0000000000000..695ccc3b99ef3 --- /dev/null +++ b/tests/cases/fourslash/codeFixClassImplementInterfaceWithAmbientSignatures1.ts @@ -0,0 +1,32 @@ +/// + +// @lib: esnext +// @target: esnext + +// @Filename: /node_modules/@types/node/globals.d.ts +////export {}; +////declare global { +//// interface SymbolConstructor { +//// readonly dispose: unique symbol; +//// } +//// interface Disposable { +//// [Symbol.dispose](): void; +//// } +////} + +// @Filename: /node_modules/@types/node/index.d.ts +/////// + +// @Filename: a.ts +////class Foo implements Disposable {} + +goTo.file("a.ts"); +verify.codeFix({ + description: "Implement interface 'Disposable'", + newFileContent: +`class Foo implements Disposable { + [Symbol.dispose](): void { + throw new Error("Method not implemented."); + } +}` +}); diff --git a/tests/cases/fourslash/codeFixClassImplementInterfaceWithAmbientSignatures2.ts b/tests/cases/fourslash/codeFixClassImplementInterfaceWithAmbientSignatures2.ts new file mode 100644 index 0000000000000..0ae34b6e4a2e5 --- /dev/null +++ b/tests/cases/fourslash/codeFixClassImplementInterfaceWithAmbientSignatures2.ts @@ -0,0 +1,19 @@ +/// + +////declare class A { +//// method(): void; +////} +////class B implements A {} + +verify.codeFix({ + description: "Implement interface 'A'", + newFileContent: +`declare class A { + method(): void; +} +class B implements A { + method(): void { + throw new Error("Method not implemented."); + } +}` +}); diff --git a/tests/cases/fourslash/codeFixClassImplementInterfaceWithAmbientSignatures3.ts b/tests/cases/fourslash/codeFixClassImplementInterfaceWithAmbientSignatures3.ts new file mode 100644 index 0000000000000..42fbc81db173d --- /dev/null +++ b/tests/cases/fourslash/codeFixClassImplementInterfaceWithAmbientSignatures3.ts @@ -0,0 +1,19 @@ +/// + +////declare abstract class A { +//// abstract method(): void; +////} +////class B implements A {} + +verify.codeFix({ + description: "Implement interface 'A'", + newFileContent: +`declare abstract class A { + abstract method(): void; +} +class B implements A { + method(): void { + throw new Error("Method not implemented."); + } +}` +}); From d06fb82d7c79cf26893b50d7787af0fe2ffbe845 Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Fri, 16 Aug 2024 19:02:42 -0700 Subject: [PATCH 49/50] Add option --stopBuildOnErrors to tsbuild to get previous behavior of not building downstream projects if upstream has errors (#59433) --- src/compiler/commandLineParser.ts | 7 + src/compiler/diagnosticMessages.json | 20 + src/compiler/tsbuild.ts | 11 + src/compiler/tsbuildPublic.ts | 49 + .../helpers/sampleProjectReferences.ts | 22 +- src/testRunner/unittests/tsbuild/sample.ts | 17 + .../unittests/tsbuildWatch/programUpdates.ts | 22 + tests/baselines/reference/api/typescript.d.ts | 1 + ...rrors-when-test-does-not-reference-core.js | 602 ++++++++++++ ...ects-have-errors-with-stopBuildOnErrors.js | 605 ++++++++++++ ...BuildOnErrors-is-passed-on-command-line.js | 890 ++++++++++++++++++ ...rrors-when-test-does-not-reference-core.js | 731 ++++++++++++++ ...ects-have-errors-with-stopBuildOnErrors.js | 734 +++++++++++++++ 13 files changed, 3702 insertions(+), 9 deletions(-) create mode 100644 tests/baselines/reference/tsbuild/sample1/skips-builds-downstream-projects-if-upstream-projects-have-errors-with-stopBuildOnErrors-when-test-does-not-reference-core.js create mode 100644 tests/baselines/reference/tsbuild/sample1/skips-builds-downstream-projects-if-upstream-projects-have-errors-with-stopBuildOnErrors.js create mode 100644 tests/baselines/reference/tsbuildWatch/programUpdates/reportErrors/when-stopBuildOnErrors-is-passed-on-command-line.js create mode 100644 tests/baselines/reference/tsbuildWatch/programUpdates/skips-builds-downstream-projects-if-upstream-projects-have-errors-with-stopBuildOnErrors-when-test-does-not-reference-core.js create mode 100644 tests/baselines/reference/tsbuildWatch/programUpdates/skips-builds-downstream-projects-if-upstream-projects-have-errors-with-stopBuildOnErrors.js diff --git a/src/compiler/commandLineParser.ts b/src/compiler/commandLineParser.ts index ff566060cf2ca..9797d9f96cc66 100644 --- a/src/compiler/commandLineParser.ts +++ b/src/compiler/commandLineParser.ts @@ -1696,6 +1696,13 @@ export const optionsForBuild: CommandLineOption[] = [ type: "boolean", defaultValueDescription: false, }, + { + name: "stopBuildOnErrors", + category: Diagnostics.Command_line_Options, + description: Diagnostics.Skip_building_downstream_projects_on_error_in_upstream_project, + type: "boolean", + defaultValueDescription: false, + }, ]; /** @internal */ diff --git a/src/compiler/diagnosticMessages.json b/src/compiler/diagnosticMessages.json index 36213fbc314e8..01cb974bc1242 100644 --- a/src/compiler/diagnosticMessages.json +++ b/src/compiler/diagnosticMessages.json @@ -5716,6 +5716,14 @@ "category": "Message", "code": 6361 }, + "Skipping build of project '{0}' because its dependency '{1}' has errors": { + "category": "Message", + "code": 6362 + }, + "Project '{0}' can't be built because its dependency '{1}' has errors": { + "category": "Message", + "code": 6363 + }, "Build one or more projects and their dependencies, if out of date": { "category": "Message", "code": 6364 @@ -5760,6 +5768,14 @@ "category": "Message", "code": 6381 }, + "Skipping build of project '{0}' because its dependency '{1}' was not built": { + "category": "Message", + "code": 6382 + }, + "Project '{0}' can't be built because its dependency '{1}' was not built": { + "category": "Message", + "code": 6383 + }, "Have recompiles in '--incremental' and '--watch' assume that changes within a file will only affect files directly depending on it.": { "category": "Message", "code": 6384 @@ -6095,6 +6111,10 @@ "category": "Message", "code": 6639 }, + "Skip building downstream projects on error in upstream project.": { + "category": "Message", + "code": 6640 + }, "Specify a list of glob patterns that match files to be included in compilation.": { "category": "Message", "code": 6641 diff --git a/src/compiler/tsbuild.ts b/src/compiler/tsbuild.ts index abb6c83e30978..74ec7be532261 100644 --- a/src/compiler/tsbuild.ts +++ b/src/compiler/tsbuild.ts @@ -25,6 +25,7 @@ export enum UpToDateStatusType { OutOfDateOptions, OutOfDateRoots, UpstreamOutOfDate, + UpstreamBlocked, ComputingUpstream, TsVersionOutputOfDate, UpToDateWithInputFileText, @@ -47,6 +48,7 @@ export type UpToDateStatus = | Status.OutOfDateBuildInfo | Status.OutOfDateRoots | Status.UpstreamOutOfDate + | Status.UpstreamBlocked | Status.ComputingUpstream | Status.TsVersionOutOfDate | Status.ContainerOnly @@ -135,6 +137,15 @@ export namespace Status { upstreamProjectName: string; } + /** + * This project depends an upstream project with build errors + */ + export interface UpstreamBlocked { + type: UpToDateStatusType.UpstreamBlocked; + upstreamProjectName: string; + upstreamProjectBlocked: boolean; + } + /** * Computing status of upstream projects referenced */ diff --git a/src/compiler/tsbuildPublic.ts b/src/compiler/tsbuildPublic.ts index 7b9b398cf2d0a..3230699eba3c0 100644 --- a/src/compiler/tsbuildPublic.ts +++ b/src/compiler/tsbuildPublic.ts @@ -135,6 +135,7 @@ export interface BuildOptions { dry?: boolean; force?: boolean; verbose?: boolean; + stopBuildOnErrors?: boolean; /** @internal */ clean?: boolean; /** @internal */ watch?: boolean; @@ -1254,6 +1255,23 @@ function getNextInvalidatedProjectCreateInfo( } } + if (status.type === UpToDateStatusType.UpstreamBlocked) { + verboseReportProjectStatus(state, project, status); + reportAndStoreErrors(state, projectPath, getConfigFileParsingDiagnostics(config)); + projectPendingBuild.delete(projectPath); + if (options.verbose) { + reportStatus( + state, + status.upstreamProjectBlocked ? + Diagnostics.Skipping_build_of_project_0_because_its_dependency_1_was_not_built : + Diagnostics.Skipping_build_of_project_0_because_its_dependency_1_has_errors, + project, + status.upstreamProjectName, + ); + } + continue; + } + if (status.type === UpToDateStatusType.ContainerOnly) { verboseReportProjectStatus(state, project, status); reportAndStoreErrors(state, projectPath, getConfigFileParsingDiagnostics(config)); @@ -1455,6 +1473,20 @@ function getUpToDateStatusWorker(state: SolutionBuilde continue; } + // An upstream project is blocked + if ( + state.options.stopBuildOnErrors && ( + refStatus.type === UpToDateStatusType.Unbuildable || + refStatus.type === UpToDateStatusType.UpstreamBlocked + ) + ) { + return { + type: UpToDateStatusType.UpstreamBlocked, + upstreamProjectName: ref.path, + upstreamProjectBlocked: refStatus.type === UpToDateStatusType.UpstreamBlocked, + }; + } + if (!force) (referenceStatuses ||= []).push({ ref, refStatus, resolvedRefPath, resolvedConfig }); } } @@ -1848,6 +1880,8 @@ function queueReferencingProjects( buildOrder: readonly ResolvedConfigFileName[], buildResult: BuildResultFlags, ) { + // Queue only if there are no errors + if (state.options.stopBuildOnErrors && (buildResult & BuildResultFlags.AnyErrors)) return; // Only composite projects can be referenced by other projects if (!config.options.composite) return; // Always use build order to queue projects @@ -1883,6 +1917,12 @@ function queueReferencingProjects( }); } break; + + case UpToDateStatusType.UpstreamBlocked: + if (toResolvedConfigFilePath(state, resolveProjectName(state, status.upstreamProjectName)) === projectPath) { + clearProjectStatus(state, nextProjectPath); + } + break; } } addProjToQueue(state, nextProjectPath, ProgramUpdateLevel.Update); @@ -2386,6 +2426,15 @@ function reportUpToDateStatus(state: SolutionBuilderSt relName(state, configFileName), relName(state, status.upstreamProjectName), ); + case UpToDateStatusType.UpstreamBlocked: + return reportStatus( + state, + status.upstreamProjectBlocked ? + Diagnostics.Project_0_can_t_be_built_because_its_dependency_1_was_not_built : + Diagnostics.Project_0_can_t_be_built_because_its_dependency_1_has_errors, + relName(state, configFileName), + relName(state, status.upstreamProjectName), + ); case UpToDateStatusType.Unbuildable: return reportStatus( state, diff --git a/src/testRunner/unittests/helpers/sampleProjectReferences.ts b/src/testRunner/unittests/helpers/sampleProjectReferences.ts index 7c5634c0120e3..f6a6352398a36 100644 --- a/src/testRunner/unittests/helpers/sampleProjectReferences.ts +++ b/src/testRunner/unittests/helpers/sampleProjectReferences.ts @@ -26,7 +26,7 @@ export function getFsContentsForSampleProjectReferencesLogicConfig(withNodeNext? ], }); } -export function getFsContentsForSampleProjectReferences(withNodeNext?: boolean): FsContents { +export function getFsContentsForSampleProjectReferences(withNodeNext?: boolean, skipReferenceCoreFromTest?: boolean): FsContents { return { [libFile.path]: libFile.content, "/user/username/projects/sample1/core/tsconfig.json": jsonToReadableText({ @@ -55,10 +55,14 @@ export function getFsContentsForSampleProjectReferences(withNodeNext?: boolean): export const m = mod; `, "/user/username/projects/sample1/tests/tsconfig.json": jsonToReadableText({ - references: [ - { path: "../core" }, - { path: "../logic" }, - ], + references: !skipReferenceCoreFromTest ? + [ + { path: "../core" }, + { path: "../logic" }, + ] : + [ + { path: "../logic" }, + ], files: ["index.ts"], compilerOptions: { ...getProjectConfigWithNodeNext(withNodeNext), @@ -81,9 +85,9 @@ export function getFsContentsForSampleProjectReferences(withNodeNext?: boolean): }; } -export function getFsForSampleProjectReferences() { +export function getFsForSampleProjectReferences(withNodeNext?: boolean, skipReferenceCoreFromTest?: boolean) { return loadProjectFromFiles( - getFsContentsForSampleProjectReferences(), + getFsContentsForSampleProjectReferences(withNodeNext, skipReferenceCoreFromTest), { cwd: "/user/username/projects/sample1", executingFilePath: libFile.path, @@ -91,9 +95,9 @@ export function getFsForSampleProjectReferences() { ); } -export function getSysForSampleProjectReferences(withNodeNext?: boolean) { +export function getSysForSampleProjectReferences(withNodeNext?: boolean, skipReferenceCoreFromTest?: boolean) { return createWatchedSystem( - getFsContentsForSampleProjectReferences(withNodeNext), + getFsContentsForSampleProjectReferences(withNodeNext, skipReferenceCoreFromTest), { currentDirectory: "/user/username/projects/sample1", }, diff --git a/src/testRunner/unittests/tsbuild/sample.ts b/src/testRunner/unittests/tsbuild/sample.ts index 7b5498ecec553..7cffa6cede35b 100644 --- a/src/testRunner/unittests/tsbuild/sample.ts +++ b/src/testRunner/unittests/tsbuild/sample.ts @@ -359,6 +359,23 @@ describe("unittests:: tsbuild:: on 'sample1' project", () => { modifyFs: fs => replaceText(fs, "logic/index.ts", "c.multiply(10, 15)", `c.muitply()`), edits: noChangeOnlyRuns, }); + + [false, true].forEach(skipReferenceCoreFromTest => + verifyTsc({ + scenario: "sample1", + subScenario: `skips builds downstream projects if upstream projects have errors with stopBuildOnErrors${skipReferenceCoreFromTest ? " when test does not reference core" : ""}`, + fs: () => getFsForSampleProjectReferences(/*withNodeNext*/ undefined, skipReferenceCoreFromTest), + commandLineArgs: ["--b", "tests", "--verbose", "--stopBuildOnErrors"], + modifyFs: fs => appendText(fs, "core/index.ts", `multiply();`), + edits: [ + noChangeRun, + { + caption: "fix error", + edit: fs => replaceText(fs, "core/index.ts", "multiply();", ""), + }, + ], + }) + ); }); describe("project invalidation", () => { diff --git a/src/testRunner/unittests/tsbuildWatch/programUpdates.ts b/src/testRunner/unittests/tsbuildWatch/programUpdates.ts index d5dfc7d2742db..9759e27e9fe6a 100644 --- a/src/testRunner/unittests/tsbuildWatch/programUpdates.ts +++ b/src/testRunner/unittests/tsbuildWatch/programUpdates.ts @@ -316,6 +316,28 @@ createSomeObject().message;`, } verifyIncrementalErrors("when preserveWatchOutput is not used", ts.emptyArray); verifyIncrementalErrors("when preserveWatchOutput is passed on command line", ["--preserveWatchOutput"]); + verifyIncrementalErrors("when stopBuildOnErrors is passed on command line", ["--stopBuildOnErrors"]); + + [false, true].forEach(skipReferenceCoreFromTest => + verifyTscWatch({ + scenario: "programUpdates", + subScenario: `skips builds downstream projects if upstream projects have errors with stopBuildOnErrors${skipReferenceCoreFromTest ? " when test does not reference core" : ""}`, + sys: () => { + const sys = getSysForSampleProjectReferences(/*withNodeNext*/ undefined, skipReferenceCoreFromTest); + sys.appendFile("core/index.ts", `multiply();`); + return sys; + }, + commandLineArgs: ["--b", "-w", "tests", "--verbose", "--stopBuildOnErrors"], + edits: [{ + caption: "fix error", + edit: sys => sys.replaceFileText("core/index.ts", "multiply();", ""), + timeouts: sys => { + sys.runQueuedTimeoutCallbacks(); + sys.runQueuedTimeoutCallbacks(); + }, + }], + }) + ); describe("when declaration emit errors are present", () => { const solution = "solution"; diff --git a/tests/baselines/reference/api/typescript.d.ts b/tests/baselines/reference/api/typescript.d.ts index 1b71932e3463f..e5607bd839993 100644 --- a/tests/baselines/reference/api/typescript.d.ts +++ b/tests/baselines/reference/api/typescript.d.ts @@ -9802,6 +9802,7 @@ declare namespace ts { dry?: boolean; force?: boolean; verbose?: boolean; + stopBuildOnErrors?: boolean; incremental?: boolean; assumeChangesOnlyAffectDirectDependencies?: boolean; declaration?: boolean; diff --git a/tests/baselines/reference/tsbuild/sample1/skips-builds-downstream-projects-if-upstream-projects-have-errors-with-stopBuildOnErrors-when-test-does-not-reference-core.js b/tests/baselines/reference/tsbuild/sample1/skips-builds-downstream-projects-if-upstream-projects-have-errors-with-stopBuildOnErrors-when-test-does-not-reference-core.js new file mode 100644 index 0000000000000..4aea56338cca0 --- /dev/null +++ b/tests/baselines/reference/tsbuild/sample1/skips-builds-downstream-projects-if-upstream-projects-have-errors-with-stopBuildOnErrors-when-test-does-not-reference-core.js @@ -0,0 +1,602 @@ +currentDirectory:: /user/username/projects/sample1 useCaseSensitiveFileNames: false +Input:: +//// [/a/lib/lib.d.ts] +/// +interface Boolean {} +interface Function {} +interface CallableFunction {} +interface NewableFunction {} +interface IArguments {} +interface Number { toExponential: any; } +interface Object {} +interface RegExp {} +interface String { charAt: any; } +interface Array { length: number; [n: number]: T; } +interface ReadonlyArray {} +declare const console: { log(msg: any): void; }; + +//// [/user/username/projects/sample1/core/anotherModule.ts] +export const World = "hello"; + +//// [/user/username/projects/sample1/core/index.ts] +export const someString: string = "HELLO WORLD"; +export function leftPad(s: string, n: number) { return s + n; } +export function multiply(a: number, b: number) { return a * b; } +multiply(); + +//// [/user/username/projects/sample1/core/some_decl.d.ts] +declare const dts: any; + +//// [/user/username/projects/sample1/core/tsconfig.json] +{ + "compilerOptions": { + "composite": true, + "declaration": true, + "declarationMap": true, + "skipDefaultLibCheck": true + } +} + +//// [/user/username/projects/sample1/logic/index.ts] +import * as c from '../core/index'; +export function getSecondsInDay() { + return c.multiply(10, 15); +} +import * as mod from '../core/anotherModule'; +export const m = mod; + + +//// [/user/username/projects/sample1/logic/tsconfig.json] +{ + "compilerOptions": { + "composite": true, + "declaration": true, + "sourceMap": true, + "forceConsistentCasingInFileNames": true, + "skipDefaultLibCheck": true + }, + "references": [ + { + "path": "../core" + } + ] +} + +//// [/user/username/projects/sample1/tests/index.ts] +import * as c from '../core/index'; +import * as logic from '../logic/index'; + +c.leftPad("", 10); +logic.getSecondsInDay(); + +import * as mod from '../core/anotherModule'; +export const m = mod; + + +//// [/user/username/projects/sample1/tests/tsconfig.json] +{ + "references": [ + { + "path": "../logic" + } + ], + "files": [ + "index.ts" + ], + "compilerOptions": { + "composite": true, + "declaration": true, + "forceConsistentCasingInFileNames": true, + "skipDefaultLibCheck": true + } +} + + + +Output:: +/a/lib/tsc --b tests --verbose --stopBuildOnErrors +[HH:MM:SS AM] Projects in this build: + * core/tsconfig.json + * logic/tsconfig.json + * tests/tsconfig.json + +[HH:MM:SS AM] Project 'core/tsconfig.json' is out of date because output file 'core/tsconfig.tsbuildinfo' does not exist + +[HH:MM:SS AM] Building project '/user/username/projects/sample1/core/tsconfig.json'... + +core/index.ts:4:1 - error TS2554: Expected 2 arguments, but got 0. + +4 multiply(); +  ~~~~~~~~ + + core/index.ts:3:26 + 3 export function multiply(a: number, b: number) { return a * b; } +    ~~~~~~~~~ + An argument for 'a' was not provided. + +[HH:MM:SS AM] Project 'logic/tsconfig.json' can't be built because its dependency 'core' has errors + +[HH:MM:SS AM] Skipping build of project '/user/username/projects/sample1/logic/tsconfig.json' because its dependency '/user/username/projects/sample1/core' has errors + +[HH:MM:SS AM] Project 'tests/tsconfig.json' can't be built because its dependency 'logic' was not built + +[HH:MM:SS AM] Skipping build of project '/user/username/projects/sample1/tests/tsconfig.json' because its dependency '/user/username/projects/sample1/logic' was not built + + +Found 1 error. + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped + + +//// [/user/username/projects/sample1/core/anotherModule.d.ts] +export declare const World = "hello"; +//# sourceMappingURL=anotherModule.d.ts.map + +//// [/user/username/projects/sample1/core/anotherModule.d.ts.map] +{"version":3,"file":"anotherModule.d.ts","sourceRoot":"","sources":["anotherModule.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,KAAK,UAAU,CAAC"} + +//// [/user/username/projects/sample1/core/anotherModule.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.World = void 0; +exports.World = "hello"; + + +//// [/user/username/projects/sample1/core/index.d.ts] +export declare const someString: string; +export declare function leftPad(s: string, n: number): string; +export declare function multiply(a: number, b: number): number; +//# sourceMappingURL=index.d.ts.map + +//// [/user/username/projects/sample1/core/index.d.ts.map] +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU,EAAE,MAAsB,CAAC;AAChD,wBAAgB,OAAO,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,UAAmB;AAC/D,wBAAgB,QAAQ,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,UAAmB"} + +//// [/user/username/projects/sample1/core/index.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.someString = void 0; +exports.leftPad = leftPad; +exports.multiply = multiply; +exports.someString = "HELLO WORLD"; +function leftPad(s, n) { return s + n; } +function multiply(a, b) { return a * b; } +multiply(); + + +//// [/user/username/projects/sample1/core/tsconfig.tsbuildinfo] +{"fileNames":["../../../../../a/lib/lib.d.ts","./anothermodule.ts","./index.ts","./some_decl.d.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-3090574810-export const World = \"hello\";","signature":"-9234818176-export declare const World = \"hello\";\n"},{"version":"-12887218413-export const someString: string = \"HELLO WORLD\";\nexport function leftPad(s: string, n: number) { return s + n; }\nexport function multiply(a: number, b: number) { return a * b; }\nmultiply();","signature":"-7362568283-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n"},{"version":"-7959511260-declare const dts: any;","affectsGlobalScope":true}],"root":[[2,4]],"options":{"composite":true,"declaration":true,"declarationMap":true,"skipDefaultLibCheck":true},"semanticDiagnosticsPerFile":[[3,[{"start":178,"length":8,"messageText":"Expected 2 arguments, but got 0.","category":1,"code":2554,"relatedInformation":[{"start":138,"length":9,"messageText":"An argument for 'a' was not provided.","category":3,"code":6210}]}]]],"latestChangedDtsFile":"./index.d.ts","version":"FakeTSVersion"} + +//// [/user/username/projects/sample1/core/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "fileNames": [ + "../../../../../a/lib/lib.d.ts", + "./anothermodule.ts", + "./index.ts", + "./some_decl.d.ts" + ], + "fileInfos": { + "../../../../../a/lib/lib.d.ts": { + "original": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./anothermodule.ts": { + "original": { + "version": "-3090574810-export const World = \"hello\";", + "signature": "-9234818176-export declare const World = \"hello\";\n" + }, + "version": "-3090574810-export const World = \"hello\";", + "signature": "-9234818176-export declare const World = \"hello\";\n" + }, + "./index.ts": { + "original": { + "version": "-12887218413-export const someString: string = \"HELLO WORLD\";\nexport function leftPad(s: string, n: number) { return s + n; }\nexport function multiply(a: number, b: number) { return a * b; }\nmultiply();", + "signature": "-7362568283-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n" + }, + "version": "-12887218413-export const someString: string = \"HELLO WORLD\";\nexport function leftPad(s: string, n: number) { return s + n; }\nexport function multiply(a: number, b: number) { return a * b; }\nmultiply();", + "signature": "-7362568283-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n" + }, + "./some_decl.d.ts": { + "original": { + "version": "-7959511260-declare const dts: any;", + "affectsGlobalScope": true + }, + "version": "-7959511260-declare const dts: any;", + "signature": "-7959511260-declare const dts: any;", + "affectsGlobalScope": true + } + }, + "root": [ + [ + [ + 2, + 4 + ], + [ + "./anothermodule.ts", + "./index.ts", + "./some_decl.d.ts" + ] + ] + ], + "options": { + "composite": true, + "declaration": true, + "declarationMap": true, + "skipDefaultLibCheck": true + }, + "semanticDiagnosticsPerFile": [ + [ + "./index.ts", + [ + { + "start": 178, + "length": 8, + "messageText": "Expected 2 arguments, but got 0.", + "category": 1, + "code": 2554, + "relatedInformation": [ + { + "start": 138, + "length": 9, + "messageText": "An argument for 'a' was not provided.", + "category": 3, + "code": 6210 + } + ] + } + ] + ] + ], + "latestChangedDtsFile": "./index.d.ts", + "version": "FakeTSVersion", + "size": 1654 +} + + + +Change:: no-change-run +Input:: + + +Output:: +/a/lib/tsc --b tests --verbose --stopBuildOnErrors +[HH:MM:SS AM] Projects in this build: + * core/tsconfig.json + * logic/tsconfig.json + * tests/tsconfig.json + +[HH:MM:SS AM] Project 'core/tsconfig.json' is out of date because buildinfo file 'core/tsconfig.tsbuildinfo' indicates that program needs to report errors. + +[HH:MM:SS AM] Building project '/user/username/projects/sample1/core/tsconfig.json'... + +core/index.ts:4:1 - error TS2554: Expected 2 arguments, but got 0. + +4 multiply(); +  ~~~~~~~~ + + core/index.ts:3:26 + 3 export function multiply(a: number, b: number) { return a * b; } +    ~~~~~~~~~ + An argument for 'a' was not provided. + +[HH:MM:SS AM] Project 'logic/tsconfig.json' can't be built because its dependency 'core' has errors + +[HH:MM:SS AM] Skipping build of project '/user/username/projects/sample1/logic/tsconfig.json' because its dependency '/user/username/projects/sample1/core' has errors + +[HH:MM:SS AM] Project 'tests/tsconfig.json' can't be built because its dependency 'logic' was not built + +[HH:MM:SS AM] Skipping build of project '/user/username/projects/sample1/tests/tsconfig.json' because its dependency '/user/username/projects/sample1/logic' was not built + + +Found 1 error. + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped + + + + +Change:: fix error +Input:: +//// [/user/username/projects/sample1/core/index.ts] +export const someString: string = "HELLO WORLD"; +export function leftPad(s: string, n: number) { return s + n; } +export function multiply(a: number, b: number) { return a * b; } + + + + +Output:: +/a/lib/tsc --b tests --verbose --stopBuildOnErrors +[HH:MM:SS AM] Projects in this build: + * core/tsconfig.json + * logic/tsconfig.json + * tests/tsconfig.json + +[HH:MM:SS AM] Project 'core/tsconfig.json' is out of date because buildinfo file 'core/tsconfig.tsbuildinfo' indicates that program needs to report errors. + +[HH:MM:SS AM] Building project '/user/username/projects/sample1/core/tsconfig.json'... + +[HH:MM:SS AM] Project 'logic/tsconfig.json' is out of date because output file 'logic/tsconfig.tsbuildinfo' does not exist + +[HH:MM:SS AM] Building project '/user/username/projects/sample1/logic/tsconfig.json'... + +[HH:MM:SS AM] Project 'tests/tsconfig.json' is out of date because output file 'tests/tsconfig.tsbuildinfo' does not exist + +[HH:MM:SS AM] Building project '/user/username/projects/sample1/tests/tsconfig.json'... + +exitCode:: ExitStatus.Success + + +//// [/user/username/projects/sample1/core/index.d.ts.map] file written with same contents +//// [/user/username/projects/sample1/core/index.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.someString = void 0; +exports.leftPad = leftPad; +exports.multiply = multiply; +exports.someString = "HELLO WORLD"; +function leftPad(s, n) { return s + n; } +function multiply(a, b) { return a * b; } + + +//// [/user/username/projects/sample1/core/tsconfig.tsbuildinfo] +{"fileNames":["../../../../../a/lib/lib.d.ts","./anothermodule.ts","./index.ts","./some_decl.d.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-3090574810-export const World = \"hello\";","signature":"-9234818176-export declare const World = \"hello\";\n"},{"version":"-15745098553-export const someString: string = \"HELLO WORLD\";\nexport function leftPad(s: string, n: number) { return s + n; }\nexport function multiply(a: number, b: number) { return a * b; }\n","signature":"-7362568283-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n"},{"version":"-7959511260-declare const dts: any;","affectsGlobalScope":true}],"root":[[2,4]],"options":{"composite":true,"declaration":true,"declarationMap":true,"skipDefaultLibCheck":true},"latestChangedDtsFile":"./index.d.ts","version":"FakeTSVersion"} + +//// [/user/username/projects/sample1/core/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "fileNames": [ + "../../../../../a/lib/lib.d.ts", + "./anothermodule.ts", + "./index.ts", + "./some_decl.d.ts" + ], + "fileInfos": { + "../../../../../a/lib/lib.d.ts": { + "original": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./anothermodule.ts": { + "original": { + "version": "-3090574810-export const World = \"hello\";", + "signature": "-9234818176-export declare const World = \"hello\";\n" + }, + "version": "-3090574810-export const World = \"hello\";", + "signature": "-9234818176-export declare const World = \"hello\";\n" + }, + "./index.ts": { + "original": { + "version": "-15745098553-export const someString: string = \"HELLO WORLD\";\nexport function leftPad(s: string, n: number) { return s + n; }\nexport function multiply(a: number, b: number) { return a * b; }\n", + "signature": "-7362568283-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n" + }, + "version": "-15745098553-export const someString: string = \"HELLO WORLD\";\nexport function leftPad(s: string, n: number) { return s + n; }\nexport function multiply(a: number, b: number) { return a * b; }\n", + "signature": "-7362568283-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n" + }, + "./some_decl.d.ts": { + "original": { + "version": "-7959511260-declare const dts: any;", + "affectsGlobalScope": true + }, + "version": "-7959511260-declare const dts: any;", + "signature": "-7959511260-declare const dts: any;", + "affectsGlobalScope": true + } + }, + "root": [ + [ + [ + 2, + 4 + ], + [ + "./anothermodule.ts", + "./index.ts", + "./some_decl.d.ts" + ] + ] + ], + "options": { + "composite": true, + "declaration": true, + "declarationMap": true, + "skipDefaultLibCheck": true + }, + "latestChangedDtsFile": "./index.d.ts", + "version": "FakeTSVersion", + "size": 1380 +} + +//// [/user/username/projects/sample1/logic/index.d.ts] +export declare function getSecondsInDay(): number; +import * as mod from '../core/anotherModule'; +export declare const m: typeof mod; + + +//// [/user/username/projects/sample1/logic/index.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.m = void 0; +exports.getSecondsInDay = getSecondsInDay; +var c = require("../core/index"); +function getSecondsInDay() { + return c.multiply(10, 15); +} +var mod = require("../core/anotherModule"); +exports.m = mod; +//# sourceMappingURL=index.js.map + +//// [/user/username/projects/sample1/logic/index.js.map] +{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;AACA,0CAEC;AAHD,iCAAmC;AACnC,SAAgB,eAAe;IAC3B,OAAO,CAAC,CAAC,QAAQ,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;AAC9B,CAAC;AACD,2CAA6C;AAChC,QAAA,CAAC,GAAG,GAAG,CAAC"} + +//// [/user/username/projects/sample1/logic/tsconfig.tsbuildinfo] +{"fileNames":["../../../../../a/lib/lib.d.ts","../core/index.d.ts","../core/anothermodule.d.ts","./index.ts"],"fileIdsList":[[2,3]],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-7362568283-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n","-9234818176-export declare const World = \"hello\";\n",{"version":"-9623801128-import * as c from '../core/index';\nexport function getSecondsInDay() {\n return c.multiply(10, 15);\n}\nimport * as mod from '../core/anotherModule';\nexport const m = mod;\n","signature":"-9659407152-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n"}],"root":[4],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true,"sourceMap":true},"referencedMap":[[4,1]],"latestChangedDtsFile":"./index.d.ts","version":"FakeTSVersion"} + +//// [/user/username/projects/sample1/logic/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "fileNames": [ + "../../../../../a/lib/lib.d.ts", + "../core/index.d.ts", + "../core/anothermodule.d.ts", + "./index.ts" + ], + "fileIdsList": [ + [ + "../core/index.d.ts", + "../core/anothermodule.d.ts" + ] + ], + "fileInfos": { + "../../../../../a/lib/lib.d.ts": { + "original": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "../core/index.d.ts": { + "version": "-7362568283-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n", + "signature": "-7362568283-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n" + }, + "../core/anothermodule.d.ts": { + "version": "-9234818176-export declare const World = \"hello\";\n", + "signature": "-9234818176-export declare const World = \"hello\";\n" + }, + "./index.ts": { + "original": { + "version": "-9623801128-import * as c from '../core/index';\nexport function getSecondsInDay() {\n return c.multiply(10, 15);\n}\nimport * as mod from '../core/anotherModule';\nexport const m = mod;\n", + "signature": "-9659407152-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n" + }, + "version": "-9623801128-import * as c from '../core/index';\nexport function getSecondsInDay() {\n return c.multiply(10, 15);\n}\nimport * as mod from '../core/anotherModule';\nexport const m = mod;\n", + "signature": "-9659407152-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n" + } + }, + "root": [ + [ + 4, + "./index.ts" + ] + ], + "options": { + "composite": true, + "declaration": true, + "skipDefaultLibCheck": true, + "sourceMap": true + }, + "referencedMap": { + "./index.ts": [ + "../core/index.d.ts", + "../core/anothermodule.d.ts" + ] + }, + "latestChangedDtsFile": "./index.d.ts", + "version": "FakeTSVersion", + "size": 1427 +} + +//// [/user/username/projects/sample1/tests/index.d.ts] +import * as mod from '../core/anotherModule'; +export declare const m: typeof mod; + + +//// [/user/username/projects/sample1/tests/index.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.m = void 0; +var c = require("../core/index"); +var logic = require("../logic/index"); +c.leftPad("", 10); +logic.getSecondsInDay(); +var mod = require("../core/anotherModule"); +exports.m = mod; + + +//// [/user/username/projects/sample1/tests/tsconfig.tsbuildinfo] +{"fileNames":["../../../../../a/lib/lib.d.ts","../core/index.d.ts","../core/anothermodule.d.ts","../logic/index.d.ts","./index.ts"],"fileIdsList":[[3],[2,3,4]],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-7362568283-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n","-9234818176-export declare const World = \"hello\";\n","-9659407152-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n",{"version":"-11950676699-import * as c from '../core/index';\nimport * as logic from '../logic/index';\n\nc.leftPad(\"\", 10);\nlogic.getSecondsInDay();\n\nimport * as mod from '../core/anotherModule';\nexport const m = mod;\n","signature":"2702201019-import * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n"}],"root":[5],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true},"referencedMap":[[4,1],[5,2]],"latestChangedDtsFile":"./index.d.ts","version":"FakeTSVersion"} + +//// [/user/username/projects/sample1/tests/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "fileNames": [ + "../../../../../a/lib/lib.d.ts", + "../core/index.d.ts", + "../core/anothermodule.d.ts", + "../logic/index.d.ts", + "./index.ts" + ], + "fileIdsList": [ + [ + "../core/anothermodule.d.ts" + ], + [ + "../core/index.d.ts", + "../core/anothermodule.d.ts", + "../logic/index.d.ts" + ] + ], + "fileInfos": { + "../../../../../a/lib/lib.d.ts": { + "original": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "../core/index.d.ts": { + "version": "-7362568283-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n", + "signature": "-7362568283-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n" + }, + "../core/anothermodule.d.ts": { + "version": "-9234818176-export declare const World = \"hello\";\n", + "signature": "-9234818176-export declare const World = \"hello\";\n" + }, + "../logic/index.d.ts": { + "version": "-9659407152-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n", + "signature": "-9659407152-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n" + }, + "./index.ts": { + "original": { + "version": "-11950676699-import * as c from '../core/index';\nimport * as logic from '../logic/index';\n\nc.leftPad(\"\", 10);\nlogic.getSecondsInDay();\n\nimport * as mod from '../core/anotherModule';\nexport const m = mod;\n", + "signature": "2702201019-import * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n" + }, + "version": "-11950676699-import * as c from '../core/index';\nimport * as logic from '../logic/index';\n\nc.leftPad(\"\", 10);\nlogic.getSecondsInDay();\n\nimport * as mod from '../core/anotherModule';\nexport const m = mod;\n", + "signature": "2702201019-import * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n" + } + }, + "root": [ + [ + 5, + "./index.ts" + ] + ], + "options": { + "composite": true, + "declaration": true, + "skipDefaultLibCheck": true + }, + "referencedMap": { + "../logic/index.d.ts": [ + "../core/anothermodule.d.ts" + ], + "./index.ts": [ + "../core/index.d.ts", + "../core/anothermodule.d.ts", + "../logic/index.d.ts" + ] + }, + "latestChangedDtsFile": "./index.d.ts", + "version": "FakeTSVersion", + "size": 1565 +} + diff --git a/tests/baselines/reference/tsbuild/sample1/skips-builds-downstream-projects-if-upstream-projects-have-errors-with-stopBuildOnErrors.js b/tests/baselines/reference/tsbuild/sample1/skips-builds-downstream-projects-if-upstream-projects-have-errors-with-stopBuildOnErrors.js new file mode 100644 index 0000000000000..8f0a3da4d677c --- /dev/null +++ b/tests/baselines/reference/tsbuild/sample1/skips-builds-downstream-projects-if-upstream-projects-have-errors-with-stopBuildOnErrors.js @@ -0,0 +1,605 @@ +currentDirectory:: /user/username/projects/sample1 useCaseSensitiveFileNames: false +Input:: +//// [/a/lib/lib.d.ts] +/// +interface Boolean {} +interface Function {} +interface CallableFunction {} +interface NewableFunction {} +interface IArguments {} +interface Number { toExponential: any; } +interface Object {} +interface RegExp {} +interface String { charAt: any; } +interface Array { length: number; [n: number]: T; } +interface ReadonlyArray {} +declare const console: { log(msg: any): void; }; + +//// [/user/username/projects/sample1/core/anotherModule.ts] +export const World = "hello"; + +//// [/user/username/projects/sample1/core/index.ts] +export const someString: string = "HELLO WORLD"; +export function leftPad(s: string, n: number) { return s + n; } +export function multiply(a: number, b: number) { return a * b; } +multiply(); + +//// [/user/username/projects/sample1/core/some_decl.d.ts] +declare const dts: any; + +//// [/user/username/projects/sample1/core/tsconfig.json] +{ + "compilerOptions": { + "composite": true, + "declaration": true, + "declarationMap": true, + "skipDefaultLibCheck": true + } +} + +//// [/user/username/projects/sample1/logic/index.ts] +import * as c from '../core/index'; +export function getSecondsInDay() { + return c.multiply(10, 15); +} +import * as mod from '../core/anotherModule'; +export const m = mod; + + +//// [/user/username/projects/sample1/logic/tsconfig.json] +{ + "compilerOptions": { + "composite": true, + "declaration": true, + "sourceMap": true, + "forceConsistentCasingInFileNames": true, + "skipDefaultLibCheck": true + }, + "references": [ + { + "path": "../core" + } + ] +} + +//// [/user/username/projects/sample1/tests/index.ts] +import * as c from '../core/index'; +import * as logic from '../logic/index'; + +c.leftPad("", 10); +logic.getSecondsInDay(); + +import * as mod from '../core/anotherModule'; +export const m = mod; + + +//// [/user/username/projects/sample1/tests/tsconfig.json] +{ + "references": [ + { + "path": "../core" + }, + { + "path": "../logic" + } + ], + "files": [ + "index.ts" + ], + "compilerOptions": { + "composite": true, + "declaration": true, + "forceConsistentCasingInFileNames": true, + "skipDefaultLibCheck": true + } +} + + + +Output:: +/a/lib/tsc --b tests --verbose --stopBuildOnErrors +[HH:MM:SS AM] Projects in this build: + * core/tsconfig.json + * logic/tsconfig.json + * tests/tsconfig.json + +[HH:MM:SS AM] Project 'core/tsconfig.json' is out of date because output file 'core/tsconfig.tsbuildinfo' does not exist + +[HH:MM:SS AM] Building project '/user/username/projects/sample1/core/tsconfig.json'... + +core/index.ts:4:1 - error TS2554: Expected 2 arguments, but got 0. + +4 multiply(); +  ~~~~~~~~ + + core/index.ts:3:26 + 3 export function multiply(a: number, b: number) { return a * b; } +    ~~~~~~~~~ + An argument for 'a' was not provided. + +[HH:MM:SS AM] Project 'logic/tsconfig.json' can't be built because its dependency 'core' has errors + +[HH:MM:SS AM] Skipping build of project '/user/username/projects/sample1/logic/tsconfig.json' because its dependency '/user/username/projects/sample1/core' has errors + +[HH:MM:SS AM] Project 'tests/tsconfig.json' can't be built because its dependency 'core' has errors + +[HH:MM:SS AM] Skipping build of project '/user/username/projects/sample1/tests/tsconfig.json' because its dependency '/user/username/projects/sample1/core' has errors + + +Found 1 error. + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped + + +//// [/user/username/projects/sample1/core/anotherModule.d.ts] +export declare const World = "hello"; +//# sourceMappingURL=anotherModule.d.ts.map + +//// [/user/username/projects/sample1/core/anotherModule.d.ts.map] +{"version":3,"file":"anotherModule.d.ts","sourceRoot":"","sources":["anotherModule.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,KAAK,UAAU,CAAC"} + +//// [/user/username/projects/sample1/core/anotherModule.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.World = void 0; +exports.World = "hello"; + + +//// [/user/username/projects/sample1/core/index.d.ts] +export declare const someString: string; +export declare function leftPad(s: string, n: number): string; +export declare function multiply(a: number, b: number): number; +//# sourceMappingURL=index.d.ts.map + +//// [/user/username/projects/sample1/core/index.d.ts.map] +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU,EAAE,MAAsB,CAAC;AAChD,wBAAgB,OAAO,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,UAAmB;AAC/D,wBAAgB,QAAQ,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,UAAmB"} + +//// [/user/username/projects/sample1/core/index.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.someString = void 0; +exports.leftPad = leftPad; +exports.multiply = multiply; +exports.someString = "HELLO WORLD"; +function leftPad(s, n) { return s + n; } +function multiply(a, b) { return a * b; } +multiply(); + + +//// [/user/username/projects/sample1/core/tsconfig.tsbuildinfo] +{"fileNames":["../../../../../a/lib/lib.d.ts","./anothermodule.ts","./index.ts","./some_decl.d.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-3090574810-export const World = \"hello\";","signature":"-9234818176-export declare const World = \"hello\";\n"},{"version":"-12887218413-export const someString: string = \"HELLO WORLD\";\nexport function leftPad(s: string, n: number) { return s + n; }\nexport function multiply(a: number, b: number) { return a * b; }\nmultiply();","signature":"-7362568283-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n"},{"version":"-7959511260-declare const dts: any;","affectsGlobalScope":true}],"root":[[2,4]],"options":{"composite":true,"declaration":true,"declarationMap":true,"skipDefaultLibCheck":true},"semanticDiagnosticsPerFile":[[3,[{"start":178,"length":8,"messageText":"Expected 2 arguments, but got 0.","category":1,"code":2554,"relatedInformation":[{"start":138,"length":9,"messageText":"An argument for 'a' was not provided.","category":3,"code":6210}]}]]],"latestChangedDtsFile":"./index.d.ts","version":"FakeTSVersion"} + +//// [/user/username/projects/sample1/core/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "fileNames": [ + "../../../../../a/lib/lib.d.ts", + "./anothermodule.ts", + "./index.ts", + "./some_decl.d.ts" + ], + "fileInfos": { + "../../../../../a/lib/lib.d.ts": { + "original": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./anothermodule.ts": { + "original": { + "version": "-3090574810-export const World = \"hello\";", + "signature": "-9234818176-export declare const World = \"hello\";\n" + }, + "version": "-3090574810-export const World = \"hello\";", + "signature": "-9234818176-export declare const World = \"hello\";\n" + }, + "./index.ts": { + "original": { + "version": "-12887218413-export const someString: string = \"HELLO WORLD\";\nexport function leftPad(s: string, n: number) { return s + n; }\nexport function multiply(a: number, b: number) { return a * b; }\nmultiply();", + "signature": "-7362568283-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n" + }, + "version": "-12887218413-export const someString: string = \"HELLO WORLD\";\nexport function leftPad(s: string, n: number) { return s + n; }\nexport function multiply(a: number, b: number) { return a * b; }\nmultiply();", + "signature": "-7362568283-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n" + }, + "./some_decl.d.ts": { + "original": { + "version": "-7959511260-declare const dts: any;", + "affectsGlobalScope": true + }, + "version": "-7959511260-declare const dts: any;", + "signature": "-7959511260-declare const dts: any;", + "affectsGlobalScope": true + } + }, + "root": [ + [ + [ + 2, + 4 + ], + [ + "./anothermodule.ts", + "./index.ts", + "./some_decl.d.ts" + ] + ] + ], + "options": { + "composite": true, + "declaration": true, + "declarationMap": true, + "skipDefaultLibCheck": true + }, + "semanticDiagnosticsPerFile": [ + [ + "./index.ts", + [ + { + "start": 178, + "length": 8, + "messageText": "Expected 2 arguments, but got 0.", + "category": 1, + "code": 2554, + "relatedInformation": [ + { + "start": 138, + "length": 9, + "messageText": "An argument for 'a' was not provided.", + "category": 3, + "code": 6210 + } + ] + } + ] + ] + ], + "latestChangedDtsFile": "./index.d.ts", + "version": "FakeTSVersion", + "size": 1654 +} + + + +Change:: no-change-run +Input:: + + +Output:: +/a/lib/tsc --b tests --verbose --stopBuildOnErrors +[HH:MM:SS AM] Projects in this build: + * core/tsconfig.json + * logic/tsconfig.json + * tests/tsconfig.json + +[HH:MM:SS AM] Project 'core/tsconfig.json' is out of date because buildinfo file 'core/tsconfig.tsbuildinfo' indicates that program needs to report errors. + +[HH:MM:SS AM] Building project '/user/username/projects/sample1/core/tsconfig.json'... + +core/index.ts:4:1 - error TS2554: Expected 2 arguments, but got 0. + +4 multiply(); +  ~~~~~~~~ + + core/index.ts:3:26 + 3 export function multiply(a: number, b: number) { return a * b; } +    ~~~~~~~~~ + An argument for 'a' was not provided. + +[HH:MM:SS AM] Project 'logic/tsconfig.json' can't be built because its dependency 'core' has errors + +[HH:MM:SS AM] Skipping build of project '/user/username/projects/sample1/logic/tsconfig.json' because its dependency '/user/username/projects/sample1/core' has errors + +[HH:MM:SS AM] Project 'tests/tsconfig.json' can't be built because its dependency 'core' has errors + +[HH:MM:SS AM] Skipping build of project '/user/username/projects/sample1/tests/tsconfig.json' because its dependency '/user/username/projects/sample1/core' has errors + + +Found 1 error. + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped + + + + +Change:: fix error +Input:: +//// [/user/username/projects/sample1/core/index.ts] +export const someString: string = "HELLO WORLD"; +export function leftPad(s: string, n: number) { return s + n; } +export function multiply(a: number, b: number) { return a * b; } + + + + +Output:: +/a/lib/tsc --b tests --verbose --stopBuildOnErrors +[HH:MM:SS AM] Projects in this build: + * core/tsconfig.json + * logic/tsconfig.json + * tests/tsconfig.json + +[HH:MM:SS AM] Project 'core/tsconfig.json' is out of date because buildinfo file 'core/tsconfig.tsbuildinfo' indicates that program needs to report errors. + +[HH:MM:SS AM] Building project '/user/username/projects/sample1/core/tsconfig.json'... + +[HH:MM:SS AM] Project 'logic/tsconfig.json' is out of date because output file 'logic/tsconfig.tsbuildinfo' does not exist + +[HH:MM:SS AM] Building project '/user/username/projects/sample1/logic/tsconfig.json'... + +[HH:MM:SS AM] Project 'tests/tsconfig.json' is out of date because output file 'tests/tsconfig.tsbuildinfo' does not exist + +[HH:MM:SS AM] Building project '/user/username/projects/sample1/tests/tsconfig.json'... + +exitCode:: ExitStatus.Success + + +//// [/user/username/projects/sample1/core/index.d.ts.map] file written with same contents +//// [/user/username/projects/sample1/core/index.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.someString = void 0; +exports.leftPad = leftPad; +exports.multiply = multiply; +exports.someString = "HELLO WORLD"; +function leftPad(s, n) { return s + n; } +function multiply(a, b) { return a * b; } + + +//// [/user/username/projects/sample1/core/tsconfig.tsbuildinfo] +{"fileNames":["../../../../../a/lib/lib.d.ts","./anothermodule.ts","./index.ts","./some_decl.d.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-3090574810-export const World = \"hello\";","signature":"-9234818176-export declare const World = \"hello\";\n"},{"version":"-15745098553-export const someString: string = \"HELLO WORLD\";\nexport function leftPad(s: string, n: number) { return s + n; }\nexport function multiply(a: number, b: number) { return a * b; }\n","signature":"-7362568283-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n"},{"version":"-7959511260-declare const dts: any;","affectsGlobalScope":true}],"root":[[2,4]],"options":{"composite":true,"declaration":true,"declarationMap":true,"skipDefaultLibCheck":true},"latestChangedDtsFile":"./index.d.ts","version":"FakeTSVersion"} + +//// [/user/username/projects/sample1/core/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "fileNames": [ + "../../../../../a/lib/lib.d.ts", + "./anothermodule.ts", + "./index.ts", + "./some_decl.d.ts" + ], + "fileInfos": { + "../../../../../a/lib/lib.d.ts": { + "original": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "./anothermodule.ts": { + "original": { + "version": "-3090574810-export const World = \"hello\";", + "signature": "-9234818176-export declare const World = \"hello\";\n" + }, + "version": "-3090574810-export const World = \"hello\";", + "signature": "-9234818176-export declare const World = \"hello\";\n" + }, + "./index.ts": { + "original": { + "version": "-15745098553-export const someString: string = \"HELLO WORLD\";\nexport function leftPad(s: string, n: number) { return s + n; }\nexport function multiply(a: number, b: number) { return a * b; }\n", + "signature": "-7362568283-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n" + }, + "version": "-15745098553-export const someString: string = \"HELLO WORLD\";\nexport function leftPad(s: string, n: number) { return s + n; }\nexport function multiply(a: number, b: number) { return a * b; }\n", + "signature": "-7362568283-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n" + }, + "./some_decl.d.ts": { + "original": { + "version": "-7959511260-declare const dts: any;", + "affectsGlobalScope": true + }, + "version": "-7959511260-declare const dts: any;", + "signature": "-7959511260-declare const dts: any;", + "affectsGlobalScope": true + } + }, + "root": [ + [ + [ + 2, + 4 + ], + [ + "./anothermodule.ts", + "./index.ts", + "./some_decl.d.ts" + ] + ] + ], + "options": { + "composite": true, + "declaration": true, + "declarationMap": true, + "skipDefaultLibCheck": true + }, + "latestChangedDtsFile": "./index.d.ts", + "version": "FakeTSVersion", + "size": 1380 +} + +//// [/user/username/projects/sample1/logic/index.d.ts] +export declare function getSecondsInDay(): number; +import * as mod from '../core/anotherModule'; +export declare const m: typeof mod; + + +//// [/user/username/projects/sample1/logic/index.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.m = void 0; +exports.getSecondsInDay = getSecondsInDay; +var c = require("../core/index"); +function getSecondsInDay() { + return c.multiply(10, 15); +} +var mod = require("../core/anotherModule"); +exports.m = mod; +//# sourceMappingURL=index.js.map + +//// [/user/username/projects/sample1/logic/index.js.map] +{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;AACA,0CAEC;AAHD,iCAAmC;AACnC,SAAgB,eAAe;IAC3B,OAAO,CAAC,CAAC,QAAQ,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;AAC9B,CAAC;AACD,2CAA6C;AAChC,QAAA,CAAC,GAAG,GAAG,CAAC"} + +//// [/user/username/projects/sample1/logic/tsconfig.tsbuildinfo] +{"fileNames":["../../../../../a/lib/lib.d.ts","../core/index.d.ts","../core/anothermodule.d.ts","./index.ts"],"fileIdsList":[[2,3]],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-7362568283-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n","-9234818176-export declare const World = \"hello\";\n",{"version":"-9623801128-import * as c from '../core/index';\nexport function getSecondsInDay() {\n return c.multiply(10, 15);\n}\nimport * as mod from '../core/anotherModule';\nexport const m = mod;\n","signature":"-9659407152-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n"}],"root":[4],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true,"sourceMap":true},"referencedMap":[[4,1]],"latestChangedDtsFile":"./index.d.ts","version":"FakeTSVersion"} + +//// [/user/username/projects/sample1/logic/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "fileNames": [ + "../../../../../a/lib/lib.d.ts", + "../core/index.d.ts", + "../core/anothermodule.d.ts", + "./index.ts" + ], + "fileIdsList": [ + [ + "../core/index.d.ts", + "../core/anothermodule.d.ts" + ] + ], + "fileInfos": { + "../../../../../a/lib/lib.d.ts": { + "original": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "../core/index.d.ts": { + "version": "-7362568283-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n", + "signature": "-7362568283-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n" + }, + "../core/anothermodule.d.ts": { + "version": "-9234818176-export declare const World = \"hello\";\n", + "signature": "-9234818176-export declare const World = \"hello\";\n" + }, + "./index.ts": { + "original": { + "version": "-9623801128-import * as c from '../core/index';\nexport function getSecondsInDay() {\n return c.multiply(10, 15);\n}\nimport * as mod from '../core/anotherModule';\nexport const m = mod;\n", + "signature": "-9659407152-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n" + }, + "version": "-9623801128-import * as c from '../core/index';\nexport function getSecondsInDay() {\n return c.multiply(10, 15);\n}\nimport * as mod from '../core/anotherModule';\nexport const m = mod;\n", + "signature": "-9659407152-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n" + } + }, + "root": [ + [ + 4, + "./index.ts" + ] + ], + "options": { + "composite": true, + "declaration": true, + "skipDefaultLibCheck": true, + "sourceMap": true + }, + "referencedMap": { + "./index.ts": [ + "../core/index.d.ts", + "../core/anothermodule.d.ts" + ] + }, + "latestChangedDtsFile": "./index.d.ts", + "version": "FakeTSVersion", + "size": 1427 +} + +//// [/user/username/projects/sample1/tests/index.d.ts] +import * as mod from '../core/anotherModule'; +export declare const m: typeof mod; + + +//// [/user/username/projects/sample1/tests/index.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.m = void 0; +var c = require("../core/index"); +var logic = require("../logic/index"); +c.leftPad("", 10); +logic.getSecondsInDay(); +var mod = require("../core/anotherModule"); +exports.m = mod; + + +//// [/user/username/projects/sample1/tests/tsconfig.tsbuildinfo] +{"fileNames":["../../../../../a/lib/lib.d.ts","../core/index.d.ts","../core/anothermodule.d.ts","../logic/index.d.ts","./index.ts"],"fileIdsList":[[3],[2,3,4]],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-7362568283-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n","-9234818176-export declare const World = \"hello\";\n","-9659407152-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n",{"version":"-11950676699-import * as c from '../core/index';\nimport * as logic from '../logic/index';\n\nc.leftPad(\"\", 10);\nlogic.getSecondsInDay();\n\nimport * as mod from '../core/anotherModule';\nexport const m = mod;\n","signature":"2702201019-import * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n"}],"root":[5],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true},"referencedMap":[[4,1],[5,2]],"latestChangedDtsFile":"./index.d.ts","version":"FakeTSVersion"} + +//// [/user/username/projects/sample1/tests/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "fileNames": [ + "../../../../../a/lib/lib.d.ts", + "../core/index.d.ts", + "../core/anothermodule.d.ts", + "../logic/index.d.ts", + "./index.ts" + ], + "fileIdsList": [ + [ + "../core/anothermodule.d.ts" + ], + [ + "../core/index.d.ts", + "../core/anothermodule.d.ts", + "../logic/index.d.ts" + ] + ], + "fileInfos": { + "../../../../../a/lib/lib.d.ts": { + "original": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "affectsGlobalScope": true + }, + "../core/index.d.ts": { + "version": "-7362568283-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n", + "signature": "-7362568283-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n" + }, + "../core/anothermodule.d.ts": { + "version": "-9234818176-export declare const World = \"hello\";\n", + "signature": "-9234818176-export declare const World = \"hello\";\n" + }, + "../logic/index.d.ts": { + "version": "-9659407152-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n", + "signature": "-9659407152-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n" + }, + "./index.ts": { + "original": { + "version": "-11950676699-import * as c from '../core/index';\nimport * as logic from '../logic/index';\n\nc.leftPad(\"\", 10);\nlogic.getSecondsInDay();\n\nimport * as mod from '../core/anotherModule';\nexport const m = mod;\n", + "signature": "2702201019-import * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n" + }, + "version": "-11950676699-import * as c from '../core/index';\nimport * as logic from '../logic/index';\n\nc.leftPad(\"\", 10);\nlogic.getSecondsInDay();\n\nimport * as mod from '../core/anotherModule';\nexport const m = mod;\n", + "signature": "2702201019-import * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n" + } + }, + "root": [ + [ + 5, + "./index.ts" + ] + ], + "options": { + "composite": true, + "declaration": true, + "skipDefaultLibCheck": true + }, + "referencedMap": { + "../logic/index.d.ts": [ + "../core/anothermodule.d.ts" + ], + "./index.ts": [ + "../core/index.d.ts", + "../core/anothermodule.d.ts", + "../logic/index.d.ts" + ] + }, + "latestChangedDtsFile": "./index.d.ts", + "version": "FakeTSVersion", + "size": 1565 +} + diff --git a/tests/baselines/reference/tsbuildWatch/programUpdates/reportErrors/when-stopBuildOnErrors-is-passed-on-command-line.js b/tests/baselines/reference/tsbuildWatch/programUpdates/reportErrors/when-stopBuildOnErrors-is-passed-on-command-line.js new file mode 100644 index 0000000000000..cccf6cf96d7f7 --- /dev/null +++ b/tests/baselines/reference/tsbuildWatch/programUpdates/reportErrors/when-stopBuildOnErrors-is-passed-on-command-line.js @@ -0,0 +1,890 @@ +currentDirectory:: /user/username/projects/sample1 useCaseSensitiveFileNames: false +Input:: +//// [/a/lib/lib.d.ts] +/// +interface Boolean {} +interface Function {} +interface CallableFunction {} +interface NewableFunction {} +interface IArguments {} +interface Number { toExponential: any; } +interface Object {} +interface RegExp {} +interface String { charAt: any; } +interface Array { length: number; [n: number]: T; } + +//// [/user/username/projects/sample1/core/tsconfig.json] +{ + "compilerOptions": { + "composite": true, + "declaration": true, + "declarationMap": true, + "skipDefaultLibCheck": true + } +} + +//// [/user/username/projects/sample1/core/index.ts] +export const someString: string = "HELLO WORLD"; +export function leftPad(s: string, n: number) { return s + n; } +export function multiply(a: number, b: number) { return a * b; } + + +//// [/user/username/projects/sample1/core/some_decl.d.ts] +declare const dts: any; + +//// [/user/username/projects/sample1/core/anotherModule.ts] +export const World = "hello"; + +//// [/user/username/projects/sample1/logic/tsconfig.json] +{ + "compilerOptions": { + "composite": true, + "declaration": true, + "sourceMap": true, + "forceConsistentCasingInFileNames": true, + "skipDefaultLibCheck": true + }, + "references": [ + { + "path": "../core" + } + ] +} + +//// [/user/username/projects/sample1/logic/index.ts] +import * as c from '../core/index'; +export function getSecondsInDay() { + return c.multiply(10, 15); +} +import * as mod from '../core/anotherModule'; +export const m = mod; + + +//// [/user/username/projects/sample1/tests/tsconfig.json] +{ + "references": [ + { + "path": "../core" + }, + { + "path": "../logic" + } + ], + "files": [ + "index.ts" + ], + "compilerOptions": { + "composite": true, + "declaration": true, + "forceConsistentCasingInFileNames": true, + "skipDefaultLibCheck": true + } +} + +//// [/user/username/projects/sample1/tests/index.ts] +import * as c from '../core/index'; +import * as logic from '../logic/index'; + +c.leftPad("", 10); +logic.getSecondsInDay(); + +import * as mod from '../core/anotherModule'; +export const m = mod; + + + +/a/lib/tsc.js -b -w tests --stopBuildOnErrors +Output:: +>> Screen clear +[HH:MM:SS AM] Starting compilation in watch mode... + +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + + + +//// [/user/username/projects/sample1/core/anotherModule.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.World = void 0; +exports.World = "hello"; + + +//// [/user/username/projects/sample1/core/anotherModule.d.ts.map] +{"version":3,"file":"anotherModule.d.ts","sourceRoot":"","sources":["anotherModule.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,KAAK,UAAU,CAAC"} + +//// [/user/username/projects/sample1/core/anotherModule.d.ts] +export declare const World = "hello"; +//# sourceMappingURL=anotherModule.d.ts.map + +//// [/user/username/projects/sample1/core/index.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.someString = void 0; +exports.leftPad = leftPad; +exports.multiply = multiply; +exports.someString = "HELLO WORLD"; +function leftPad(s, n) { return s + n; } +function multiply(a, b) { return a * b; } + + +//// [/user/username/projects/sample1/core/index.d.ts.map] +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU,EAAE,MAAsB,CAAC;AAChD,wBAAgB,OAAO,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,UAAmB;AAC/D,wBAAgB,QAAQ,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,UAAmB"} + +//// [/user/username/projects/sample1/core/index.d.ts] +export declare const someString: string; +export declare function leftPad(s: string, n: number): string; +export declare function multiply(a: number, b: number): number; +//# sourceMappingURL=index.d.ts.map + +//// [/user/username/projects/sample1/core/tsconfig.tsbuildinfo] +{"fileNames":["../../../../../a/lib/lib.d.ts","./anothermodule.ts","./index.ts","./some_decl.d.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"-3090574810-export const World = \"hello\";","signature":"-9234818176-export declare const World = \"hello\";\n"},{"version":"-15745098553-export const someString: string = \"HELLO WORLD\";\nexport function leftPad(s: string, n: number) { return s + n; }\nexport function multiply(a: number, b: number) { return a * b; }\n","signature":"-7362568283-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n"},{"version":"-7959511260-declare const dts: any;","affectsGlobalScope":true}],"root":[[2,4]],"options":{"composite":true,"declaration":true,"declarationMap":true,"skipDefaultLibCheck":true},"latestChangedDtsFile":"./index.d.ts","version":"FakeTSVersion"} + +//// [/user/username/projects/sample1/core/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "fileNames": [ + "../../../../../a/lib/lib.d.ts", + "./anothermodule.ts", + "./index.ts", + "./some_decl.d.ts" + ], + "fileInfos": { + "../../../../../a/lib/lib.d.ts": { + "original": { + "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "affectsGlobalScope": true + }, + "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "signature": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "affectsGlobalScope": true + }, + "./anothermodule.ts": { + "original": { + "version": "-3090574810-export const World = \"hello\";", + "signature": "-9234818176-export declare const World = \"hello\";\n" + }, + "version": "-3090574810-export const World = \"hello\";", + "signature": "-9234818176-export declare const World = \"hello\";\n" + }, + "./index.ts": { + "original": { + "version": "-15745098553-export const someString: string = \"HELLO WORLD\";\nexport function leftPad(s: string, n: number) { return s + n; }\nexport function multiply(a: number, b: number) { return a * b; }\n", + "signature": "-7362568283-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n" + }, + "version": "-15745098553-export const someString: string = \"HELLO WORLD\";\nexport function leftPad(s: string, n: number) { return s + n; }\nexport function multiply(a: number, b: number) { return a * b; }\n", + "signature": "-7362568283-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n" + }, + "./some_decl.d.ts": { + "original": { + "version": "-7959511260-declare const dts: any;", + "affectsGlobalScope": true + }, + "version": "-7959511260-declare const dts: any;", + "signature": "-7959511260-declare const dts: any;", + "affectsGlobalScope": true + } + }, + "root": [ + [ + [ + 2, + 4 + ], + [ + "./anothermodule.ts", + "./index.ts", + "./some_decl.d.ts" + ] + ] + ], + "options": { + "composite": true, + "declaration": true, + "declarationMap": true, + "skipDefaultLibCheck": true + }, + "latestChangedDtsFile": "./index.d.ts", + "version": "FakeTSVersion", + "size": 1300 +} + +//// [/user/username/projects/sample1/logic/index.js.map] +{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;AACA,0CAEC;AAHD,iCAAmC;AACnC,SAAgB,eAAe;IAC3B,OAAO,CAAC,CAAC,QAAQ,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;AAC9B,CAAC;AACD,2CAA6C;AAChC,QAAA,CAAC,GAAG,GAAG,CAAC"} + +//// [/user/username/projects/sample1/logic/index.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.m = void 0; +exports.getSecondsInDay = getSecondsInDay; +var c = require("../core/index"); +function getSecondsInDay() { + return c.multiply(10, 15); +} +var mod = require("../core/anotherModule"); +exports.m = mod; +//# sourceMappingURL=index.js.map + +//// [/user/username/projects/sample1/logic/index.d.ts] +export declare function getSecondsInDay(): number; +import * as mod from '../core/anotherModule'; +export declare const m: typeof mod; + + +//// [/user/username/projects/sample1/logic/tsconfig.tsbuildinfo] +{"fileNames":["../../../../../a/lib/lib.d.ts","../core/index.d.ts","../core/anothermodule.d.ts","./index.ts"],"fileIdsList":[[2,3]],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-7362568283-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n","-9234818176-export declare const World = \"hello\";\n",{"version":"-9623801128-import * as c from '../core/index';\nexport function getSecondsInDay() {\n return c.multiply(10, 15);\n}\nimport * as mod from '../core/anotherModule';\nexport const m = mod;\n","signature":"-9659407152-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n"}],"root":[4],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true,"sourceMap":true},"referencedMap":[[4,1]],"latestChangedDtsFile":"./index.d.ts","version":"FakeTSVersion"} + +//// [/user/username/projects/sample1/logic/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "fileNames": [ + "../../../../../a/lib/lib.d.ts", + "../core/index.d.ts", + "../core/anothermodule.d.ts", + "./index.ts" + ], + "fileIdsList": [ + [ + "../core/index.d.ts", + "../core/anothermodule.d.ts" + ] + ], + "fileInfos": { + "../../../../../a/lib/lib.d.ts": { + "original": { + "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "affectsGlobalScope": true + }, + "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "signature": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "affectsGlobalScope": true + }, + "../core/index.d.ts": { + "version": "-7362568283-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n", + "signature": "-7362568283-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n" + }, + "../core/anothermodule.d.ts": { + "version": "-9234818176-export declare const World = \"hello\";\n", + "signature": "-9234818176-export declare const World = \"hello\";\n" + }, + "./index.ts": { + "original": { + "version": "-9623801128-import * as c from '../core/index';\nexport function getSecondsInDay() {\n return c.multiply(10, 15);\n}\nimport * as mod from '../core/anotherModule';\nexport const m = mod;\n", + "signature": "-9659407152-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n" + }, + "version": "-9623801128-import * as c from '../core/index';\nexport function getSecondsInDay() {\n return c.multiply(10, 15);\n}\nimport * as mod from '../core/anotherModule';\nexport const m = mod;\n", + "signature": "-9659407152-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n" + } + }, + "root": [ + [ + 4, + "./index.ts" + ] + ], + "options": { + "composite": true, + "declaration": true, + "skipDefaultLibCheck": true, + "sourceMap": true + }, + "referencedMap": { + "./index.ts": [ + "../core/index.d.ts", + "../core/anothermodule.d.ts" + ] + }, + "latestChangedDtsFile": "./index.d.ts", + "version": "FakeTSVersion", + "size": 1347 +} + +//// [/user/username/projects/sample1/tests/index.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.m = void 0; +var c = require("../core/index"); +var logic = require("../logic/index"); +c.leftPad("", 10); +logic.getSecondsInDay(); +var mod = require("../core/anotherModule"); +exports.m = mod; + + +//// [/user/username/projects/sample1/tests/index.d.ts] +import * as mod from '../core/anotherModule'; +export declare const m: typeof mod; + + +//// [/user/username/projects/sample1/tests/tsconfig.tsbuildinfo] +{"fileNames":["../../../../../a/lib/lib.d.ts","../core/index.d.ts","../core/anothermodule.d.ts","../logic/index.d.ts","./index.ts"],"fileIdsList":[[3],[2,3,4]],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-7362568283-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n","-9234818176-export declare const World = \"hello\";\n","-9659407152-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n",{"version":"-11950676699-import * as c from '../core/index';\nimport * as logic from '../logic/index';\n\nc.leftPad(\"\", 10);\nlogic.getSecondsInDay();\n\nimport * as mod from '../core/anotherModule';\nexport const m = mod;\n","signature":"2702201019-import * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n"}],"root":[5],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true},"referencedMap":[[4,1],[5,2]],"latestChangedDtsFile":"./index.d.ts","version":"FakeTSVersion"} + +//// [/user/username/projects/sample1/tests/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "fileNames": [ + "../../../../../a/lib/lib.d.ts", + "../core/index.d.ts", + "../core/anothermodule.d.ts", + "../logic/index.d.ts", + "./index.ts" + ], + "fileIdsList": [ + [ + "../core/anothermodule.d.ts" + ], + [ + "../core/index.d.ts", + "../core/anothermodule.d.ts", + "../logic/index.d.ts" + ] + ], + "fileInfos": { + "../../../../../a/lib/lib.d.ts": { + "original": { + "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "affectsGlobalScope": true + }, + "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "signature": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "affectsGlobalScope": true + }, + "../core/index.d.ts": { + "version": "-7362568283-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n", + "signature": "-7362568283-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n" + }, + "../core/anothermodule.d.ts": { + "version": "-9234818176-export declare const World = \"hello\";\n", + "signature": "-9234818176-export declare const World = \"hello\";\n" + }, + "../logic/index.d.ts": { + "version": "-9659407152-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n", + "signature": "-9659407152-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n" + }, + "./index.ts": { + "original": { + "version": "-11950676699-import * as c from '../core/index';\nimport * as logic from '../logic/index';\n\nc.leftPad(\"\", 10);\nlogic.getSecondsInDay();\n\nimport * as mod from '../core/anotherModule';\nexport const m = mod;\n", + "signature": "2702201019-import * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n" + }, + "version": "-11950676699-import * as c from '../core/index';\nimport * as logic from '../logic/index';\n\nc.leftPad(\"\", 10);\nlogic.getSecondsInDay();\n\nimport * as mod from '../core/anotherModule';\nexport const m = mod;\n", + "signature": "2702201019-import * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n" + } + }, + "root": [ + [ + 5, + "./index.ts" + ] + ], + "options": { + "composite": true, + "declaration": true, + "skipDefaultLibCheck": true + }, + "referencedMap": { + "../logic/index.d.ts": [ + "../core/anothermodule.d.ts" + ], + "./index.ts": [ + "../core/index.d.ts", + "../core/anothermodule.d.ts", + "../logic/index.d.ts" + ] + }, + "latestChangedDtsFile": "./index.d.ts", + "version": "FakeTSVersion", + "size": 1485 +} + + +FsWatches:: +/user/username/projects/sample1/core/anotherModule.ts: *new* + {} +/user/username/projects/sample1/core/index.ts: *new* + {} +/user/username/projects/sample1/core/some_decl.d.ts: *new* + {} +/user/username/projects/sample1/core/tsconfig.json: *new* + {} +/user/username/projects/sample1/logic/index.ts: *new* + {} +/user/username/projects/sample1/logic/tsconfig.json: *new* + {} +/user/username/projects/sample1/tests/index.ts: *new* + {} +/user/username/projects/sample1/tests/tsconfig.json: *new* + {} + +FsWatchesRecursive:: +/user/username/projects/sample1/core: *new* + {} +/user/username/projects/sample1/logic: *new* + {} + +Program root files: [ + "/user/username/projects/sample1/core/anotherModule.ts", + "/user/username/projects/sample1/core/index.ts", + "/user/username/projects/sample1/core/some_decl.d.ts" +] +Program options: { + "composite": true, + "declaration": true, + "declarationMap": true, + "skipDefaultLibCheck": true, + "watch": true, + "tscBuild": true, + "configFilePath": "/user/username/projects/sample1/core/tsconfig.json" +} +Program structureReused: Not +Program files:: +/a/lib/lib.d.ts +/user/username/projects/sample1/core/anotherModule.ts +/user/username/projects/sample1/core/index.ts +/user/username/projects/sample1/core/some_decl.d.ts + +Semantic diagnostics in builder refreshed for:: +/a/lib/lib.d.ts +/user/username/projects/sample1/core/anotherModule.ts +/user/username/projects/sample1/core/index.ts +/user/username/projects/sample1/core/some_decl.d.ts + +Shape signatures in builder refreshed for:: +/a/lib/lib.d.ts (used version) +/user/username/projects/sample1/core/anothermodule.ts (computed .d.ts during emit) +/user/username/projects/sample1/core/index.ts (computed .d.ts during emit) +/user/username/projects/sample1/core/some_decl.d.ts (used version) + +Program root files: [ + "/user/username/projects/sample1/logic/index.ts" +] +Program options: { + "composite": true, + "declaration": true, + "sourceMap": true, + "forceConsistentCasingInFileNames": true, + "skipDefaultLibCheck": true, + "watch": true, + "tscBuild": true, + "configFilePath": "/user/username/projects/sample1/logic/tsconfig.json" +} +Program structureReused: Not +Program files:: +/a/lib/lib.d.ts +/user/username/projects/sample1/core/index.d.ts +/user/username/projects/sample1/core/anotherModule.d.ts +/user/username/projects/sample1/logic/index.ts + +Semantic diagnostics in builder refreshed for:: +/a/lib/lib.d.ts +/user/username/projects/sample1/core/index.d.ts +/user/username/projects/sample1/core/anotherModule.d.ts +/user/username/projects/sample1/logic/index.ts + +Shape signatures in builder refreshed for:: +/a/lib/lib.d.ts (used version) +/user/username/projects/sample1/core/index.d.ts (used version) +/user/username/projects/sample1/core/anothermodule.d.ts (used version) +/user/username/projects/sample1/logic/index.ts (computed .d.ts during emit) + +Program root files: [ + "/user/username/projects/sample1/tests/index.ts" +] +Program options: { + "composite": true, + "declaration": true, + "forceConsistentCasingInFileNames": true, + "skipDefaultLibCheck": true, + "watch": true, + "tscBuild": true, + "configFilePath": "/user/username/projects/sample1/tests/tsconfig.json" +} +Program structureReused: Not +Program files:: +/a/lib/lib.d.ts +/user/username/projects/sample1/core/index.d.ts +/user/username/projects/sample1/core/anotherModule.d.ts +/user/username/projects/sample1/logic/index.d.ts +/user/username/projects/sample1/tests/index.ts + +Semantic diagnostics in builder refreshed for:: +/a/lib/lib.d.ts +/user/username/projects/sample1/core/index.d.ts +/user/username/projects/sample1/core/anotherModule.d.ts +/user/username/projects/sample1/logic/index.d.ts +/user/username/projects/sample1/tests/index.ts + +Shape signatures in builder refreshed for:: +/a/lib/lib.d.ts (used version) +/user/username/projects/sample1/core/index.d.ts (used version) +/user/username/projects/sample1/core/anothermodule.d.ts (used version) +/user/username/projects/sample1/logic/index.d.ts (used version) +/user/username/projects/sample1/tests/index.ts (computed .d.ts during emit) + +exitCode:: ExitStatus.undefined + +Change:: change logic + +Input:: +//// [/user/username/projects/sample1/logic/index.ts] +import * as c from '../core/index'; +export function getSecondsInDay() { + return c.multiply(10, 15); +} +import * as mod from '../core/anotherModule'; +export const m = mod; + +let y: string = 10; + + +Timeout callback:: count: 1 +1: timerToBuildInvalidatedProject *new* + +Before running Timeout callback:: count: 1 +1: timerToBuildInvalidatedProject + +Host is moving to new time +After running Timeout callback:: count: 0 +Output:: +>> Screen clear +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +logic/index.ts:8:5 - error TS2322: Type 'number' is not assignable to type 'string'. + +8 let y: string = 10; +   ~ + +[HH:MM:SS AM] Found 1 error. Watching for file changes. + + + +//// [/user/username/projects/sample1/logic/index.js.map] +{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;AACA,0CAEC;AAHD,iCAAmC;AACnC,SAAgB,eAAe;IAC3B,OAAO,CAAC,CAAC,QAAQ,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;AAC9B,CAAC;AACD,2CAA6C;AAChC,QAAA,CAAC,GAAG,GAAG,CAAC;AAErB,IAAI,CAAC,GAAW,EAAE,CAAC"} + +//// [/user/username/projects/sample1/logic/index.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.m = void 0; +exports.getSecondsInDay = getSecondsInDay; +var c = require("../core/index"); +function getSecondsInDay() { + return c.multiply(10, 15); +} +var mod = require("../core/anotherModule"); +exports.m = mod; +var y = 10; +//# sourceMappingURL=index.js.map + +//// [/user/username/projects/sample1/logic/tsconfig.tsbuildinfo] +{"fileNames":["../../../../../a/lib/lib.d.ts","../core/index.d.ts","../core/anothermodule.d.ts","./index.ts"],"fileIdsList":[[2,3]],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-7362568283-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n","-9234818176-export declare const World = \"hello\";\n",{"version":"-5319769398-import * as c from '../core/index';\nexport function getSecondsInDay() {\n return c.multiply(10, 15);\n}\nimport * as mod from '../core/anotherModule';\nexport const m = mod;\n\nlet y: string = 10;","signature":"-9659407152-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n"}],"root":[4],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true,"sourceMap":true},"referencedMap":[[4,1]],"semanticDiagnosticsPerFile":[[4,[{"start":178,"length":1,"code":2322,"category":1,"messageText":"Type 'number' is not assignable to type 'string'."}]]],"latestChangedDtsFile":"./index.d.ts","version":"FakeTSVersion"} + +//// [/user/username/projects/sample1/logic/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "fileNames": [ + "../../../../../a/lib/lib.d.ts", + "../core/index.d.ts", + "../core/anothermodule.d.ts", + "./index.ts" + ], + "fileIdsList": [ + [ + "../core/index.d.ts", + "../core/anothermodule.d.ts" + ] + ], + "fileInfos": { + "../../../../../a/lib/lib.d.ts": { + "original": { + "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "affectsGlobalScope": true + }, + "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "signature": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "affectsGlobalScope": true + }, + "../core/index.d.ts": { + "version": "-7362568283-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n", + "signature": "-7362568283-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n" + }, + "../core/anothermodule.d.ts": { + "version": "-9234818176-export declare const World = \"hello\";\n", + "signature": "-9234818176-export declare const World = \"hello\";\n" + }, + "./index.ts": { + "original": { + "version": "-5319769398-import * as c from '../core/index';\nexport function getSecondsInDay() {\n return c.multiply(10, 15);\n}\nimport * as mod from '../core/anotherModule';\nexport const m = mod;\n\nlet y: string = 10;", + "signature": "-9659407152-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n" + }, + "version": "-5319769398-import * as c from '../core/index';\nexport function getSecondsInDay() {\n return c.multiply(10, 15);\n}\nimport * as mod from '../core/anotherModule';\nexport const m = mod;\n\nlet y: string = 10;", + "signature": "-9659407152-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n" + } + }, + "root": [ + [ + 4, + "./index.ts" + ] + ], + "options": { + "composite": true, + "declaration": true, + "skipDefaultLibCheck": true, + "sourceMap": true + }, + "referencedMap": { + "./index.ts": [ + "../core/index.d.ts", + "../core/anothermodule.d.ts" + ] + }, + "semanticDiagnosticsPerFile": [ + [ + "./index.ts", + [ + { + "start": 178, + "length": 1, + "code": 2322, + "category": 1, + "messageText": "Type 'number' is not assignable to type 'string'." + } + ] + ] + ], + "latestChangedDtsFile": "./index.d.ts", + "version": "FakeTSVersion", + "size": 1521 +} + + + +Program root files: [ + "/user/username/projects/sample1/logic/index.ts" +] +Program options: { + "composite": true, + "declaration": true, + "sourceMap": true, + "forceConsistentCasingInFileNames": true, + "skipDefaultLibCheck": true, + "watch": true, + "tscBuild": true, + "configFilePath": "/user/username/projects/sample1/logic/tsconfig.json" +} +Program structureReused: Not +Program files:: +/a/lib/lib.d.ts +/user/username/projects/sample1/core/index.d.ts +/user/username/projects/sample1/core/anotherModule.d.ts +/user/username/projects/sample1/logic/index.ts + +Semantic diagnostics in builder refreshed for:: +/user/username/projects/sample1/logic/index.ts + +Shape signatures in builder refreshed for:: +/user/username/projects/sample1/logic/index.ts (computed .d.ts) + +exitCode:: ExitStatus.undefined + +Change:: change core + +Input:: +//// [/user/username/projects/sample1/core/index.ts] +export const someString: string = "HELLO WORLD"; +export function leftPad(s: string, n: number) { return s + n; } +export function multiply(a: number, b: number) { return a * b; } + +let x: string = 10; + + +Timeout callback:: count: 1 +2: timerToBuildInvalidatedProject *new* + +Before running Timeout callback:: count: 1 +2: timerToBuildInvalidatedProject + +Host is moving to new time +After running Timeout callback:: count: 0 +Output:: +>> Screen clear +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +core/index.ts:5:5 - error TS2322: Type 'number' is not assignable to type 'string'. + +5 let x: string = 10; +   ~ + +logic/index.ts:8:5 - error TS2322: Type 'number' is not assignable to type 'string'. + +8 let y: string = 10; +   ~ + +[HH:MM:SS AM] Found 2 errors. Watching for file changes. + + + +//// [/user/username/projects/sample1/core/index.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.someString = void 0; +exports.leftPad = leftPad; +exports.multiply = multiply; +exports.someString = "HELLO WORLD"; +function leftPad(s, n) { return s + n; } +function multiply(a, b) { return a * b; } +var x = 10; + + +//// [/user/username/projects/sample1/core/index.d.ts.map] file written with same contents +//// [/user/username/projects/sample1/core/tsconfig.tsbuildinfo] +{"fileNames":["../../../../../a/lib/lib.d.ts","./anothermodule.ts","./index.ts","./some_decl.d.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"-3090574810-export const World = \"hello\";","signature":"-9234818176-export declare const World = \"hello\";\n"},{"version":"-15390729096-export const someString: string = \"HELLO WORLD\";\nexport function leftPad(s: string, n: number) { return s + n; }\nexport function multiply(a: number, b: number) { return a * b; }\n\nlet x: string = 10;","signature":"-7362568283-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n"},{"version":"-7959511260-declare const dts: any;","affectsGlobalScope":true}],"root":[[2,4]],"options":{"composite":true,"declaration":true,"declarationMap":true,"skipDefaultLibCheck":true},"semanticDiagnosticsPerFile":[[3,[{"start":183,"length":1,"code":2322,"category":1,"messageText":"Type 'number' is not assignable to type 'string'."}]]],"latestChangedDtsFile":"./index.d.ts","version":"FakeTSVersion"} + +//// [/user/username/projects/sample1/core/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "fileNames": [ + "../../../../../a/lib/lib.d.ts", + "./anothermodule.ts", + "./index.ts", + "./some_decl.d.ts" + ], + "fileInfos": { + "../../../../../a/lib/lib.d.ts": { + "original": { + "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "affectsGlobalScope": true + }, + "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "signature": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "affectsGlobalScope": true + }, + "./anothermodule.ts": { + "original": { + "version": "-3090574810-export const World = \"hello\";", + "signature": "-9234818176-export declare const World = \"hello\";\n" + }, + "version": "-3090574810-export const World = \"hello\";", + "signature": "-9234818176-export declare const World = \"hello\";\n" + }, + "./index.ts": { + "original": { + "version": "-15390729096-export const someString: string = \"HELLO WORLD\";\nexport function leftPad(s: string, n: number) { return s + n; }\nexport function multiply(a: number, b: number) { return a * b; }\n\nlet x: string = 10;", + "signature": "-7362568283-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n" + }, + "version": "-15390729096-export const someString: string = \"HELLO WORLD\";\nexport function leftPad(s: string, n: number) { return s + n; }\nexport function multiply(a: number, b: number) { return a * b; }\n\nlet x: string = 10;", + "signature": "-7362568283-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n" + }, + "./some_decl.d.ts": { + "original": { + "version": "-7959511260-declare const dts: any;", + "affectsGlobalScope": true + }, + "version": "-7959511260-declare const dts: any;", + "signature": "-7959511260-declare const dts: any;", + "affectsGlobalScope": true + } + }, + "root": [ + [ + [ + 2, + 4 + ], + [ + "./anothermodule.ts", + "./index.ts", + "./some_decl.d.ts" + ] + ] + ], + "options": { + "composite": true, + "declaration": true, + "declarationMap": true, + "skipDefaultLibCheck": true + }, + "semanticDiagnosticsPerFile": [ + [ + "./index.ts", + [ + { + "start": 183, + "length": 1, + "code": 2322, + "category": 1, + "messageText": "Type 'number' is not assignable to type 'string'." + } + ] + ] + ], + "latestChangedDtsFile": "./index.d.ts", + "version": "FakeTSVersion", + "size": 1474 +} + + +Before running Timeout callback:: count: 0 + +After running Timeout callback:: count: 0 + + +Program root files: [ + "/user/username/projects/sample1/core/anotherModule.ts", + "/user/username/projects/sample1/core/index.ts", + "/user/username/projects/sample1/core/some_decl.d.ts" +] +Program options: { + "composite": true, + "declaration": true, + "declarationMap": true, + "skipDefaultLibCheck": true, + "watch": true, + "tscBuild": true, + "configFilePath": "/user/username/projects/sample1/core/tsconfig.json" +} +Program structureReused: Not +Program files:: +/a/lib/lib.d.ts +/user/username/projects/sample1/core/anotherModule.ts +/user/username/projects/sample1/core/index.ts +/user/username/projects/sample1/core/some_decl.d.ts + +Semantic diagnostics in builder refreshed for:: +/user/username/projects/sample1/core/index.ts + +Shape signatures in builder refreshed for:: +/user/username/projects/sample1/core/index.ts (computed .d.ts) + +exitCode:: ExitStatus.undefined + +Change:: fix error in logic + +Input:: +//// [/user/username/projects/sample1/logic/index.ts] +import * as c from '../core/index'; +export function getSecondsInDay() { + return c.multiply(10, 15); +} +import * as mod from '../core/anotherModule'; +export const m = mod; + + + +Timeout callback:: count: 1 +3: timerToBuildInvalidatedProject *new* + +Before running Timeout callback:: count: 1 +3: timerToBuildInvalidatedProject + +Host is moving to new time +After running Timeout callback:: count: 0 +Output:: +>> Screen clear +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +core/index.ts:5:5 - error TS2322: Type 'number' is not assignable to type 'string'. + +5 let x: string = 10; +   ~ + +[HH:MM:SS AM] Found 1 error. Watching for file changes. + + + + + +exitCode:: ExitStatus.undefined diff --git a/tests/baselines/reference/tsbuildWatch/programUpdates/skips-builds-downstream-projects-if-upstream-projects-have-errors-with-stopBuildOnErrors-when-test-does-not-reference-core.js b/tests/baselines/reference/tsbuildWatch/programUpdates/skips-builds-downstream-projects-if-upstream-projects-have-errors-with-stopBuildOnErrors-when-test-does-not-reference-core.js new file mode 100644 index 0000000000000..024873da5647c --- /dev/null +++ b/tests/baselines/reference/tsbuildWatch/programUpdates/skips-builds-downstream-projects-if-upstream-projects-have-errors-with-stopBuildOnErrors-when-test-does-not-reference-core.js @@ -0,0 +1,731 @@ +currentDirectory:: /user/username/projects/sample1 useCaseSensitiveFileNames: false +Input:: +//// [/a/lib/lib.d.ts] +/// +interface Boolean {} +interface Function {} +interface CallableFunction {} +interface NewableFunction {} +interface IArguments {} +interface Number { toExponential: any; } +interface Object {} +interface RegExp {} +interface String { charAt: any; } +interface Array { length: number; [n: number]: T; } + +//// [/user/username/projects/sample1/core/tsconfig.json] +{ + "compilerOptions": { + "composite": true, + "declaration": true, + "declarationMap": true, + "skipDefaultLibCheck": true + } +} + +//// [/user/username/projects/sample1/core/index.ts] +export const someString: string = "HELLO WORLD"; +export function leftPad(s: string, n: number) { return s + n; } +export function multiply(a: number, b: number) { return a * b; } +multiply(); + +//// [/user/username/projects/sample1/core/some_decl.d.ts] +declare const dts: any; + +//// [/user/username/projects/sample1/core/anotherModule.ts] +export const World = "hello"; + +//// [/user/username/projects/sample1/logic/tsconfig.json] +{ + "compilerOptions": { + "composite": true, + "declaration": true, + "sourceMap": true, + "forceConsistentCasingInFileNames": true, + "skipDefaultLibCheck": true + }, + "references": [ + { + "path": "../core" + } + ] +} + +//// [/user/username/projects/sample1/logic/index.ts] +import * as c from '../core/index'; +export function getSecondsInDay() { + return c.multiply(10, 15); +} +import * as mod from '../core/anotherModule'; +export const m = mod; + + +//// [/user/username/projects/sample1/tests/tsconfig.json] +{ + "references": [ + { + "path": "../logic" + } + ], + "files": [ + "index.ts" + ], + "compilerOptions": { + "composite": true, + "declaration": true, + "forceConsistentCasingInFileNames": true, + "skipDefaultLibCheck": true + } +} + +//// [/user/username/projects/sample1/tests/index.ts] +import * as c from '../core/index'; +import * as logic from '../logic/index'; + +c.leftPad("", 10); +logic.getSecondsInDay(); + +import * as mod from '../core/anotherModule'; +export const m = mod; + + + +/a/lib/tsc.js --b -w tests --verbose --stopBuildOnErrors +Output:: +>> Screen clear +[HH:MM:SS AM] Starting compilation in watch mode... + +[HH:MM:SS AM] Projects in this build: + * core/tsconfig.json + * logic/tsconfig.json + * tests/tsconfig.json + +[HH:MM:SS AM] Project 'core/tsconfig.json' is out of date because output file 'core/tsconfig.tsbuildinfo' does not exist + +[HH:MM:SS AM] Building project '/user/username/projects/sample1/core/tsconfig.json'... + +core/index.ts:4:1 - error TS2554: Expected 2 arguments, but got 0. + +4 multiply(); +  ~~~~~~~~ + + core/index.ts:3:26 + 3 export function multiply(a: number, b: number) { return a * b; } +    ~~~~~~~~~ + An argument for 'a' was not provided. + +[HH:MM:SS AM] Project 'logic/tsconfig.json' can't be built because its dependency 'core' has errors + +[HH:MM:SS AM] Skipping build of project '/user/username/projects/sample1/logic/tsconfig.json' because its dependency '/user/username/projects/sample1/core' has errors + +[HH:MM:SS AM] Project 'tests/tsconfig.json' can't be built because its dependency 'logic' was not built + +[HH:MM:SS AM] Skipping build of project '/user/username/projects/sample1/tests/tsconfig.json' because its dependency '/user/username/projects/sample1/logic' was not built + +[HH:MM:SS AM] Found 1 error. Watching for file changes. + + + +//// [/user/username/projects/sample1/core/anotherModule.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.World = void 0; +exports.World = "hello"; + + +//// [/user/username/projects/sample1/core/anotherModule.d.ts.map] +{"version":3,"file":"anotherModule.d.ts","sourceRoot":"","sources":["anotherModule.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,KAAK,UAAU,CAAC"} + +//// [/user/username/projects/sample1/core/anotherModule.d.ts] +export declare const World = "hello"; +//# sourceMappingURL=anotherModule.d.ts.map + +//// [/user/username/projects/sample1/core/index.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.someString = void 0; +exports.leftPad = leftPad; +exports.multiply = multiply; +exports.someString = "HELLO WORLD"; +function leftPad(s, n) { return s + n; } +function multiply(a, b) { return a * b; } +multiply(); + + +//// [/user/username/projects/sample1/core/index.d.ts.map] +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU,EAAE,MAAsB,CAAC;AAChD,wBAAgB,OAAO,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,UAAmB;AAC/D,wBAAgB,QAAQ,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,UAAmB"} + +//// [/user/username/projects/sample1/core/index.d.ts] +export declare const someString: string; +export declare function leftPad(s: string, n: number): string; +export declare function multiply(a: number, b: number): number; +//# sourceMappingURL=index.d.ts.map + +//// [/user/username/projects/sample1/core/tsconfig.tsbuildinfo] +{"fileNames":["../../../../../a/lib/lib.d.ts","./anothermodule.ts","./index.ts","./some_decl.d.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"-3090574810-export const World = \"hello\";","signature":"-9234818176-export declare const World = \"hello\";\n"},{"version":"-12887218413-export const someString: string = \"HELLO WORLD\";\nexport function leftPad(s: string, n: number) { return s + n; }\nexport function multiply(a: number, b: number) { return a * b; }\nmultiply();","signature":"-7362568283-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n"},{"version":"-7959511260-declare const dts: any;","affectsGlobalScope":true}],"root":[[2,4]],"options":{"composite":true,"declaration":true,"declarationMap":true,"skipDefaultLibCheck":true},"semanticDiagnosticsPerFile":[[3,[{"start":178,"length":8,"messageText":"Expected 2 arguments, but got 0.","category":1,"code":2554,"relatedInformation":[{"start":138,"length":9,"messageText":"An argument for 'a' was not provided.","category":3,"code":6210}]}]]],"latestChangedDtsFile":"./index.d.ts","version":"FakeTSVersion"} + +//// [/user/username/projects/sample1/core/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "fileNames": [ + "../../../../../a/lib/lib.d.ts", + "./anothermodule.ts", + "./index.ts", + "./some_decl.d.ts" + ], + "fileInfos": { + "../../../../../a/lib/lib.d.ts": { + "original": { + "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "affectsGlobalScope": true + }, + "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "signature": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "affectsGlobalScope": true + }, + "./anothermodule.ts": { + "original": { + "version": "-3090574810-export const World = \"hello\";", + "signature": "-9234818176-export declare const World = \"hello\";\n" + }, + "version": "-3090574810-export const World = \"hello\";", + "signature": "-9234818176-export declare const World = \"hello\";\n" + }, + "./index.ts": { + "original": { + "version": "-12887218413-export const someString: string = \"HELLO WORLD\";\nexport function leftPad(s: string, n: number) { return s + n; }\nexport function multiply(a: number, b: number) { return a * b; }\nmultiply();", + "signature": "-7362568283-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n" + }, + "version": "-12887218413-export const someString: string = \"HELLO WORLD\";\nexport function leftPad(s: string, n: number) { return s + n; }\nexport function multiply(a: number, b: number) { return a * b; }\nmultiply();", + "signature": "-7362568283-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n" + }, + "./some_decl.d.ts": { + "original": { + "version": "-7959511260-declare const dts: any;", + "affectsGlobalScope": true + }, + "version": "-7959511260-declare const dts: any;", + "signature": "-7959511260-declare const dts: any;", + "affectsGlobalScope": true + } + }, + "root": [ + [ + [ + 2, + 4 + ], + [ + "./anothermodule.ts", + "./index.ts", + "./some_decl.d.ts" + ] + ] + ], + "options": { + "composite": true, + "declaration": true, + "declarationMap": true, + "skipDefaultLibCheck": true + }, + "semanticDiagnosticsPerFile": [ + [ + "./index.ts", + [ + { + "start": 178, + "length": 8, + "messageText": "Expected 2 arguments, but got 0.", + "category": 1, + "code": 2554, + "relatedInformation": [ + { + "start": 138, + "length": 9, + "messageText": "An argument for 'a' was not provided.", + "category": 3, + "code": 6210 + } + ] + } + ] + ] + ], + "latestChangedDtsFile": "./index.d.ts", + "version": "FakeTSVersion", + "size": 1574 +} + + +FsWatches:: +/user/username/projects/sample1/core/anotherModule.ts: *new* + {} +/user/username/projects/sample1/core/index.ts: *new* + {} +/user/username/projects/sample1/core/some_decl.d.ts: *new* + {} +/user/username/projects/sample1/core/tsconfig.json: *new* + {} +/user/username/projects/sample1/logic/index.ts: *new* + {} +/user/username/projects/sample1/logic/tsconfig.json: *new* + {} +/user/username/projects/sample1/tests/index.ts: *new* + {} +/user/username/projects/sample1/tests/tsconfig.json: *new* + {} + +FsWatchesRecursive:: +/user/username/projects/sample1/core: *new* + {} +/user/username/projects/sample1/logic: *new* + {} + +Program root files: [ + "/user/username/projects/sample1/core/anotherModule.ts", + "/user/username/projects/sample1/core/index.ts", + "/user/username/projects/sample1/core/some_decl.d.ts" +] +Program options: { + "composite": true, + "declaration": true, + "declarationMap": true, + "skipDefaultLibCheck": true, + "watch": true, + "tscBuild": true, + "configFilePath": "/user/username/projects/sample1/core/tsconfig.json" +} +Program structureReused: Not +Program files:: +/a/lib/lib.d.ts +/user/username/projects/sample1/core/anotherModule.ts +/user/username/projects/sample1/core/index.ts +/user/username/projects/sample1/core/some_decl.d.ts + +Semantic diagnostics in builder refreshed for:: +/a/lib/lib.d.ts +/user/username/projects/sample1/core/anotherModule.ts +/user/username/projects/sample1/core/index.ts +/user/username/projects/sample1/core/some_decl.d.ts + +Shape signatures in builder refreshed for:: +/a/lib/lib.d.ts (used version) +/user/username/projects/sample1/core/anothermodule.ts (computed .d.ts during emit) +/user/username/projects/sample1/core/index.ts (computed .d.ts during emit) +/user/username/projects/sample1/core/some_decl.d.ts (used version) + +exitCode:: ExitStatus.undefined + +Change:: fix error + +Input:: +//// [/user/username/projects/sample1/core/index.ts] +export const someString: string = "HELLO WORLD"; +export function leftPad(s: string, n: number) { return s + n; } +export function multiply(a: number, b: number) { return a * b; } + + + +Timeout callback:: count: 1 +1: timerToBuildInvalidatedProject *new* + +Before running Timeout callback:: count: 1 +1: timerToBuildInvalidatedProject + +Host is moving to new time +After running Timeout callback:: count: 1 +Output:: +>> Screen clear +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Project 'core/tsconfig.json' is out of date because buildinfo file 'core/tsconfig.tsbuildinfo' indicates that program needs to report errors. + +[HH:MM:SS AM] Building project '/user/username/projects/sample1/core/tsconfig.json'... + + + +//// [/user/username/projects/sample1/core/index.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.someString = void 0; +exports.leftPad = leftPad; +exports.multiply = multiply; +exports.someString = "HELLO WORLD"; +function leftPad(s, n) { return s + n; } +function multiply(a, b) { return a * b; } + + +//// [/user/username/projects/sample1/core/index.d.ts.map] file written with same contents +//// [/user/username/projects/sample1/core/tsconfig.tsbuildinfo] +{"fileNames":["../../../../../a/lib/lib.d.ts","./anothermodule.ts","./index.ts","./some_decl.d.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"-3090574810-export const World = \"hello\";","signature":"-9234818176-export declare const World = \"hello\";\n"},{"version":"-15745098553-export const someString: string = \"HELLO WORLD\";\nexport function leftPad(s: string, n: number) { return s + n; }\nexport function multiply(a: number, b: number) { return a * b; }\n","signature":"-7362568283-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n"},{"version":"-7959511260-declare const dts: any;","affectsGlobalScope":true}],"root":[[2,4]],"options":{"composite":true,"declaration":true,"declarationMap":true,"skipDefaultLibCheck":true},"latestChangedDtsFile":"./index.d.ts","version":"FakeTSVersion"} + +//// [/user/username/projects/sample1/core/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "fileNames": [ + "../../../../../a/lib/lib.d.ts", + "./anothermodule.ts", + "./index.ts", + "./some_decl.d.ts" + ], + "fileInfos": { + "../../../../../a/lib/lib.d.ts": { + "original": { + "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "affectsGlobalScope": true + }, + "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "signature": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "affectsGlobalScope": true + }, + "./anothermodule.ts": { + "original": { + "version": "-3090574810-export const World = \"hello\";", + "signature": "-9234818176-export declare const World = \"hello\";\n" + }, + "version": "-3090574810-export const World = \"hello\";", + "signature": "-9234818176-export declare const World = \"hello\";\n" + }, + "./index.ts": { + "original": { + "version": "-15745098553-export const someString: string = \"HELLO WORLD\";\nexport function leftPad(s: string, n: number) { return s + n; }\nexport function multiply(a: number, b: number) { return a * b; }\n", + "signature": "-7362568283-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n" + }, + "version": "-15745098553-export const someString: string = \"HELLO WORLD\";\nexport function leftPad(s: string, n: number) { return s + n; }\nexport function multiply(a: number, b: number) { return a * b; }\n", + "signature": "-7362568283-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n" + }, + "./some_decl.d.ts": { + "original": { + "version": "-7959511260-declare const dts: any;", + "affectsGlobalScope": true + }, + "version": "-7959511260-declare const dts: any;", + "signature": "-7959511260-declare const dts: any;", + "affectsGlobalScope": true + } + }, + "root": [ + [ + [ + 2, + 4 + ], + [ + "./anothermodule.ts", + "./index.ts", + "./some_decl.d.ts" + ] + ] + ], + "options": { + "composite": true, + "declaration": true, + "declarationMap": true, + "skipDefaultLibCheck": true + }, + "latestChangedDtsFile": "./index.d.ts", + "version": "FakeTSVersion", + "size": 1300 +} + + +Timeout callback:: count: 1 +2: timerToBuildInvalidatedProject *new* + +Before running Timeout callback:: count: 1 +2: timerToBuildInvalidatedProject + +Host is moving to new time +After running Timeout callback:: count: 0 +Output:: +[HH:MM:SS AM] Project 'logic/tsconfig.json' is out of date because output file 'logic/tsconfig.tsbuildinfo' does not exist + +[HH:MM:SS AM] Building project '/user/username/projects/sample1/logic/tsconfig.json'... + +[HH:MM:SS AM] Project 'tests/tsconfig.json' is out of date because output file 'tests/tsconfig.tsbuildinfo' does not exist + +[HH:MM:SS AM] Building project '/user/username/projects/sample1/tests/tsconfig.json'... + +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + + + +//// [/user/username/projects/sample1/logic/index.js.map] +{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;AACA,0CAEC;AAHD,iCAAmC;AACnC,SAAgB,eAAe;IAC3B,OAAO,CAAC,CAAC,QAAQ,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;AAC9B,CAAC;AACD,2CAA6C;AAChC,QAAA,CAAC,GAAG,GAAG,CAAC"} + +//// [/user/username/projects/sample1/logic/index.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.m = void 0; +exports.getSecondsInDay = getSecondsInDay; +var c = require("../core/index"); +function getSecondsInDay() { + return c.multiply(10, 15); +} +var mod = require("../core/anotherModule"); +exports.m = mod; +//# sourceMappingURL=index.js.map + +//// [/user/username/projects/sample1/logic/index.d.ts] +export declare function getSecondsInDay(): number; +import * as mod from '../core/anotherModule'; +export declare const m: typeof mod; + + +//// [/user/username/projects/sample1/logic/tsconfig.tsbuildinfo] +{"fileNames":["../../../../../a/lib/lib.d.ts","../core/index.d.ts","../core/anothermodule.d.ts","./index.ts"],"fileIdsList":[[2,3]],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-7362568283-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n","-9234818176-export declare const World = \"hello\";\n",{"version":"-9623801128-import * as c from '../core/index';\nexport function getSecondsInDay() {\n return c.multiply(10, 15);\n}\nimport * as mod from '../core/anotherModule';\nexport const m = mod;\n","signature":"-9659407152-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n"}],"root":[4],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true,"sourceMap":true},"referencedMap":[[4,1]],"latestChangedDtsFile":"./index.d.ts","version":"FakeTSVersion"} + +//// [/user/username/projects/sample1/logic/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "fileNames": [ + "../../../../../a/lib/lib.d.ts", + "../core/index.d.ts", + "../core/anothermodule.d.ts", + "./index.ts" + ], + "fileIdsList": [ + [ + "../core/index.d.ts", + "../core/anothermodule.d.ts" + ] + ], + "fileInfos": { + "../../../../../a/lib/lib.d.ts": { + "original": { + "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "affectsGlobalScope": true + }, + "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "signature": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "affectsGlobalScope": true + }, + "../core/index.d.ts": { + "version": "-7362568283-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n", + "signature": "-7362568283-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n" + }, + "../core/anothermodule.d.ts": { + "version": "-9234818176-export declare const World = \"hello\";\n", + "signature": "-9234818176-export declare const World = \"hello\";\n" + }, + "./index.ts": { + "original": { + "version": "-9623801128-import * as c from '../core/index';\nexport function getSecondsInDay() {\n return c.multiply(10, 15);\n}\nimport * as mod from '../core/anotherModule';\nexport const m = mod;\n", + "signature": "-9659407152-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n" + }, + "version": "-9623801128-import * as c from '../core/index';\nexport function getSecondsInDay() {\n return c.multiply(10, 15);\n}\nimport * as mod from '../core/anotherModule';\nexport const m = mod;\n", + "signature": "-9659407152-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n" + } + }, + "root": [ + [ + 4, + "./index.ts" + ] + ], + "options": { + "composite": true, + "declaration": true, + "skipDefaultLibCheck": true, + "sourceMap": true + }, + "referencedMap": { + "./index.ts": [ + "../core/index.d.ts", + "../core/anothermodule.d.ts" + ] + }, + "latestChangedDtsFile": "./index.d.ts", + "version": "FakeTSVersion", + "size": 1347 +} + +//// [/user/username/projects/sample1/tests/index.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.m = void 0; +var c = require("../core/index"); +var logic = require("../logic/index"); +c.leftPad("", 10); +logic.getSecondsInDay(); +var mod = require("../core/anotherModule"); +exports.m = mod; + + +//// [/user/username/projects/sample1/tests/index.d.ts] +import * as mod from '../core/anotherModule'; +export declare const m: typeof mod; + + +//// [/user/username/projects/sample1/tests/tsconfig.tsbuildinfo] +{"fileNames":["../../../../../a/lib/lib.d.ts","../core/index.d.ts","../core/anothermodule.d.ts","../logic/index.d.ts","./index.ts"],"fileIdsList":[[3],[2,3,4]],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-7362568283-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n","-9234818176-export declare const World = \"hello\";\n","-9659407152-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n",{"version":"-11950676699-import * as c from '../core/index';\nimport * as logic from '../logic/index';\n\nc.leftPad(\"\", 10);\nlogic.getSecondsInDay();\n\nimport * as mod from '../core/anotherModule';\nexport const m = mod;\n","signature":"2702201019-import * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n"}],"root":[5],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true},"referencedMap":[[4,1],[5,2]],"latestChangedDtsFile":"./index.d.ts","version":"FakeTSVersion"} + +//// [/user/username/projects/sample1/tests/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "fileNames": [ + "../../../../../a/lib/lib.d.ts", + "../core/index.d.ts", + "../core/anothermodule.d.ts", + "../logic/index.d.ts", + "./index.ts" + ], + "fileIdsList": [ + [ + "../core/anothermodule.d.ts" + ], + [ + "../core/index.d.ts", + "../core/anothermodule.d.ts", + "../logic/index.d.ts" + ] + ], + "fileInfos": { + "../../../../../a/lib/lib.d.ts": { + "original": { + "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "affectsGlobalScope": true + }, + "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "signature": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "affectsGlobalScope": true + }, + "../core/index.d.ts": { + "version": "-7362568283-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n", + "signature": "-7362568283-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n" + }, + "../core/anothermodule.d.ts": { + "version": "-9234818176-export declare const World = \"hello\";\n", + "signature": "-9234818176-export declare const World = \"hello\";\n" + }, + "../logic/index.d.ts": { + "version": "-9659407152-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n", + "signature": "-9659407152-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n" + }, + "./index.ts": { + "original": { + "version": "-11950676699-import * as c from '../core/index';\nimport * as logic from '../logic/index';\n\nc.leftPad(\"\", 10);\nlogic.getSecondsInDay();\n\nimport * as mod from '../core/anotherModule';\nexport const m = mod;\n", + "signature": "2702201019-import * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n" + }, + "version": "-11950676699-import * as c from '../core/index';\nimport * as logic from '../logic/index';\n\nc.leftPad(\"\", 10);\nlogic.getSecondsInDay();\n\nimport * as mod from '../core/anotherModule';\nexport const m = mod;\n", + "signature": "2702201019-import * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n" + } + }, + "root": [ + [ + 5, + "./index.ts" + ] + ], + "options": { + "composite": true, + "declaration": true, + "skipDefaultLibCheck": true + }, + "referencedMap": { + "../logic/index.d.ts": [ + "../core/anothermodule.d.ts" + ], + "./index.ts": [ + "../core/index.d.ts", + "../core/anothermodule.d.ts", + "../logic/index.d.ts" + ] + }, + "latestChangedDtsFile": "./index.d.ts", + "version": "FakeTSVersion", + "size": 1485 +} + + + +Program root files: [ + "/user/username/projects/sample1/core/anotherModule.ts", + "/user/username/projects/sample1/core/index.ts", + "/user/username/projects/sample1/core/some_decl.d.ts" +] +Program options: { + "composite": true, + "declaration": true, + "declarationMap": true, + "skipDefaultLibCheck": true, + "watch": true, + "tscBuild": true, + "configFilePath": "/user/username/projects/sample1/core/tsconfig.json" +} +Program structureReused: Not +Program files:: +/a/lib/lib.d.ts +/user/username/projects/sample1/core/anotherModule.ts +/user/username/projects/sample1/core/index.ts +/user/username/projects/sample1/core/some_decl.d.ts + +Semantic diagnostics in builder refreshed for:: +/user/username/projects/sample1/core/index.ts + +Shape signatures in builder refreshed for:: +/user/username/projects/sample1/core/index.ts (computed .d.ts) + +Program root files: [ + "/user/username/projects/sample1/logic/index.ts" +] +Program options: { + "composite": true, + "declaration": true, + "sourceMap": true, + "forceConsistentCasingInFileNames": true, + "skipDefaultLibCheck": true, + "watch": true, + "tscBuild": true, + "configFilePath": "/user/username/projects/sample1/logic/tsconfig.json" +} +Program structureReused: Not +Program files:: +/a/lib/lib.d.ts +/user/username/projects/sample1/core/index.d.ts +/user/username/projects/sample1/core/anotherModule.d.ts +/user/username/projects/sample1/logic/index.ts + +Semantic diagnostics in builder refreshed for:: +/a/lib/lib.d.ts +/user/username/projects/sample1/core/index.d.ts +/user/username/projects/sample1/core/anotherModule.d.ts +/user/username/projects/sample1/logic/index.ts + +Shape signatures in builder refreshed for:: +/a/lib/lib.d.ts (used version) +/user/username/projects/sample1/core/index.d.ts (used version) +/user/username/projects/sample1/core/anothermodule.d.ts (used version) +/user/username/projects/sample1/logic/index.ts (computed .d.ts during emit) + +Program root files: [ + "/user/username/projects/sample1/tests/index.ts" +] +Program options: { + "composite": true, + "declaration": true, + "forceConsistentCasingInFileNames": true, + "skipDefaultLibCheck": true, + "watch": true, + "tscBuild": true, + "configFilePath": "/user/username/projects/sample1/tests/tsconfig.json" +} +Program structureReused: Not +Program files:: +/a/lib/lib.d.ts +/user/username/projects/sample1/core/index.d.ts +/user/username/projects/sample1/core/anotherModule.d.ts +/user/username/projects/sample1/logic/index.d.ts +/user/username/projects/sample1/tests/index.ts + +Semantic diagnostics in builder refreshed for:: +/a/lib/lib.d.ts +/user/username/projects/sample1/core/index.d.ts +/user/username/projects/sample1/core/anotherModule.d.ts +/user/username/projects/sample1/logic/index.d.ts +/user/username/projects/sample1/tests/index.ts + +Shape signatures in builder refreshed for:: +/a/lib/lib.d.ts (used version) +/user/username/projects/sample1/core/index.d.ts (used version) +/user/username/projects/sample1/core/anothermodule.d.ts (used version) +/user/username/projects/sample1/logic/index.d.ts (used version) +/user/username/projects/sample1/tests/index.ts (computed .d.ts during emit) + +exitCode:: ExitStatus.undefined diff --git a/tests/baselines/reference/tsbuildWatch/programUpdates/skips-builds-downstream-projects-if-upstream-projects-have-errors-with-stopBuildOnErrors.js b/tests/baselines/reference/tsbuildWatch/programUpdates/skips-builds-downstream-projects-if-upstream-projects-have-errors-with-stopBuildOnErrors.js new file mode 100644 index 0000000000000..5e025aa04a28d --- /dev/null +++ b/tests/baselines/reference/tsbuildWatch/programUpdates/skips-builds-downstream-projects-if-upstream-projects-have-errors-with-stopBuildOnErrors.js @@ -0,0 +1,734 @@ +currentDirectory:: /user/username/projects/sample1 useCaseSensitiveFileNames: false +Input:: +//// [/a/lib/lib.d.ts] +/// +interface Boolean {} +interface Function {} +interface CallableFunction {} +interface NewableFunction {} +interface IArguments {} +interface Number { toExponential: any; } +interface Object {} +interface RegExp {} +interface String { charAt: any; } +interface Array { length: number; [n: number]: T; } + +//// [/user/username/projects/sample1/core/tsconfig.json] +{ + "compilerOptions": { + "composite": true, + "declaration": true, + "declarationMap": true, + "skipDefaultLibCheck": true + } +} + +//// [/user/username/projects/sample1/core/index.ts] +export const someString: string = "HELLO WORLD"; +export function leftPad(s: string, n: number) { return s + n; } +export function multiply(a: number, b: number) { return a * b; } +multiply(); + +//// [/user/username/projects/sample1/core/some_decl.d.ts] +declare const dts: any; + +//// [/user/username/projects/sample1/core/anotherModule.ts] +export const World = "hello"; + +//// [/user/username/projects/sample1/logic/tsconfig.json] +{ + "compilerOptions": { + "composite": true, + "declaration": true, + "sourceMap": true, + "forceConsistentCasingInFileNames": true, + "skipDefaultLibCheck": true + }, + "references": [ + { + "path": "../core" + } + ] +} + +//// [/user/username/projects/sample1/logic/index.ts] +import * as c from '../core/index'; +export function getSecondsInDay() { + return c.multiply(10, 15); +} +import * as mod from '../core/anotherModule'; +export const m = mod; + + +//// [/user/username/projects/sample1/tests/tsconfig.json] +{ + "references": [ + { + "path": "../core" + }, + { + "path": "../logic" + } + ], + "files": [ + "index.ts" + ], + "compilerOptions": { + "composite": true, + "declaration": true, + "forceConsistentCasingInFileNames": true, + "skipDefaultLibCheck": true + } +} + +//// [/user/username/projects/sample1/tests/index.ts] +import * as c from '../core/index'; +import * as logic from '../logic/index'; + +c.leftPad("", 10); +logic.getSecondsInDay(); + +import * as mod from '../core/anotherModule'; +export const m = mod; + + + +/a/lib/tsc.js --b -w tests --verbose --stopBuildOnErrors +Output:: +>> Screen clear +[HH:MM:SS AM] Starting compilation in watch mode... + +[HH:MM:SS AM] Projects in this build: + * core/tsconfig.json + * logic/tsconfig.json + * tests/tsconfig.json + +[HH:MM:SS AM] Project 'core/tsconfig.json' is out of date because output file 'core/tsconfig.tsbuildinfo' does not exist + +[HH:MM:SS AM] Building project '/user/username/projects/sample1/core/tsconfig.json'... + +core/index.ts:4:1 - error TS2554: Expected 2 arguments, but got 0. + +4 multiply(); +  ~~~~~~~~ + + core/index.ts:3:26 + 3 export function multiply(a: number, b: number) { return a * b; } +    ~~~~~~~~~ + An argument for 'a' was not provided. + +[HH:MM:SS AM] Project 'logic/tsconfig.json' can't be built because its dependency 'core' has errors + +[HH:MM:SS AM] Skipping build of project '/user/username/projects/sample1/logic/tsconfig.json' because its dependency '/user/username/projects/sample1/core' has errors + +[HH:MM:SS AM] Project 'tests/tsconfig.json' can't be built because its dependency 'core' has errors + +[HH:MM:SS AM] Skipping build of project '/user/username/projects/sample1/tests/tsconfig.json' because its dependency '/user/username/projects/sample1/core' has errors + +[HH:MM:SS AM] Found 1 error. Watching for file changes. + + + +//// [/user/username/projects/sample1/core/anotherModule.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.World = void 0; +exports.World = "hello"; + + +//// [/user/username/projects/sample1/core/anotherModule.d.ts.map] +{"version":3,"file":"anotherModule.d.ts","sourceRoot":"","sources":["anotherModule.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,KAAK,UAAU,CAAC"} + +//// [/user/username/projects/sample1/core/anotherModule.d.ts] +export declare const World = "hello"; +//# sourceMappingURL=anotherModule.d.ts.map + +//// [/user/username/projects/sample1/core/index.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.someString = void 0; +exports.leftPad = leftPad; +exports.multiply = multiply; +exports.someString = "HELLO WORLD"; +function leftPad(s, n) { return s + n; } +function multiply(a, b) { return a * b; } +multiply(); + + +//// [/user/username/projects/sample1/core/index.d.ts.map] +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU,EAAE,MAAsB,CAAC;AAChD,wBAAgB,OAAO,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,UAAmB;AAC/D,wBAAgB,QAAQ,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,UAAmB"} + +//// [/user/username/projects/sample1/core/index.d.ts] +export declare const someString: string; +export declare function leftPad(s: string, n: number): string; +export declare function multiply(a: number, b: number): number; +//# sourceMappingURL=index.d.ts.map + +//// [/user/username/projects/sample1/core/tsconfig.tsbuildinfo] +{"fileNames":["../../../../../a/lib/lib.d.ts","./anothermodule.ts","./index.ts","./some_decl.d.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"-3090574810-export const World = \"hello\";","signature":"-9234818176-export declare const World = \"hello\";\n"},{"version":"-12887218413-export const someString: string = \"HELLO WORLD\";\nexport function leftPad(s: string, n: number) { return s + n; }\nexport function multiply(a: number, b: number) { return a * b; }\nmultiply();","signature":"-7362568283-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n"},{"version":"-7959511260-declare const dts: any;","affectsGlobalScope":true}],"root":[[2,4]],"options":{"composite":true,"declaration":true,"declarationMap":true,"skipDefaultLibCheck":true},"semanticDiagnosticsPerFile":[[3,[{"start":178,"length":8,"messageText":"Expected 2 arguments, but got 0.","category":1,"code":2554,"relatedInformation":[{"start":138,"length":9,"messageText":"An argument for 'a' was not provided.","category":3,"code":6210}]}]]],"latestChangedDtsFile":"./index.d.ts","version":"FakeTSVersion"} + +//// [/user/username/projects/sample1/core/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "fileNames": [ + "../../../../../a/lib/lib.d.ts", + "./anothermodule.ts", + "./index.ts", + "./some_decl.d.ts" + ], + "fileInfos": { + "../../../../../a/lib/lib.d.ts": { + "original": { + "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "affectsGlobalScope": true + }, + "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "signature": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "affectsGlobalScope": true + }, + "./anothermodule.ts": { + "original": { + "version": "-3090574810-export const World = \"hello\";", + "signature": "-9234818176-export declare const World = \"hello\";\n" + }, + "version": "-3090574810-export const World = \"hello\";", + "signature": "-9234818176-export declare const World = \"hello\";\n" + }, + "./index.ts": { + "original": { + "version": "-12887218413-export const someString: string = \"HELLO WORLD\";\nexport function leftPad(s: string, n: number) { return s + n; }\nexport function multiply(a: number, b: number) { return a * b; }\nmultiply();", + "signature": "-7362568283-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n" + }, + "version": "-12887218413-export const someString: string = \"HELLO WORLD\";\nexport function leftPad(s: string, n: number) { return s + n; }\nexport function multiply(a: number, b: number) { return a * b; }\nmultiply();", + "signature": "-7362568283-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n" + }, + "./some_decl.d.ts": { + "original": { + "version": "-7959511260-declare const dts: any;", + "affectsGlobalScope": true + }, + "version": "-7959511260-declare const dts: any;", + "signature": "-7959511260-declare const dts: any;", + "affectsGlobalScope": true + } + }, + "root": [ + [ + [ + 2, + 4 + ], + [ + "./anothermodule.ts", + "./index.ts", + "./some_decl.d.ts" + ] + ] + ], + "options": { + "composite": true, + "declaration": true, + "declarationMap": true, + "skipDefaultLibCheck": true + }, + "semanticDiagnosticsPerFile": [ + [ + "./index.ts", + [ + { + "start": 178, + "length": 8, + "messageText": "Expected 2 arguments, but got 0.", + "category": 1, + "code": 2554, + "relatedInformation": [ + { + "start": 138, + "length": 9, + "messageText": "An argument for 'a' was not provided.", + "category": 3, + "code": 6210 + } + ] + } + ] + ] + ], + "latestChangedDtsFile": "./index.d.ts", + "version": "FakeTSVersion", + "size": 1574 +} + + +FsWatches:: +/user/username/projects/sample1/core/anotherModule.ts: *new* + {} +/user/username/projects/sample1/core/index.ts: *new* + {} +/user/username/projects/sample1/core/some_decl.d.ts: *new* + {} +/user/username/projects/sample1/core/tsconfig.json: *new* + {} +/user/username/projects/sample1/logic/index.ts: *new* + {} +/user/username/projects/sample1/logic/tsconfig.json: *new* + {} +/user/username/projects/sample1/tests/index.ts: *new* + {} +/user/username/projects/sample1/tests/tsconfig.json: *new* + {} + +FsWatchesRecursive:: +/user/username/projects/sample1/core: *new* + {} +/user/username/projects/sample1/logic: *new* + {} + +Program root files: [ + "/user/username/projects/sample1/core/anotherModule.ts", + "/user/username/projects/sample1/core/index.ts", + "/user/username/projects/sample1/core/some_decl.d.ts" +] +Program options: { + "composite": true, + "declaration": true, + "declarationMap": true, + "skipDefaultLibCheck": true, + "watch": true, + "tscBuild": true, + "configFilePath": "/user/username/projects/sample1/core/tsconfig.json" +} +Program structureReused: Not +Program files:: +/a/lib/lib.d.ts +/user/username/projects/sample1/core/anotherModule.ts +/user/username/projects/sample1/core/index.ts +/user/username/projects/sample1/core/some_decl.d.ts + +Semantic diagnostics in builder refreshed for:: +/a/lib/lib.d.ts +/user/username/projects/sample1/core/anotherModule.ts +/user/username/projects/sample1/core/index.ts +/user/username/projects/sample1/core/some_decl.d.ts + +Shape signatures in builder refreshed for:: +/a/lib/lib.d.ts (used version) +/user/username/projects/sample1/core/anothermodule.ts (computed .d.ts during emit) +/user/username/projects/sample1/core/index.ts (computed .d.ts during emit) +/user/username/projects/sample1/core/some_decl.d.ts (used version) + +exitCode:: ExitStatus.undefined + +Change:: fix error + +Input:: +//// [/user/username/projects/sample1/core/index.ts] +export const someString: string = "HELLO WORLD"; +export function leftPad(s: string, n: number) { return s + n; } +export function multiply(a: number, b: number) { return a * b; } + + + +Timeout callback:: count: 1 +1: timerToBuildInvalidatedProject *new* + +Before running Timeout callback:: count: 1 +1: timerToBuildInvalidatedProject + +Host is moving to new time +After running Timeout callback:: count: 1 +Output:: +>> Screen clear +[HH:MM:SS AM] File change detected. Starting incremental compilation... + +[HH:MM:SS AM] Project 'core/tsconfig.json' is out of date because buildinfo file 'core/tsconfig.tsbuildinfo' indicates that program needs to report errors. + +[HH:MM:SS AM] Building project '/user/username/projects/sample1/core/tsconfig.json'... + + + +//// [/user/username/projects/sample1/core/index.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.someString = void 0; +exports.leftPad = leftPad; +exports.multiply = multiply; +exports.someString = "HELLO WORLD"; +function leftPad(s, n) { return s + n; } +function multiply(a, b) { return a * b; } + + +//// [/user/username/projects/sample1/core/index.d.ts.map] file written with same contents +//// [/user/username/projects/sample1/core/tsconfig.tsbuildinfo] +{"fileNames":["../../../../../a/lib/lib.d.ts","./anothermodule.ts","./index.ts","./some_decl.d.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"-3090574810-export const World = \"hello\";","signature":"-9234818176-export declare const World = \"hello\";\n"},{"version":"-15745098553-export const someString: string = \"HELLO WORLD\";\nexport function leftPad(s: string, n: number) { return s + n; }\nexport function multiply(a: number, b: number) { return a * b; }\n","signature":"-7362568283-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n"},{"version":"-7959511260-declare const dts: any;","affectsGlobalScope":true}],"root":[[2,4]],"options":{"composite":true,"declaration":true,"declarationMap":true,"skipDefaultLibCheck":true},"latestChangedDtsFile":"./index.d.ts","version":"FakeTSVersion"} + +//// [/user/username/projects/sample1/core/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "fileNames": [ + "../../../../../a/lib/lib.d.ts", + "./anothermodule.ts", + "./index.ts", + "./some_decl.d.ts" + ], + "fileInfos": { + "../../../../../a/lib/lib.d.ts": { + "original": { + "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "affectsGlobalScope": true + }, + "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "signature": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "affectsGlobalScope": true + }, + "./anothermodule.ts": { + "original": { + "version": "-3090574810-export const World = \"hello\";", + "signature": "-9234818176-export declare const World = \"hello\";\n" + }, + "version": "-3090574810-export const World = \"hello\";", + "signature": "-9234818176-export declare const World = \"hello\";\n" + }, + "./index.ts": { + "original": { + "version": "-15745098553-export const someString: string = \"HELLO WORLD\";\nexport function leftPad(s: string, n: number) { return s + n; }\nexport function multiply(a: number, b: number) { return a * b; }\n", + "signature": "-7362568283-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n" + }, + "version": "-15745098553-export const someString: string = \"HELLO WORLD\";\nexport function leftPad(s: string, n: number) { return s + n; }\nexport function multiply(a: number, b: number) { return a * b; }\n", + "signature": "-7362568283-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n" + }, + "./some_decl.d.ts": { + "original": { + "version": "-7959511260-declare const dts: any;", + "affectsGlobalScope": true + }, + "version": "-7959511260-declare const dts: any;", + "signature": "-7959511260-declare const dts: any;", + "affectsGlobalScope": true + } + }, + "root": [ + [ + [ + 2, + 4 + ], + [ + "./anothermodule.ts", + "./index.ts", + "./some_decl.d.ts" + ] + ] + ], + "options": { + "composite": true, + "declaration": true, + "declarationMap": true, + "skipDefaultLibCheck": true + }, + "latestChangedDtsFile": "./index.d.ts", + "version": "FakeTSVersion", + "size": 1300 +} + + +Timeout callback:: count: 1 +2: timerToBuildInvalidatedProject *new* + +Before running Timeout callback:: count: 1 +2: timerToBuildInvalidatedProject + +Host is moving to new time +After running Timeout callback:: count: 0 +Output:: +[HH:MM:SS AM] Project 'logic/tsconfig.json' is out of date because output file 'logic/tsconfig.tsbuildinfo' does not exist + +[HH:MM:SS AM] Building project '/user/username/projects/sample1/logic/tsconfig.json'... + +[HH:MM:SS AM] Project 'tests/tsconfig.json' is out of date because output file 'tests/tsconfig.tsbuildinfo' does not exist + +[HH:MM:SS AM] Building project '/user/username/projects/sample1/tests/tsconfig.json'... + +[HH:MM:SS AM] Found 0 errors. Watching for file changes. + + + +//// [/user/username/projects/sample1/logic/index.js.map] +{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;AACA,0CAEC;AAHD,iCAAmC;AACnC,SAAgB,eAAe;IAC3B,OAAO,CAAC,CAAC,QAAQ,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;AAC9B,CAAC;AACD,2CAA6C;AAChC,QAAA,CAAC,GAAG,GAAG,CAAC"} + +//// [/user/username/projects/sample1/logic/index.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.m = void 0; +exports.getSecondsInDay = getSecondsInDay; +var c = require("../core/index"); +function getSecondsInDay() { + return c.multiply(10, 15); +} +var mod = require("../core/anotherModule"); +exports.m = mod; +//# sourceMappingURL=index.js.map + +//// [/user/username/projects/sample1/logic/index.d.ts] +export declare function getSecondsInDay(): number; +import * as mod from '../core/anotherModule'; +export declare const m: typeof mod; + + +//// [/user/username/projects/sample1/logic/tsconfig.tsbuildinfo] +{"fileNames":["../../../../../a/lib/lib.d.ts","../core/index.d.ts","../core/anothermodule.d.ts","./index.ts"],"fileIdsList":[[2,3]],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-7362568283-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n","-9234818176-export declare const World = \"hello\";\n",{"version":"-9623801128-import * as c from '../core/index';\nexport function getSecondsInDay() {\n return c.multiply(10, 15);\n}\nimport * as mod from '../core/anotherModule';\nexport const m = mod;\n","signature":"-9659407152-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n"}],"root":[4],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true,"sourceMap":true},"referencedMap":[[4,1]],"latestChangedDtsFile":"./index.d.ts","version":"FakeTSVersion"} + +//// [/user/username/projects/sample1/logic/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "fileNames": [ + "../../../../../a/lib/lib.d.ts", + "../core/index.d.ts", + "../core/anothermodule.d.ts", + "./index.ts" + ], + "fileIdsList": [ + [ + "../core/index.d.ts", + "../core/anothermodule.d.ts" + ] + ], + "fileInfos": { + "../../../../../a/lib/lib.d.ts": { + "original": { + "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "affectsGlobalScope": true + }, + "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "signature": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "affectsGlobalScope": true + }, + "../core/index.d.ts": { + "version": "-7362568283-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n", + "signature": "-7362568283-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n" + }, + "../core/anothermodule.d.ts": { + "version": "-9234818176-export declare const World = \"hello\";\n", + "signature": "-9234818176-export declare const World = \"hello\";\n" + }, + "./index.ts": { + "original": { + "version": "-9623801128-import * as c from '../core/index';\nexport function getSecondsInDay() {\n return c.multiply(10, 15);\n}\nimport * as mod from '../core/anotherModule';\nexport const m = mod;\n", + "signature": "-9659407152-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n" + }, + "version": "-9623801128-import * as c from '../core/index';\nexport function getSecondsInDay() {\n return c.multiply(10, 15);\n}\nimport * as mod from '../core/anotherModule';\nexport const m = mod;\n", + "signature": "-9659407152-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n" + } + }, + "root": [ + [ + 4, + "./index.ts" + ] + ], + "options": { + "composite": true, + "declaration": true, + "skipDefaultLibCheck": true, + "sourceMap": true + }, + "referencedMap": { + "./index.ts": [ + "../core/index.d.ts", + "../core/anothermodule.d.ts" + ] + }, + "latestChangedDtsFile": "./index.d.ts", + "version": "FakeTSVersion", + "size": 1347 +} + +//// [/user/username/projects/sample1/tests/index.js] +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.m = void 0; +var c = require("../core/index"); +var logic = require("../logic/index"); +c.leftPad("", 10); +logic.getSecondsInDay(); +var mod = require("../core/anotherModule"); +exports.m = mod; + + +//// [/user/username/projects/sample1/tests/index.d.ts] +import * as mod from '../core/anotherModule'; +export declare const m: typeof mod; + + +//// [/user/username/projects/sample1/tests/tsconfig.tsbuildinfo] +{"fileNames":["../../../../../a/lib/lib.d.ts","../core/index.d.ts","../core/anothermodule.d.ts","../logic/index.d.ts","./index.ts"],"fileIdsList":[[3],[2,3,4]],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-7362568283-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n","-9234818176-export declare const World = \"hello\";\n","-9659407152-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n",{"version":"-11950676699-import * as c from '../core/index';\nimport * as logic from '../logic/index';\n\nc.leftPad(\"\", 10);\nlogic.getSecondsInDay();\n\nimport * as mod from '../core/anotherModule';\nexport const m = mod;\n","signature":"2702201019-import * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n"}],"root":[5],"options":{"composite":true,"declaration":true,"skipDefaultLibCheck":true},"referencedMap":[[4,1],[5,2]],"latestChangedDtsFile":"./index.d.ts","version":"FakeTSVersion"} + +//// [/user/username/projects/sample1/tests/tsconfig.tsbuildinfo.readable.baseline.txt] +{ + "fileNames": [ + "../../../../../a/lib/lib.d.ts", + "../core/index.d.ts", + "../core/anothermodule.d.ts", + "../logic/index.d.ts", + "./index.ts" + ], + "fileIdsList": [ + [ + "../core/anothermodule.d.ts" + ], + [ + "../core/index.d.ts", + "../core/anothermodule.d.ts", + "../logic/index.d.ts" + ] + ], + "fileInfos": { + "../../../../../a/lib/lib.d.ts": { + "original": { + "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "affectsGlobalScope": true + }, + "version": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "signature": "-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }", + "affectsGlobalScope": true + }, + "../core/index.d.ts": { + "version": "-7362568283-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n", + "signature": "-7362568283-export declare const someString: string;\nexport declare function leftPad(s: string, n: number): string;\nexport declare function multiply(a: number, b: number): number;\n" + }, + "../core/anothermodule.d.ts": { + "version": "-9234818176-export declare const World = \"hello\";\n", + "signature": "-9234818176-export declare const World = \"hello\";\n" + }, + "../logic/index.d.ts": { + "version": "-9659407152-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n", + "signature": "-9659407152-export declare function getSecondsInDay(): number;\nimport * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n" + }, + "./index.ts": { + "original": { + "version": "-11950676699-import * as c from '../core/index';\nimport * as logic from '../logic/index';\n\nc.leftPad(\"\", 10);\nlogic.getSecondsInDay();\n\nimport * as mod from '../core/anotherModule';\nexport const m = mod;\n", + "signature": "2702201019-import * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n" + }, + "version": "-11950676699-import * as c from '../core/index';\nimport * as logic from '../logic/index';\n\nc.leftPad(\"\", 10);\nlogic.getSecondsInDay();\n\nimport * as mod from '../core/anotherModule';\nexport const m = mod;\n", + "signature": "2702201019-import * as mod from '../core/anotherModule';\nexport declare const m: typeof mod;\n" + } + }, + "root": [ + [ + 5, + "./index.ts" + ] + ], + "options": { + "composite": true, + "declaration": true, + "skipDefaultLibCheck": true + }, + "referencedMap": { + "../logic/index.d.ts": [ + "../core/anothermodule.d.ts" + ], + "./index.ts": [ + "../core/index.d.ts", + "../core/anothermodule.d.ts", + "../logic/index.d.ts" + ] + }, + "latestChangedDtsFile": "./index.d.ts", + "version": "FakeTSVersion", + "size": 1485 +} + + + +Program root files: [ + "/user/username/projects/sample1/core/anotherModule.ts", + "/user/username/projects/sample1/core/index.ts", + "/user/username/projects/sample1/core/some_decl.d.ts" +] +Program options: { + "composite": true, + "declaration": true, + "declarationMap": true, + "skipDefaultLibCheck": true, + "watch": true, + "tscBuild": true, + "configFilePath": "/user/username/projects/sample1/core/tsconfig.json" +} +Program structureReused: Not +Program files:: +/a/lib/lib.d.ts +/user/username/projects/sample1/core/anotherModule.ts +/user/username/projects/sample1/core/index.ts +/user/username/projects/sample1/core/some_decl.d.ts + +Semantic diagnostics in builder refreshed for:: +/user/username/projects/sample1/core/index.ts + +Shape signatures in builder refreshed for:: +/user/username/projects/sample1/core/index.ts (computed .d.ts) + +Program root files: [ + "/user/username/projects/sample1/logic/index.ts" +] +Program options: { + "composite": true, + "declaration": true, + "sourceMap": true, + "forceConsistentCasingInFileNames": true, + "skipDefaultLibCheck": true, + "watch": true, + "tscBuild": true, + "configFilePath": "/user/username/projects/sample1/logic/tsconfig.json" +} +Program structureReused: Not +Program files:: +/a/lib/lib.d.ts +/user/username/projects/sample1/core/index.d.ts +/user/username/projects/sample1/core/anotherModule.d.ts +/user/username/projects/sample1/logic/index.ts + +Semantic diagnostics in builder refreshed for:: +/a/lib/lib.d.ts +/user/username/projects/sample1/core/index.d.ts +/user/username/projects/sample1/core/anotherModule.d.ts +/user/username/projects/sample1/logic/index.ts + +Shape signatures in builder refreshed for:: +/a/lib/lib.d.ts (used version) +/user/username/projects/sample1/core/index.d.ts (used version) +/user/username/projects/sample1/core/anothermodule.d.ts (used version) +/user/username/projects/sample1/logic/index.ts (computed .d.ts during emit) + +Program root files: [ + "/user/username/projects/sample1/tests/index.ts" +] +Program options: { + "composite": true, + "declaration": true, + "forceConsistentCasingInFileNames": true, + "skipDefaultLibCheck": true, + "watch": true, + "tscBuild": true, + "configFilePath": "/user/username/projects/sample1/tests/tsconfig.json" +} +Program structureReused: Not +Program files:: +/a/lib/lib.d.ts +/user/username/projects/sample1/core/index.d.ts +/user/username/projects/sample1/core/anotherModule.d.ts +/user/username/projects/sample1/logic/index.d.ts +/user/username/projects/sample1/tests/index.ts + +Semantic diagnostics in builder refreshed for:: +/a/lib/lib.d.ts +/user/username/projects/sample1/core/index.d.ts +/user/username/projects/sample1/core/anotherModule.d.ts +/user/username/projects/sample1/logic/index.d.ts +/user/username/projects/sample1/tests/index.ts + +Shape signatures in builder refreshed for:: +/a/lib/lib.d.ts (used version) +/user/username/projects/sample1/core/index.d.ts (used version) +/user/username/projects/sample1/core/anothermodule.d.ts (used version) +/user/username/projects/sample1/logic/index.d.ts (used version) +/user/username/projects/sample1/tests/index.ts (computed .d.ts during emit) + +exitCode:: ExitStatus.undefined From 2a8865e6ba95c9bdcdb9e2c9c08f10c5f5c75391 Mon Sep 17 00:00:00 2001 From: "CSIGS@microsoft.com" Date: Sat, 17 Aug 2024 12:28:28 -0700 Subject: [PATCH 50/50] LEGO: Pull request from lego/hb_5378966c-b857-470a-8675-daebef4a6da1_20240817191120857 to main (#59669) --- .../diagnosticMessages.generated.json.lcl | 9 +++++++++ .../diagnosticMessages.generated.json.lcl | 9 +++++++++ .../diagnosticMessages.generated.json.lcl | 9 +++++++++ 3 files changed, 27 insertions(+) diff --git a/src/loc/lcl/chs/diagnosticMessages/diagnosticMessages.generated.json.lcl b/src/loc/lcl/chs/diagnosticMessages/diagnosticMessages.generated.json.lcl index 231ee78aee92c..448ee387b895b 100644 --- a/src/loc/lcl/chs/diagnosticMessages/diagnosticMessages.generated.json.lcl +++ b/src/loc/lcl/chs/diagnosticMessages/diagnosticMessages.generated.json.lcl @@ -606,6 +606,15 @@ + + + + + + + + + diff --git a/src/loc/lcl/csy/diagnosticMessages/diagnosticMessages.generated.json.lcl b/src/loc/lcl/csy/diagnosticMessages/diagnosticMessages.generated.json.lcl index 967590bbbd583..6ba67d48ffaa4 100644 --- a/src/loc/lcl/csy/diagnosticMessages/diagnosticMessages.generated.json.lcl +++ b/src/loc/lcl/csy/diagnosticMessages/diagnosticMessages.generated.json.lcl @@ -615,6 +615,15 @@ + + + + + + + + + diff --git a/src/loc/lcl/plk/diagnosticMessages/diagnosticMessages.generated.json.lcl b/src/loc/lcl/plk/diagnosticMessages/diagnosticMessages.generated.json.lcl index 67405dd05ae94..77870ba63d03c 100644 --- a/src/loc/lcl/plk/diagnosticMessages/diagnosticMessages.generated.json.lcl +++ b/src/loc/lcl/plk/diagnosticMessages/diagnosticMessages.generated.json.lcl @@ -599,6 +599,15 @@ + + + + + + + + +